當前位置: 首頁>>代碼示例>>C#>>正文


C# Util.PersistentManager類代碼示例

本文整理匯總了C#中THOK.Util.PersistentManager的典型用法代碼示例。如果您正苦於以下問題:C# PersistentManager類的具體用法?C# PersistentManager怎麽用?C# PersistentManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PersistentManager類屬於THOK.Util命名空間,在下文中一共展示了PersistentManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetMaster

 public DataTable GetMaster(string billType)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         return palletDao.FindMaster(billType);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:PalletDal.cs

示例2: AddBill

        public void AddBill(DataRow masterRow, string userID, DataTable detailTable)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                try
                {
                    pm.BeginTransaction();
                    string billNo = palletDao.FindNewBillNo(masterRow["BILLDATE"].ToString());

                    masterRow["BILLNO"] = billNo;
                    //���뵥������
                    palletDao.InsertMaster(masterRow, userID);

                    //���뵥����ϸ��
                    palletDao.InsertDetail(billNo, detailTable);

                    pm.Commit();
                }
                catch (Exception e)
                {
                    pm.Rollback();
                    throw new Exception(e.Message);
                }
            }
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:25,代碼來源:PalletDal.cs

示例3: GetDetail

 public DataTable GetDetail(string billNo)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         return palletDao.FindDetail(billNo);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:PalletDal.cs

示例4: GetInBill

        /// <summary>
        /// �������������������
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public bool GetInBill(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())
            {
                DownInBillDao dao = new DownInBillDao();
                DataTable emply = dao.FindEmployee(EmployeeCode);
                DataTable inMasterBillNo = this.GetInBillNo();
                string billnolist = UtinString.StringMake(inMasterBillNo, "bill_no");
                billnolist = UtinString.StringMake(billnolist);
                billnolist = string.Format("ORDER_DATE >='{0}' AND ORDER_DATE <='{1}' AND ORDER_ID NOT IN({2})", startDate, endDate, billnolist);
                DataTable masterdt = this.InBillMaster(billnolist);

                string inDetailList = UtinString.StringMake(masterdt, "ORDER_ID");
                inDetailList = UtinString.StringMake(inDetailList);
                inDetailList = "ORDER_ID IN(" + inDetailList + ")";
                DataTable detaildt = this.InBillDetail(inDetailList);

                if (masterdt.Rows.Count > 0 && detaildt.Rows.Count > 0)
                {
                    DataSet masterds = this.InBillMaster(masterdt, emply.Rows[0]["employee_id"].ToString(), wareCode, billtype);

                    DataSet detailds = this.InBillDetail(detaildt);
                    this.Insert(masterds, detailds);
                    tag = true;
                }
                else
                    errorInfo = "û���µ���ⵥ���أ�";
            }
            return tag;
        }
開發者ID:397152971,項目名稱:wms_rfid,代碼行數:39,代碼來源:DownInBillBll.cs

示例5: AddMix

        public int AddMix(string billNo, DataRow newRow)
        {
            int result = 1;
            using (PersistentManager pm = new PersistentManager())
            {
                ProductStateDao psDao = new ProductStateDao();
                try
                {
                    pm.BeginTransaction();
                    result = psDao.UpdateMix(billNo, newRow["MIXID"].ToString(), Convert.ToDouble(newRow["QUANTITY"]));
                    if (result != 1)
                        throw new Exception("����������Ϊ1");

                    result = psDao.UpdateMixID(billNo, newRow["PRODUCTCODE"].ToString(), newRow["ITEMNO"].ToString(), newRow["MIXID"].ToString());
                    if (result != 1)
                        throw new Exception("����������Ϊ1");

                    pm.Commit();
                }
                catch
                {
                    pm.Rollback();
                }
            }
            return result;
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:26,代碼來源:ProductStateDal.cs

示例6: AddBill3

        public void AddBill3(DataRow masterRow, DataTable detailTable)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                try
                {
                    BillDao billDao = new BillDao();
                    ProductStateDao stateDao = new ProductStateDao();

                    pm.BeginTransaction();

                    string billNo = billDao.FindNewBillNo("P", masterRow["BILLDATE"].ToString());

                    masterRow["BILLNO"] = billNo;
                    //���뵥������
                    billDao.InsertMaster(masterRow);

                    stateDao.Insert(billNo, detailTable);
                    pm.Commit();
                }
                catch (Exception e)
                {
                    pm.Rollback();
                    throw new Exception(e.Message);
                }
            }
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:27,代碼來源:BillDal.cs

