コード例 #1
0
 public int GetRowCount(string filter)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         MoveBillMasterDao dao = new MoveBillMasterDao();
         return(dao.GetRowCount(strTableView, filter));
     }
 }
コード例 #2
0
 public DataSet QueryMoveBillMaster(int pageIndex, int pageSize, string filter, string OrderByFields)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         MoveBillMasterDao dao = new MoveBillMasterDao();
         return(dao.Query(strTableView, strPrimaryKey, strQueryFields, pageIndex, pageSize, OrderByFields, filter, strTableView));
     }
 }
コード例 #3
0
        public bool Delete(DataSet dataSet)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                MoveBillMasterDao dao = new MoveBillMasterDao();
                dao.DeleteEntity(dataSet);
                flag = true;
            }
            return(flag);
        }
コード例 #4
0
        /// <summary>
        /// 反向审核,取消货位锁定
        /// </summary>
        /// <param name="BillNo"></param>
        /// <returns></returns>
        public bool Rev_Validate(string BillNo)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                MoveBillMasterDao dao    = new MoveBillMasterDao();
                DataSet           dsTemp = dao.GetData("select * from v_wms_move_billdetail where BILLNO='" + BillNo + "'");
                StringBuilder     sb     = new StringBuilder();
                foreach (DataRow row in dsTemp.Tables[0].Rows)
                {
                    sb.Append(string.Format("update WMS_WH_CELL SET ISLOCKED='0' WHERE CELLCODE IN ('{0}','{1}');", row["OUT_CELLCODE"].ToString(), row["IN_CELLCODE"].ToString()));
                }
                sb.Append(string.Format("update WMS_MOVE_BILLMASTER SET STATUS='1', VALIDATEPERSON='',VALIDATEDATE=null where BILLNO='{0}'", BillNo));
                dao.SetData(sb.ToString());
                flag = true;
            }
            return(flag);
        }
コード例 #5
0
        public bool Insert()
        {
            bool flag = false;

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

                string sql = string.Format("Insert into WMS_MOVE_BILLMASTER (BILLNO,WH_CODE,BILLTYPE,BILLDATE,OPERATEPERSON,STATUS,MEMO) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}')"
                                           , this.BILLNO,
                                           this.WH_CODE,
                                           this.BILLTYPE,
                                           this.BILLDATE.ToString("yyyy-MM-dd"),
                                           this.OPERATEPERSON,
                                           this.STATUS,
                                           this.MEMO);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
コード例 #6
0
        public bool Update()
        {
            bool flag = false;

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

                string sql = string.Format("update WMS_MOVE_BILLMASTER set BILLNO='{1}',WH_CODE='{2}',BILLTYPE='{3}',BILLDATE='{4}',OPERATEPERSON='{5}',STATUS='{6}',MEMO='{7}'  where BILLNO='{1}'"
                                           , this.ID,
                                           this.BILLNO,
                                           this.WH_CODE,
                                           this.BILLTYPE,
                                           this.BILLDATE,
                                           this.OPERATEPERSON,
                                           this.STATUS,
                                           this.MEMO);

                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
コード例 #7
0
 public string GetNewBillNo()
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         MoveBillMasterDao dao = new MoveBillMasterDao();
         DataSet           ds  = dao.GetData(string.Format("select TOP 1 BILLNO FROM WMS_MOVE_BILLMASTER where BILLNO LIKE '{0}%' order by BILLNO DESC", System.DateTime.Now.ToString("yyyyMMdd")));
         if (ds.Tables[0].Rows.Count == 0)
         {
             return(System.DateTime.Now.ToString("yyyyMMdd") + "0001" + "M");
         }
         else
         {
             int i = Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString().Substring(8, 4));
             i++;
             string newcode = i.ToString();
             for (int j = 0; j < 4 - i.ToString().Length; j++)
             {
                 newcode = "0" + newcode;
             }
             return(System.DateTime.Now.ToString("yyyyMMdd") + newcode + "M");
         }
     }
 }