Esempio n. 1
0
        public void HandleRMA(RMAInfo rmaInfo,SessionInfo sInfo)
        {
            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                if(this.GetRMACurrentStatus(rmaInfo.SysNo)!=(int)AppEnum.RMAStatus.Received)
                    throw new BizException("This rma sheet is not received now,can't be handled");
                Hashtable paramHash = new Hashtable(4);
                paramHash.Add("Status",rmaInfo.Status);
                paramHash.Add("RMATime",rmaInfo.RMATime);
                paramHash.Add("RMAUserSysNo",rmaInfo.RMAUserSysNo);
                paramHash.Add("SysNo",rmaInfo.SysNo);
                this.UpdateRMAMaster(paramHash);
                //������˻����͵���Ʒ���Զ������˻���
                foreach(RMAItemInfo rmaItem in rmaInfo.ItemHash.Values)
                {
                    if(rmaItem.RMAType==(int)AppEnum.RMAType.Return)
                    {
                        ROInfo roInfo = ROManager.GetInstance().BuildROFromRMA(rmaInfo);
                        ROManager.GetInstance().AddRO(roInfo);
                        LogManager.GetInstance().Write(new LogInfo(roInfo.SysNo,(int)AppEnum.LogType.Sale_RO_Create,sInfo));
                        break;
                    }
                }
                LogManager.GetInstance().Write(new LogInfo(rmaInfo.SysNo,(int)AppEnum.LogType.Sale_RMA_Handle,sInfo));
                scope.Complete();
            }
        }
Esempio n. 2
0
        public void CancelHandleRMA(RMAInfo rmaInfo,SessionInfo sInfo)
        {
            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                if(this.GetRMACurrentStatus(rmaInfo.SysNo)!=(int)AppEnum.RMAStatus.Handled)
                    throw new BizException("This rma sheet is not handled now,can't cancel handle");
                //��������˻�����������
                ROInfo roInfo = ROManager.GetInstance().LoadROfromRMA(rmaInfo.SysNo);
                if(roInfo!=null)
                {
                    ROManager.GetInstance().AbandonRO(roInfo);
                    LogManager.GetInstance().Write(new LogInfo(roInfo.SysNo,(int)AppEnum.LogType.Sale_RO_Abandon,sInfo));
                }
                Hashtable paramHash = new Hashtable(4);
                paramHash.Add("Status",rmaInfo.Status);
                paramHash.Add("RMATime",rmaInfo.RMATime);
                paramHash.Add("RMAUserSysNo",rmaInfo.RMAUserSysNo);
                paramHash.Add("SysNo",rmaInfo.SysNo);
                this.UpdateRMAMaster(paramHash);
                LogManager.GetInstance().Write(new LogInfo(rmaInfo.SysNo,(int)AppEnum.LogType.Sale_RMA_CancelHandle,sInfo));
                scope.Complete();
            }
        }
Esempio n. 3
0
File: LogInfo.cs Progetto: ue96/ue96
 public LogInfo(int paramTicketSysno, int paramTicketType, SessionInfo oSessionInfo)
     : this(oSessionInfo)
 {
     _ticketsysno = paramTicketSysno;
     _tickettype = paramTicketType;
 }
Esempio n. 4
0
File: LogInfo.cs Progetto: ue96/ue96
 public LogInfo(int paramTicketSysno, int paramTicketType, string paramNote, SessionInfo oSessionInfo)
     : this(paramTicketSysno, paramTicketType,oSessionInfo)
 {
     _note = paramNote;
 }
Esempio n. 5
0
File: LogInfo.cs Progetto: ue96/ue96
 public LogInfo(SessionInfo oSessionInfo)
 {
     Init();
     _optip = oSessionInfo.IpAddress;
     _optusersysno = oSessionInfo.User.SysNo;
 }