Ejemplo n.º 1
0
 /// <summary>
 /// 根据卷烟编码查询计量单位信息
 /// </summary>
 /// <param name="product"></param>
 /// <returns></returns>
 public DataTable FindUnitListCode(string product)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         return dao.FindUnitListCode(product);
     }
 }
Ejemplo n.º 2
0
 public DataTable GetInBillMasterDateTime(string dateTime)
 {
     using (PersistentManager dbpm = new PersistentManager())
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         return dao.GetInBillMasterDateTime(dateTime);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 删除中间表数据
 /// </summary>
 /// <param name="billno">单号</param>
 public void DeleteMiddleBill(string billno)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         dao.DeleteMiddleBill(billno);
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 根据日期下载入库数据 zxl   2012-09-14 
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public bool GetInBillMiddle(string startDate, string endDate, string EmployeeCode, string wareCode, string billtype, out string errorInfo)
        {
            bool tag = false;
            Employee = EmployeeCode;
            errorInfo = string.Empty;
            using (PersistentManager pm = new PersistentManager())
            {
                try
                {
                    DownDecidePlanDao dao = new DownDecidePlanDao();
                    DataTable emply = dao.FindEmployee(EmployeeCode);
                    DataTable inMasterBillNo = this.GetMiddleBillNo();
                    string billnolist = UtinString.MakeString(inMasterBillNo, "bill_no");
                    billnolist = string.Format("BB_INPUT_DATE >='{0}' AND BB_UUID NOT IN({1})", startDate, billnolist);
                    DataTable masterdt = this.GetMiddleInBillMaster(billnolist);

                    string inDetailList = UtinString.MakeString(masterdt, "BILL_NO");
                    inDetailList = "BD_BB_UUID IN(" + inDetailList + ")";
                    DataTable detaildt = this.GetMiddleInBillDetail(inDetailList);

                    if (masterdt.Rows.Count > 0 && detaildt.Rows.Count > 0)
                    {
                        try
                        {
                            DataSet middleds = this.MiddleTable(masterdt);
                            DataSet masterds = this.MiddleInBillMaster(masterdt, emply.Rows[0]["employee_id"].ToString(), wareCode, billtype);
                            DataSet detailds = this.MiddleInBillDetail(detaildt);
                            this.Insert(masterds, detailds, middleds);
                            tag = true;
                        }
                        catch (Exception e)
                        {
                            errorInfo = "保存错误:" + e.Message;
                        }
                    }
                    else
                        errorInfo = "没有新的入库单下载!";
                }
                catch (Exception ex)
                {
                    errorInfo ="下载入库数据失败!原因:"+ ex.Message;
                }
            }
            return tag;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 把查询的数据添加到仓储数据库
        /// </summary>
        /// <param name="middleds"></param>
        /// <param name="detailds"></param>
        public void InsertMiddle(DataSet middleds)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                DownDecidePlanDao dao = new DownDecidePlanDao();

            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 把查询的数据添加到仓储数据库
 /// </summary>
 /// <param name="masterds"></param>
 /// <param name="detailds"></param>
 public void Insert(DataSet masterds, DataSet detailds, DataSet middleds)
 {
     try
     {
         using (PersistentManager pm = new PersistentManager())
         {
             DownDecidePlanDao dao = new DownDecidePlanDao();
             if (masterds.Tables["WMS_IN_BILLMASTER"].Rows.Count > 0)
             {
                 dao.InsertInBillMaster(masterds);
             }
             if (detailds.Tables["WMS_IN_BILLDETAIL"].Rows.Count > 0)
             {
                 dao.InsertInBillDetail(detailds);
             }
             if (middleds.Tables["WMS_MIDDLE_IN_BILLDETAIL"].Rows.Count > 0)
             {
                 dao.InsertMiddle(middleds);
             }
         }
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 下载入库单主表数据zxl   2012-09-14 
 /// </summary>
 /// <returns></returns>
 public DataTable GetMiddleInBillMaster(string inBillNoList)
 {
     using (PersistentManager dbpm = new PersistentManager("ZYJCConnection"))
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         dao.SetPersistentManager(dbpm);
         return dao.GetMiddleInBillMaster(inBillNoList);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 查询数字仓储中间表4天内入库单 zxl   2012-09-14 
 /// </summary>
 /// <returns></returns>
 public DataTable GetMiddleBillNo()
 {
     using (PersistentManager pm = new PersistentManager())
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         return dao.GetMiddleBillNo();
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 下载入库单明细表数据zxl   2012-09-14 
 /// </summary>
 /// <returns></returns>
 public DataTable GetMiddleInBillDetail(string inBillNoList)
 {
     using (PersistentManager dbpm = new PersistentManager())
     {
         DownDecidePlanDao dao = new DownDecidePlanDao();
         return dao.GetMiddleInBillDetail(inBillNoList);
     }
 }