public DataSet QueryWarehouseByCode(string wh_code) { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseDao dao = new WarehouseDao(); string sql = string.Format("SELECT * FROM V_WMS_WAREHOUSE where wh_code='{0}'", wh_code); return(dao.GetData(sql)); } }
//private string strPrimaryKey = "WH_ID"; //private string strOrderByFields = "ExceptionalLogID ASC"; //private string strQueryFields = "*"; public DataSet QueryAllWarehouse() { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseDao dao = new WarehouseDao(); string sql = string.Format("SELECT * FROM V_WMS_WAREHOUSE order by wh_code"); return(dao.GetData(sql)); } }
public bool DeleteStorage() { bool flag = false; using (PersistentManager pm = new PersistentManager()) { string cellcode = this.CELLCODE.Substring(7, 15); WarehouseDao dao = new WarehouseDao(); string sql = string.Format("delete from DWV_IBAS_STORAGE where STORAGE_CODE='{0}'", cellcode); dao.GetData(sql); flag = true; } return(flag); }
public bool UpdateStorage() { bool flag = false; using (PersistentManager om = new PersistentManager()) { //string cellcode = this.CELLCODE.Substring(7, 15); string cellcode = this.CELLCODE.Substring(4, 2) + this.CELLCODE.Substring(7, 3) + this.CELLCODE.Substring(11, 2) + this.CELLCODE.Substring(14, 1); WarehouseDao dao = new WarehouseDao(); string sql = string.Format("update DWV_IBAS_STORAGE set STORAGE_NAME='{0}',UPDATE_DATE='{1}',ISACTIVE='{2}' where STORAGE_CODE='{3}'", this.CELLNAME, DateTime.Now.ToString(), this.ISACTIVE, cellcode); dao.GetData(sql); flag = true; } return(flag); }