public static void Delete(ZtPinTuo entity) { string sql = string.Empty; sql = "delete from ztpintuo where tph='" + entity.Tph + "'"; SqliteDbFactory.GetSqliteDbOperator().ExecuteNonQuery(sql); }
public static bool CheckExists(ZtPinTuo entity) { string sql = string.Empty; sql = "select * from ztpintuo where tph='" + entity.Tph + "'"; DataTable dt = SqliteDbFactory.GetSqliteDbOperator().SelectFromSql(sql); return dt != null && dt.Rows.Count == 1; }
/* create table ztpintuo(id integer primary key autoincrement, * tph varchar(20),ytph varchar(20),scaner varchar(30), * scantime datetime); */ public static void Save(ZtPinTuo entity) { string sql = string.Empty; sql = "insert into ztpintuo(tph,ytph,scaner,scantime) values('" + entity.Tph + "','" + entity.Ytph + "','" + entity.Scaner + "','" + System.DateTime.Now.ToString("s") + "')"; SqliteDbFactory.GetSqliteDbOperator().ExecuteNonQuery(sql); }
public static bool CheckExists(ZtPinTuo entity) { string sql = string.Empty; sql = "select * from ztpintuo where tph='" + entity.Tph + "'"; DataTable dt = SqliteDbFactory.GetSqliteDbOperator().SelectFromSql(sql); return(dt != null && dt.Rows.Count == 1); }
private ZtPinTuo ComputeData() { ZtPinTuo entity = new ZtPinTuo(); entity.Tph = this.txt_TrayNo.Text.Trim(); entity.Ytph = this.txt_OldTrayNo.Text.Trim(); entity.Scaner = Program.UserID; entity.date = System.DateTime.Now; return entity; }
/* * create table ztpintuo(id integer primary key autoincrement, * tph varchar(20),ytph varchar(20),scaner varchar(30), * scantime datetime); */ public static void Save(ZtPinTuo entity) { string sql = string.Empty; sql = "insert into ztpintuo(tph,ytph,scaner,scantime) values('" + entity.Tph + "','" + entity.Ytph + "','" + entity.Scaner + "','" + System.DateTime.Now.ToString("s") + "')"; SqliteDbFactory.GetSqliteDbOperator().ExecuteNonQuery(sql); }