示例#1
0
 public int GetRowCount(string filter)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
         return(dao.GetRowCount(strTableView, filter));
     }
 }
示例#2
0
 public DataSet QueryDeliveryBillMaster(int pageIndex, int pageSize, string filter, string OrderByFields)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
         return(dao.Query(strTableView, strPrimaryKey, strQueryFields, pageIndex, pageSize, OrderByFields, filter, strTableView));
     }
 }
示例#3
0
 public DataSet QueryByBillNo(string BillNo)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
         string sql = string.Format("select {0} from {1} WHERE BILLNO='{2}'", strQueryFields, strTableView, BillNo);
         return(dao.GetData(sql));
     }
 }
示例#4
0
        public bool Delete(DataSet dataSet)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                dao.DeleteEntity(dataSet);
                flag = true;
            }
            return(flag);
        }
示例#5
0
        /// <summary>
        /// 取消分配确认
        /// </summary>
        /// <param name="BillNo"></param>
        /// <returns></returns>
        public bool Rev_ConAllotment(string BillNo)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("update WMS_OUT_BILLMASTER SET STATUS='3' where BILLNO='{0}'", BillNo);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
示例#6
0
        /// <summary>
        /// 反向审核
        /// </summary>
        /// <param name="BillNo"></param>
        /// <returns></returns>
        public bool Rev_Validate(string BillNo)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("update WMS_OUT_BILLMASTER SET STATUS='1', VALIDATEPERSON='',VALIDATEDATE=null where BILLNO='{0}'", BillNo);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
示例#7
0
        /// <summary>
        /// 审核通过
        /// </summary>
        /// <param name="BillNo"></param>
        /// <param name="EmployeeCode"></param>
        /// <returns></returns>
        public bool Validate(string BillNo, string EmployeeCode)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("update WMS_OUT_BILLMASTER SET STATUS='2', VALIDATEPERSON='{0}',VALIDATEDATE='{1}' WHERE BILLNO='{2}'", EmployeeCode, System.DateTime.Now.ToString("yyyy-MM-dd"), BillNo);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
示例#8
0
        /// <summary>
        /// 更新已经执行分配的入库单状态
        /// </summary>
        /// <param name="BillNo"></param>
        /// <returns></returns>
        public bool UpdateAlloted(string BillNo, string EmployeeCode)
        {
            string[] aryBillNo  = BillNo.Split(',');
            string   BillNoList = "''";

            for (int i = 0; i < aryBillNo.Length; i++)
            {
                BillNoList += ",'" + aryBillNo[i] + "'";
            }
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("update WMS_OUT_BILLMASTER SET STATUS='3' where BILLNO in ({0}) ", BillNoList);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
示例#9
0
        public bool Update()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("update WMS_OUT_BILLMASTER set BILLDATE='{1}',BILLTYPE='{2}',WH_CODE='{3}',OPERATEPERSON='{4}',STATUS='{5}',MEMO='{6}'  where BILLNO='{0}'"
                                           , this.BILLNO,
                                           this.BILLDATE.ToString("yyyy-MM-dd HH:mm"),
                                           this.BILLTYPE,
                                           this.WH_CODE,
                                           this.OPERATEPERSON,
                                           this.STATUS,
                                           this.MEMO);
                dao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
示例#10
0
        public bool Insert()
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                DeliveryBillMasterDao dao = new DeliveryBillMasterDao();
                string sql = string.Format("Insert into WMS_OUT_BILLMASTER (BILLNO,BILLDATE,BILLTYPE,WH_CODE,OPERATEPERSON,STATUS,MEMO) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}')"
                                           , this.BILLNO,
                                           this.BILLDATE.ToString("yyyy-MM-dd HH:mm"),
                                           this.BILLTYPE,
                                           this.WH_CODE,
                                           this.OPERATEPERSON,
                                           this.STATUS,
                                           this.MEMO);

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