Advertisement
onzulin

clases para SQLite

Sep 28th, 2012
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.63 KB | None | 0 0
  1. namespace MoneyManage.Datos
  2. {
  3.      public class Articulos
  4.      {
  5.         [SQLite.AutoIncrement, SQLite.PrimaryKey]
  6.         public int IDArticulo { get; set; }
  7.  
  8.         [SQLite.MaxLength(200)]
  9.         public string Nombre { get; set; }
  10.  
  11.         public double Cantidad { get; set; }
  12.  
  13.         [SQLite.MaxLength(2000)]
  14.         public string Descripcion { get; set; }
  15.  
  16.         public double Precio { get; set; }
  17.  
  18.         //foreign key
  19.         public Transacciones IDTransaccion { get; set; }
  20.  
  21.      }
  22.     public class Cuentas
  23.     {
  24.         [SQLite.PrimaryKey]
  25.         public int IDCuenta { get; set; }
  26.  
  27.         [SQLite.MaxLength(200)]
  28.         public string Nombre { get; set; }
  29.  
  30.         [SQLite.MaxLength(200)]
  31.         public string Clave { get; set; }
  32.  
  33.         //campos de la tabla Cuentas y en mi objeto dentro del objeto para trabajar con la base de  //datos con LINQ
  34.  
  35.         public double creditDebt { get; set; }
  36.         public double cash { get; set; }
  37.         public double earn { get; set; }
  38.         public double spent { get; set; }
  39.  
  40.     }
  41.     public class Transacciones
  42.     {
  43.         [SQLite.PrimaryKey, SQLite.AutoIncrement]
  44.         public int IDTransaccion { get; set; }
  45.  
  46.         [SQLite.MaxLength(256)]
  47.         public string Nombre { get; set; }
  48.  
  49.         //Amount es cantidad
  50.         [SQLite.MaxLength(256)]
  51.         public string Amount { get; set; }
  52.         [SQLite.MaxLength(2000)]
  53.         public string descripcion { get; set; }
  54.  
  55.         [SQLite.MaxLength(10)]
  56.         public string tipo { get; set; }
  57.  
  58.         //foreign key IDCuenta
  59.         public Cuentas IDCuenta { get; set; }
  60.     }
  61.    
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement