예제 #1
0
        public bool Insert()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                WarehouseShelfDao dao = new WarehouseShelfDao();

                string sql = string.Format("Insert into WMS_WH_SHELF (WH_CODE,AREACODE,SHELFCODE,SHELFNAME,CELLROWS,CELLCOLS,IMG_X,IMG_Y,ISACTIVE,MEMO,AREATYPE) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}')"
                                           , this.WH_CODE,
                                           this.AREACODE,
                                           this.SHELFCODE,
                                           this.SHELFNAME,
                                           this.CELLROWS,
                                           this.CELLCOLS,
                                           this.IMG_X,
                                           this.IMG_Y,
                                           this.ISACTIVE,
                                           this.MEMO,
                                           this.AREATYPE);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
예제 #2
0
        public bool Update()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                WarehouseShelfDao dao = new WarehouseShelfDao();

                string sql = string.Format("update WMS_WH_SHELF set WH_CODE='{1}',AREACODE='{2}',SHELFCODE='{3}',SHELFNAME='{4}',CELLROWS='{5}',CELLCOLS='{6}',IMG_X='{7}',IMG_Y='{8}',ISACTIVE='{9}',MEMO='{10}',AREATYPE='{11}'  where SHELF_ID='{0}'"
                                           , this.SHELF_ID,
                                           this.WH_CODE,
                                           this.AREACODE,
                                           this.SHELFCODE,
                                           this.SHELFNAME,
                                           this.CELLROWS,
                                           this.CELLCOLS,
                                           this.IMG_X,
                                           this.IMG_Y,
                                           this.ISACTIVE,
                                           this.MEMO,
                                           this.AREATYPE);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
예제 #3
0
 public string GetNewShelfCode(string AreaCode)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         WarehouseShelfDao dao = new WarehouseShelfDao();
         return(dao.GetNewShelfCode(AreaCode));
     }
 }
예제 #4
0
        //public DataSet QueryWarehouseShelf(string filter)
        //{
        //    using (PersistentManager persistentManager = new PersistentManager())
        //    {
        //        WarehouseShelfDao dao = new WarehouseShelfDao();
        //        string sql = string.Format("SELECT * FROM WMS_WH_SHELF where {0}  ORDER BY AREACODE,SHELFCODE",filter);
        //        return dao.GetData(sql);
        //    }
        //}

        public int GetRowCount(string filter)
        {
            using (PersistentManager persistentManager = new PersistentManager())
            {
                WarehouseShelfDao dao = new WarehouseShelfDao();
                return(dao.GetRowCount(strTableView, filter));
            }
        }
예제 #5
0
 public DataSet QueryShelfByID(int ShelfID)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         WarehouseShelfDao dao = new WarehouseShelfDao();
         string            sql = string.Format("SELECT * FROM WMS_WH_SHELF WHERE SHELF_ID='{0}'  ORDER BY AREACODE,SHELFCODE", ShelfID);
         return(dao.GetData(sql));
     }
 }
예제 #6
0
 public DataSet QueryShelfByWHCODE(string whcode)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         WarehouseShelfDao dao = new WarehouseShelfDao();
         string            sql = string.Format("SELECT * FROM WMS_WH_SHELF where WH_CODE='{0}'  ORDER BY AREACODE,SHELFCODE", whcode);
         return(dao.GetData(sql));
     }
 }
예제 #7
0
 //private string strPrimaryKey = "";
 //private string strOrderByFields = "ExceptionalLogID ASC";
 //private string strQueryFields = "";
 public DataSet QueryAllShelf()
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         WarehouseShelfDao dao = new WarehouseShelfDao();
         string            sql = string.Format("SELECT * FROM WMS_WH_SHELF  ORDER BY AREACODE,SHELFCODE");
         return(dao.GetData(sql));
     }
 }
예제 #8
0
        public bool Delete(int ShelfID)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                WarehouseShelfDao dao = new WarehouseShelfDao();
                string            sql = string.Format("delete from WMS_WH_SHELF WHERE SHELF_ID={0}", ShelfID);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }