Ejemplo n.º 1
0
 /*
 create table antuoyiku(id integer primary key autoincrement,
  * tph varchar(20),mdkw varchar(20),scaner varchar(30),
  * scantime datetime);
    */
 public static void Save(AnTuoYiKu entity)
 {
     string sql = string.Empty;
     sql = "insert into antuoyiku(tph,mdkw,scaner,scantime) values('" +
         entity.Tph + "','" + entity.Mdkw + "','" + entity.Scaner + "','" +
         System.DateTime.Now.ToString("s")
         + "')";
     SqliteDbFactory.GetSqliteDbOperator().ExecuteNonQuery(sql);
 }
Ejemplo n.º 2
0
        public static bool CheckExists(AnTuoYiKu entity)
        {
            string sql = string.Empty;
            sql = "select * from antuoyiku where tph='" +
                 entity.Tph + "'";
            DataTable dt = SqliteDbFactory.GetSqliteDbOperator().SelectFromSql(sql);

            return dt != null && dt.Rows.Count == 1;
        }
Ejemplo n.º 3
0
 private AnTuoYiKu ComputeData()
 {
     AnTuoYiKu entity = new AnTuoYiKu();
     entity.Mdkw = this.txt_NewLoc.Text.Trim();
     entity.Tph = this.txt_TrayNo.Text.Trim();
     entity.Scaner = Program.UserID;
     entity.date = System.DateTime.Now;
     return entity;
 }
Ejemplo n.º 4
0
 public static void Delete(AnTuoYiKu entity)
 {
     string sql = string.Empty;
     sql = "delete from antuoyiku where tph='" + entity.Tph+ "'";
     SqliteDbFactory.GetSqliteDbOperator().ExecuteNonQuery(sql);
 }