Example #1
0
 public static DLManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new DLManager();
     }
     return _instance;
 }
Example #2
0
 public static DLManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new DLManager();
     }
     return(_instance);
 }
Example #3
0
        public void AddItemRelated(int sysno, int freightUserSysNo, DLItemInfo dlItem, int DLItemType, int updateUser)
        {
            TransactionOptions options = new TransactionOptions();

            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout        = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                Hashtable ht = new Hashtable();
                ht.Add("SysNo", sysno);
                ht.Add("FreightUserSysNo", freightUserSysNo);
                ht.Add("SetDeliveryManTime", DateTime.Now);
                ht.Add("DLSysNo", dlItem.DLSysNo);


                if (DLItemType == (int)AppEnum.DLItemType.SaleOrder)
                {
                    SaleManager.GetInstance().UpdateSOMaster(ht);
                }
                else if (DLItemType == (int)AppEnum.DLItemType.RMARequest)
                {
                    RMARequestManager.GetInstance().SetDeliveryMen(ht);
                }
                else if (DLItemType == (int)AppEnum.DLItemType.RMARevert)
                {
                    RMARevertManager.GetInstance().SetDeliveryMen(ht);
                }
                else if (DLItemType == (int)AppEnum.DLItemType.RMAOutbound)
                {
                    RMAOutBoundManager.GetInstance().SetDeliveryMen(ht);
                }
                else if (DLItemType == (int)AppEnum.DLItemType.RMASendAccessory)
                {
                    RMASendAccessoryManager.GetInstance().SetDeliveryMen(ht);
                }
                else if (DLItemType == (int)AppEnum.DLItemType.StShift)
                {
                    ShiftManager.GetInstance().UpdateShiftMaster(ht);
                }

                DeliveryManSetListInfo oInfo = new DeliveryManSetListInfo();
                oInfo.ItemID           = dlItem.ItemID;
                oInfo.SetUserSysNo     = updateUser;
                oInfo.FreightUserSysNo = freightUserSysNo;
                oInfo.CreateTime       = DateTime.Now;
                oInfo.DLSysNo          = dlItem.DLSysNo;
                DeliveryManager.GetInstance().InsertDeliveryMenSetList(oInfo);


                DLManager.GetInstance().AddNewDLItem(dlItem);

                scope.Complete();
            }
        }