示例7: GetSortingOrderDate

        //選擇時間下載分揀數據
        public bool GetSortingOrderDate(string startDate, string endDate,string sortingLine,string batch, out string errorInfo)
        {
            bool tag = false;
            errorInfo = string.Empty;
            using (PersistentManager dbpm = new PersistentManager())
            {
                DownSortingInfoDao dao = new DownSortingInfoDao();
                try
                {
                    string sort = string.Empty;
                    if (sortingLine != string.Empty || sortingLine != null)
                    {
                        sort = " AND SORTINGLINECODE='" + sortingLine + "' AND BATCHID='" + batch + "'";
                    }
                    //查詢倉庫7天內的訂單號
                    DataTable orderdt = this.GetOrderId(startDate, endDate);
                    string orderlist = UtinString.MakeString(orderdt, "order_id");
                    string orderlistDate = "ORDERDATE >='" + startDate + "' AND ORDERDATE <='" + endDate + "'" + sort;
                    DataTable masterdt = this.GetSortingOrder(orderlistDate);
                    DataRow[] masterdr = masterdt.Select("ORDERID NOT IN(" + orderlist + ")");

                    string ordermasterlist = UtinString.MakeString(masterdr, "OrderID");
                    ordermasterlist = "OrderID IN (" + ordermasterlist + ")";
                    DataTable detaildt = this.GetSortingOrderDetail(ordermasterlist);
                    if (masterdr.Count() > 0 && detaildt.Rows.Count > 0)
                    {
                        DataSet masterds = this.SaveSortingOrder(masterdr);
                        DataSet detailds = this.SaveSortingOrderDetail(detaildt);
                        this.Insert(masterds, detailds);
                        //上報分揀訂單
                        //upload.uploadSort(masterds, detailds);
                        if (sort != string.Empty)
                        {
                            try
                            {
                                DataTable diapLine = this.GetDispatchLine(ordermasterlist);
                                DataSet dispDs = this.SaveDispatch(diapLine, sortingLine);
                                this.Insert(dispDs);
                                tag = true;
                            }
                            catch (Exception e)
                            {
                                errorInfo = "調度出錯,請手動進行線路調度,出錯原因:" + e.Message;
                            }

                        }
                        else
                            errorInfo = "沒有選擇分揀線!下載完成後,請手動進行線路調度!";
                        //tag = true;
                    }
                    else
                        errorInfo = "沒有可用的數據下載!";
                }
                catch (Exception e)
                {
                    errorInfo = "下載錯誤:" + e.Message;
                }
            }
            return tag;
        }
開發者ID:Guoyingbin,項目名稱:HNXC_WMS,代碼行數:61,代碼來源:DownSortingInfoBll.cs

示例8: SaveCigarette

 internal void SaveCigarette(string cigaretteCode, string classSymbol,string cigaretteName)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         cigaretteDao.Update(cigaretteCode,classSymbol, cigaretteName);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:CigaretteDal.cs

示例9: DeleteCigarette

 internal void DeleteCigarette(string cigaretteCode)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         cigaretteDao.Delete(cigaretteCode);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:CigaretteDal.cs

示例10: GetAll

 public DataTable GetAll()
 {
     using (PersistentManager pm = new PersistentManager())
     {
         return cigaretteDao.Find();
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:CigaretteDal.cs

示例11: CancelTask

        public void CancelTask(string billNo)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                TaskDao taskDao = new TaskDao();
                BillDao billDao = new BillDao();
                CellDao cellDao = new CellDao();

                try
                {
                    pm.BeginTransaction();

                    int count = taskDao.FindExecutingTask(billNo);
                    if (count != 0)
                        throw new Exception("����δִ�л�ִ���е���ҵ��");

                    if (cellDao.Update(billNo) > 0)
                    {
                        taskDao.Backup(billNo);
                        taskDao.Delete(billNo);
                        billDao.UpdateMasterState(billNo, "6");//����Ϊȡ��
                    }
                    else
                        throw new Exception("�õ���ȫ����ҵ�����");

                    pm.Commit();
                }
                catch (Exception e)
                {
                    pm.Rollback();
                    throw new Exception(e.Message);
                }

            }
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:35,代碼來源:TaskDal.cs

示例12: CancelTaskIn

        public void CancelTaskIn(string billNo)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                TaskDao taskDao = new TaskDao();
                BillDao billDao = new BillDao();
                CellDao cellDao = new CellDao();
                ScheduleDao scheduleDao = new ScheduleDao();
                ProductStateDao productStateDao = new ProductStateDao();

                try
                {
                    pm.BeginTransaction();

                    int count = taskDao.FindExecutingTask(billNo);
                    if (count != 0)
                        throw new Exception("����δִ�л�ִ���е���ҵ��");

                    taskDao.Backup(billNo);
                    taskDao.Delete(billNo);
                    billDao.UpdateMasterState(billNo, "6");//����Ϊȡ��
                    productStateDao.Delete(billNo);
                    //�������ⵥ���̰����������������ƻ�ISOUTΪ�����
                    scheduleDao.UpdateIsIn(billNo);

                    pm.Commit();
                }
                catch (Exception e)
                {
                    pm.Rollback();
                    throw new Exception(e.Message);
                }

            }
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:35,代碼來源:TaskDal.cs

示例13: DeleteFormula

        public void DeleteFormula(string formulaCode)
        {
            using (PersistentManager pm = new PersistentManager())
            {
                FormulaDao formulaDao = new FormulaDao();
                ScheduleDao scheduleDao = new ScheduleDao();
                try
                {
                    pm.BeginTransaction();

                    if (scheduleDao.Find(formulaCode) == 0)
                    {
                        formulaDao.DeleteDetail(formulaCode);
                        formulaDao.DeleteMaster(formulaCode);
                    }
                    else
                        throw new Exception("��ǰ�䷽�����������ƻ��Ѱ�");

                    pm.Commit();
                }
                catch (Exception e)
                {
                    pm.Rollback();
                    throw new Exception(e.Message);
                }
            }
        }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:27,代碼來源:FormulaDal.cs

示例14: AddCigarette

 public void AddCigarette(string cigaretteCode,string classSymbol, string cigaretteName)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         cigaretteDao.Insert(cigaretteCode,classSymbol, cigaretteName);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:7,代碼來源:CigaretteDal.cs

示例15: SaveArea

 public void SaveArea(DataRow row)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         AreaDao areaDao = new AreaDao();
         areaDao.Update(row);
     }
 }
開發者ID:SaintLoong,項目名稱:PFK,代碼行數:8,代碼來源:AreaDal.cs


注:本文中的THOK.Util.PersistentManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。