Exemplo n.º 1
0
        /// <summary>
        /// ����rma��
        /// </summary>
        /// <param name="rmaInfo"></param>
        public void AddRMA(RMARequestInfo rmaInfo)
        {
            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                rmaInfo.SysNo = SequenceDac.GetInstance().Create("RMA_Request_Sequence");
                rmaInfo.RequestID = this.BuildRMAID(rmaInfo.SysNo);
                rmaInfo.Status = (int)AppEnum.RMAStatus.Origin;
                this.InsertRequest(rmaInfo);
                foreach (RMARegisterInfo rmaItem in rmaInfo.ItemHash.Values)
                {
                    rmaItem.SysNo = SequenceDac.GetInstance().Create("RMA_Register_Sequence");
                    rmaItem.Status = (int)AppEnum.RMARequestStatus.Orgin;
                    rmaItem.OwnBy = (int)AppEnum.RMAOwnBy.Origin;
                    rmaItem.Location = (int)AppEnum.RMALocation.Origin;
                    RMARegisterManager.GetInstance().InsertRegister(rmaItem);
                    RMARequestItemInfo rmaiteminfo = new RMARequestItemInfo();
                    rmaiteminfo.RegisterSysNo = rmaItem.SysNo;
                    rmaiteminfo.RequestSysNo = rmaInfo.SysNo;
                    this.InsertRequestItem(rmaiteminfo);
                }

                scope.Complete();
            }
            //SendMail(rmaInfo);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Insert Request
 /// </summary>
 /// <param name="oInfo"></param>
 public void InsertRequest(RMARequestInfo oInfo)
 {
     new RMARequestDac().InsertRequest(oInfo);
 }
Exemplo n.º 3
0
        public RMARequestInfo BuildRMAfromSO(int soSysNo)
        {
            //			if(!this.IfExistOpenedRMA(soSysNo))
            //			{
            RMARequestInfo rmaInfo = new RMARequestInfo();
            SOInfo soInfo = SaleManager.GetInstance().LoadSO(soSysNo);
            if (soInfo.PositiveSOSysNo != AppConst.IntNull)
                throw new BizException("��SOΪ����ȡ������ĸ����۵���RMA����ʧ�ܣ�");
            if (soInfo != null && soInfo.Status == (int)AppEnum.SOStatus.OutStock)
            {
                rmaInfo.SOSysNo = soInfo.SysNo;
                rmaInfo.CustomerSysNo = soInfo.CustomerSysNo;
                CustomerInfo oCustomer = CustomerManager.GetInstance().Load(soInfo.CustomerSysNo);
                rmaInfo.Address = soInfo.ReceiveAddress != AppConst.StringNull ? soInfo.ReceiveAddress : (oCustomer.ReceiveAddress != AppConst.StringNull ? oCustomer.ReceiveAddress : (oCustomer.DwellAddress != AppConst.StringNull ? oCustomer.DwellAddress : "��"));
                rmaInfo.Contact = soInfo.ReceiveContact != AppConst.StringNull ? soInfo.ReceiveContact : (oCustomer.ReceiveContact != AppConst.StringNull ? oCustomer.ReceiveContact : (oCustomer.CustomerName != AppConst.StringNull ? oCustomer.CustomerName : "��"));
                rmaInfo.CreateTime = DateTime.Now;
                if (soInfo.ReceivePhone != AppConst.StringNull)
                    rmaInfo.Phone = soInfo.ReceivePhone;
                if (soInfo.ReceiveCellPhone != AppConst.StringNull)
                    rmaInfo.Phone += "  " + soInfo.ReceiveCellPhone;
                //rmaInfo.Phone = soInfo.ReceivePhone != AppConst.StringNull ? soInfo.ReceivePhone : (oCustomer.ReceiveCellPhone != AppConst.StringNull ? oCustomer.ReceiveCellPhone : (oCustomer.ReceivePhone != AppConst.StringNull ? oCustomer.ReceivePhone : (oCustomer.CellPhone != AppConst.StringNull ? oCustomer.CellPhone : (oCustomer.Phone != AppConst.StringNull ? oCustomer.Phone : "��"))));

                rmaInfo.AreaSysNo = soInfo.ReceiveAreaSysNo;   //this AreaSysNo field is added lastest.
                rmaInfo.Zip = soInfo.ReceiveZip;

                if (soInfo.ItemHash.Count > 0)
                {
                    int j = 0;
                    foreach (SOItemInfo soItem in soInfo.ItemHash.Values)
                    {
                        if (soItem.ProductType == (int)AppEnum.SOItemType.Promotion)
                            continue;  //�����ų��Ż�ȯ��

                        if (soItem.Quantity > 0)
                        {
                            Hashtable htTemp = new Hashtable(1);
                            htTemp.Add("SOItemSysNo",soItem.SysNo.ToString());
                            DataSet dsTemp = SaleManager.GetInstance().GetSOProductIDSysNoList(htTemp);

                            int rowCount = 0;
                            if(Util.HasMoreRow(dsTemp))
                                rowCount = dsTemp.Tables[0].Rows.Count;

                            for (int i = 1; i <= soItem.Quantity; i++)
                            {
                                RMARegisterInfo rmaItem = new RMARegisterInfo();
                                rmaItem.ProductSysNo = soItem.ProductSysNo;
                                rmaItem.RequestType = (int)AppEnum.RMARequestType.Maintain;

                                if (i <= rowCount)
                                {
                                    int POSysNo = Util.TrimIntNull(dsTemp.Tables[0].Rows[i-1]["posysno"].ToString());
                                    int ProductIDSysNo = Util.TrimIntNull(dsTemp.Tables[0].Rows[i - 1]["ProductIDSysNo"]);
                                    rmaItem.ProductIDSysNo = ProductIDSysNo;

                                    if (POSysNo > 0)
                                    {
                                        rmaItem.SOItemPODesc = "�ɹ�����:<a href=\"javascript:openWindowS2('../Purchase/POSheet.aspx?sysno=" + POSysNo + "&opt=view')" + "\" >" + POSysNo + "</a><br>";
                                    }
                                    else if (ProductIDSysNo > 0)
                                    {
                                        rmaItem.SOItemPODesc = "��Ʒ���к�:<a href=\"javascript:openWindowS2('../Basic/ProductID.aspx?sysno=" + ProductIDSysNo + "')" + "\" >" + ProductIDSysNo + "</a><br>";
                                    }
                                }
                                rmaInfo.ItemHash.Add(j, rmaItem);
                                j = j + 1;
                            }
                        }
                    }
                }
            }
            else
                rmaInfo = null;
            return rmaInfo;
            //			}
            //			else
            //				throw new BizException("�����۵��Ѿ�����һ�ű��޵��ڴ����У�������������ύ�µı������룬����ϵORS�̳ǿͷ�");
        }
Exemplo n.º 4
0
        public string CheckSO(RMARequestInfo oInfo)
        {
            //�Ƿ��Ѵ��ڸ�SO�и���Ʒ��RMA��
            //ע�⣺���ǵ�SO�ж����Ʒ��������ж��Ѵ��ڵ���RMA�������Ʒ���������С��SO����Ʒ���������Ծɿ������RMA����
            string result = AppConst.StringNull;
            foreach (RMARegisterInfo oRegister in oInfo.ItemHash.Values)
            {
                string sql = @"select count(*) as rmaqty
                               from  rma_request (NOLOCK)
                               inner join rma_request_item (NOLOCK) on rma_request.sysno = rma_request_item.requestsysno
                               inner join rma_register (NOLOCK) on rma_register.sysno = rma_request_item.registersysno
                               where rma_request.sosysno = " + oInfo.SOSysNo + " and rma_register.productsysno=" + oRegister.ProductSysNo
                    + " and (rma_register.status = " + (int)AppEnum.RMARequestStatus.Orgin + " or rma_register.status = " + (int)AppEnum.RMARequestStatus.Handling + ")";

                DataSet ds = SqlHelper.ExecuteDataSet(sql);
                DataRow dr = ds.Tables[0].Rows[0];

                int rmaqty = Util.TrimIntNull(dr["rmaqty"]);
                string sqlso = @"select quantity
                                 from v_so_item (NOLOCK)
                                 where v_so_item.sosysno = " + oInfo.SOSysNo + " and productsysno=" + oRegister.ProductSysNo;
                DataSet dsso = SqlHelper.ExecuteDataSet(sqlso);

                int soqty = 0;
                if (Util.HasMoreRow(dsso))
                {
                    DataRow drso = dsso.Tables[0].Rows[0];
                    soqty = Util.TrimIntNull(drso["quantity"]);
                }

                if (rmaqty >= soqty)
                {
                    ProductBasicInfo oProduct = ProductManager.GetInstance().LoadBasic(oRegister.ProductSysNo);
                    if (result != AppConst.StringNull)
                        result += "<br>";
                    result += oProduct.ProductName + "(" + oProduct.ProductID + ")";
                }
            }
            return result;
        }
Exemplo n.º 5
0
        private RMARequestInfo MapRequest(DataRow dr)
        {
            RMARequestInfo oInfo = new RMARequestInfo();
            oInfo.Address = dr["Address"].ToString();
            oInfo.Contact = dr["Contact"].ToString();
            oInfo.CreateTime = Util.TrimDateNull(dr["CreateTime"]);
            oInfo.CreateUserSysNo = Util.TrimIntNull(dr["CreateUserSysNo"]);
            oInfo.CanDoorGet = Util.TrimIntNull(dr["CanDoorGet"]);
            oInfo.DoorGetFee = Util.TrimDecimalNull(dr["DoorGetFee"]);
            oInfo.CustomerSysNo = Util.TrimIntNull(dr["CustomerSysNo"]);
            oInfo.Memo = dr["Memo"].ToString();
            oInfo.Note = dr["Note"].ToString();
            oInfo.Phone = dr["Phone"].ToString();
            oInfo.RecvTime = Util.TrimDateNull(dr["RecvTime"]);
            oInfo.RecvUserSysNo = Util.TrimIntNull(dr["RecvUserSysNo"]);
            oInfo.RequestID = dr["RequestID"].ToString();
            oInfo.SOSysNo = Util.TrimIntNull(dr["SOSysNo"]);
            oInfo.Status = Util.TrimIntNull(dr["Status"]);
            oInfo.SysNo = Util.TrimIntNull(dr["SysNo"]);
            oInfo.ETakeDate = Util.TrimDateNull(dr["ETakeDate"]);
            oInfo.AreaSysNo = Util.TrimIntNull(dr["AreaSysNo"]);

            oInfo.FreightUserSysNo = Util.TrimIntNull(dr["FreightUserSysNo"]);
            oInfo.SetDeliveryManTime = Util.TrimDateNull(dr["SetDeliveryManTime"]);

            oInfo.IsRevertAddress = Util.TrimIntNull(dr["IsRevertAddress"]);
            oInfo.RevertAddress = Util.TrimNull(dr["RevertAddress"]);
            oInfo.RevertAreaSysNo = Util.TrimIntNull(dr["RevertAreaSysNo"]);
            oInfo.RevertZip = Util.TrimNull(dr["RevertZiP"]);

            oInfo.Zip = Util.TrimNull(dr["Zip"]);
            oInfo.RevertContact = Util.TrimNull(dr["RevertContact"]);
            oInfo.RevertContactPhone = Util.TrimNull(dr["RevertContactPhone"]);
            oInfo.ReceiveType = Util.TrimIntNull(dr["ReceiveType"]);
            return oInfo;
        }
Exemplo n.º 6
0
        /// <summary>
        /// SendMail to customer when a rma request order is created successfully
        /// </summary>
        /// <param name="sysno"></param>
        /// <returns></returns>
        public void SendMail(RMARequestInfo rmaInfo)
        {
            //get mail information
            string mailaddress;
            string mailsubject;
            string mailbodyinfo;

            string requestId;
            int sosysno;
            string strSOID;

            string requestInfo;
            string allRequestInfo = null;

            CustomerInfo oCustomer = new CustomerInfo();
            oCustomer = CustomerManager.GetInstance().Load(rmaInfo.CustomerSysNo);
            if (Util.TrimNull(oCustomer.Email) == AppConst.StringNull)
                return;

            mailaddress = oCustomer.Email;

            requestId = rmaInfo.RequestID.ToString();

            sosysno = Util.TrimIntNull(rmaInfo.SOSysNo);
            strSOID = GetSOIDFromSOMaster(sosysno);

            mailsubject = "���ѳɹ����뷵�޵�" + requestId + " ";

            mailbodyinfo = @"<span style='font-size:12.0pt;font-family:����Ҧ��'>�𾴵�ORS�̳����û���<br>
                                        <br>
                                        ���ã�
                                        <br>
                                        <br>
                                        ���ѳɹ�������������RMA��������@requestID������������Ʒʱ��������Ӧ��Ʒ�ķ�Ʊ����ӡ����Ч����ͬʱ��֤��Ʒ����������ԭ���İ�װ��û��ֲᣬ�������ɳ����ṩ��һ�и����������Ʒijһ���ֶ�ʧ���򲻷���ORS�̳ǵı������������ȫ���з�Ʊ������֮ǰ�������޷�����Ʒ�ͽ����ҽ��б��ޡ�ORS�̳����޷��е��û����ĸ�����Ʊ�������ķ��ã����ڲ�Ʒ��ȫ����ɵı�������ORS�̳������е����Ρ�
                                        <br><br>
                                        RMA ��������ϸĿ¼<br>
                                        <br>
                                        �����ţ� SO @SOID��<br> @allRequestInfo
                                        <br>
                                        ����ѡ���ޣ���ORS�̳���ɱ��޹��̺���ԭ�����ĵ�ַ����������
                                        �����ĵ�ַ�б䶯���뼰ʱ�����ǵĿͷ����� 400-820-1878
                                        ȡ����ϵ���·�����ַ�����ַδ��ʱ�ĸ��¶����µ�����Ⱥ����ORS�̳����Ų�����<br>
                                                                                <br>

                                        ������ʱ�Ľ����������ʾ���ͨ����*��������ʽ����ORS�̳�����������ͨ��������**��ORS�̳Ǹ������ǻ����յ������Ի��ֵ���ʽ���ʼķ��ô�������ORS�̳������ʻ��С�<br>
                                                                                *
                                        ��ָƽ�ʰ�����ʽ�����ǿ�ݰ�����EMS������ͻ������������䷽ʽ�����˷��ɿͻ��Լ�����<br>
                                                                                ** �������ʾ��ʷѣ���������װ�ѡ�
                                        �Һŷѡ����۷ѣ�����Ҫ�ṩ�ʾַ�Ʊ���վݲ�����ΪORS�̳dzе��˷ѵ�ƾ֤��
                                        ��Ʒά�޺ú������ǽ����サ���ͻ���<br>
                                                                             <br>
                                        ORS�̳����յ����ķ�������,ORS�̳������ϸ��չ�������������д����������Ҫ������ϵORS�̳����ͷ����� 400-820-1878
                                        ��һ������ ����8��30 �� ����17��30�� <br>
                                        <br>
                                        <br>
                                        лл֧�֣�<br>
                                        <br>
                                        <br>
                                        �й�ORS�̳���<br><br></span>";

            DataSet registerInfo = RMARequestManager.GetInstance().GetRegisterByRequest(Util.TrimIntNull(rmaInfo.SysNo));

            foreach (DataRow row in registerInfo.Tables[0].Rows)
            {
                requestInfo = @"��Ʒ�ţ� @ProductId ��@ProductName��<br>
                                ���������ࣺ@RequestType<br>
                                ����ԭ��/����������@reason<br> ";
                string requesttypeDesc = AppEnum.GetRMARequestType(row["RequestType"]);
                requestInfo = requestInfo.Replace("@ProductId", row["ProductId"].ToString()).Replace("@ProductName", row["ProductName"].ToString()).Replace("@RequestType", requesttypeDesc.ToString()).Replace("@reason", row["CustomerDesc"].ToString());
                allRequestInfo = allRequestInfo + requestInfo;
            }

            mailbodyinfo = mailbodyinfo.Replace("@requestID", requestId);
            mailbodyinfo = mailbodyinfo.Replace("@SOID", strSOID);
            mailbodyinfo = mailbodyinfo.Replace("@allRequestInfo", allRequestInfo.ToString());

            //send mail
            EmailInfo oMail = new EmailInfo();

            oMail.MailAddress = mailaddress;
            oMail.MailSubject = mailsubject;

            oMail.MailBody = mailbodyinfo;
            oMail.Status = (int)AppEnum.TriStatus.Origin;

            //EmailManager.GetInstance().InsertEmail(oMail);
        }
Exemplo n.º 7
0
        public int InsertRequest(RMARequestInfo oParam)
        {
            string sql = @"INSERT INTO RMA_Request
                            (
                            SysNo, SOSysNo, RequestID, CreateTime,
                            CustomerSysNo, CreateUserSysNo, CanDoorGet, DoorGetFee,
                            Address, Contact, Phone, Zip,
                            RecvTime, RecvUserSysNo, Note, Memo,
                            Status, ETakeDate, AreaSysNo, CustomerSendTime,
                            IsRejectRMA, FreightUserSysNo, SetDeliveryManTime, IsRevertAddress,
                            RevertAddress, RevertAreaSysNo, RevertZip,RevertContact,RevertContactPhone,ReceiveType
                            )
                            VALUES (
                            @SysNo, @SOSysNo, @RequestID, @CreateTime,
                            @CustomerSysNo, @CreateUserSysNo, @CanDoorGet, @DoorGetFee,
                            @Address, @Contact, @Phone, @Zip,
                            @RecvTime, @RecvUserSysNo, @Note, @Memo,
                            @Status, @ETakeDate, @AreaSysNo, @CustomerSendTime,
                            @IsRejectRMA, @FreightUserSysNo, @SetDeliveryManTime, @IsRevertAddress,
                            @RevertAddress, @RevertAreaSysNo, @RevertZip,@RevertContact,@RevertContactPhone,@ReceiveType
                            )";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramSOSysNo = new SqlParameter("@SOSysNo", SqlDbType.Int, 4);
            SqlParameter paramRequestID = new SqlParameter("@RequestID", SqlDbType.NVarChar, 10);
            SqlParameter paramCreateTime = new SqlParameter("@CreateTime", SqlDbType.DateTime);
            SqlParameter paramCustomerSysNo = new SqlParameter("@CustomerSysNo", SqlDbType.Int, 4);
            SqlParameter paramCreateUserSysNo = new SqlParameter("@CreateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCanDoorGet = new SqlParameter("@CanDoorGet", SqlDbType.Int, 4);
            SqlParameter paramDoorGetFee = new SqlParameter("@DoorGetFee", SqlDbType.Decimal, 9);
            SqlParameter paramAddress = new SqlParameter("@Address", SqlDbType.NVarChar, 200);
            SqlParameter paramContact = new SqlParameter("@Contact", SqlDbType.NVarChar, 50);
            SqlParameter paramPhone = new SqlParameter("@Phone", SqlDbType.NVarChar, 50);
            SqlParameter paramZip = new SqlParameter("@Zip", SqlDbType.VarChar, 50);
            SqlParameter paramRecvTime = new SqlParameter("@RecvTime", SqlDbType.DateTime);
            SqlParameter paramRecvUserSysNo = new SqlParameter("@RecvUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramNote = new SqlParameter("@Note", SqlDbType.NVarChar, 200);
            SqlParameter paramMemo = new SqlParameter("@Memo", SqlDbType.NVarChar, 200);
            SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4);
            SqlParameter paramETakeDate = new SqlParameter("@ETakeDate", SqlDbType.DateTime);
            SqlParameter paramAreaSysNo = new SqlParameter("@AreaSysNo", SqlDbType.Int, 4);
            SqlParameter paramCustomerSendTime = new SqlParameter("@CustomerSendTime", SqlDbType.DateTime);
            SqlParameter paramIsRejectRMA = new SqlParameter("@IsRejectRMA", SqlDbType.Int, 4);
            SqlParameter paramFreightUserSysNo = new SqlParameter("@FreightUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramSetDeliveryManTime = new SqlParameter("@SetDeliveryManTime", SqlDbType.DateTime);
            SqlParameter paramIsRevertAddress = new SqlParameter("@IsRevertAddress", SqlDbType.Int, 4);
            SqlParameter paramRevertAddress = new SqlParameter("@RevertAddress", SqlDbType.NVarChar, 200);
            SqlParameter paramRevertAreaSysNo = new SqlParameter("@RevertAreaSysNo", SqlDbType.Int, 4);
            SqlParameter paramRevertZip = new SqlParameter("@RevertZip", SqlDbType.NVarChar, 50);
            SqlParameter paramRevertContact = new SqlParameter("@RevertContact", SqlDbType.NVarChar, 50);
            SqlParameter paramRevertContactPhone= new SqlParameter("@RevertContactPhone", SqlDbType.NVarChar, 50);
            SqlParameter paramReceiveType = new SqlParameter("@ReceiveType", SqlDbType.Int, 4);

            if (oParam.SysNo != AppConst.IntNull)
                paramSysNo.Value = oParam.SysNo;
            else
                paramSysNo.Value = System.DBNull.Value;
            if (oParam.SOSysNo != AppConst.IntNull)
                paramSOSysNo.Value = oParam.SOSysNo;
            else
                paramSOSysNo.Value = System.DBNull.Value;
            if (oParam.RequestID != AppConst.StringNull)
                paramRequestID.Value = oParam.RequestID;
            else
                paramRequestID.Value = System.DBNull.Value;
            if (oParam.CreateTime != AppConst.DateTimeNull)
                paramCreateTime.Value = oParam.CreateTime;
            else
                paramCreateTime.Value = System.DBNull.Value;
            if (oParam.CustomerSysNo != AppConst.IntNull)
                paramCustomerSysNo.Value = oParam.CustomerSysNo;
            else
                paramCustomerSysNo.Value = System.DBNull.Value;
            if (oParam.CreateUserSysNo != AppConst.IntNull)
                paramCreateUserSysNo.Value = oParam.CreateUserSysNo;
            else
                paramCreateUserSysNo.Value = System.DBNull.Value;
            if (oParam.CanDoorGet != AppConst.IntNull)
                paramCanDoorGet.Value = oParam.CanDoorGet;
            else
                paramCanDoorGet.Value = System.DBNull.Value;
            if (oParam.DoorGetFee != AppConst.DecimalNull)
                paramDoorGetFee.Value = oParam.DoorGetFee;
            else
                paramDoorGetFee.Value = System.DBNull.Value;
            if (oParam.Address != AppConst.StringNull)
                paramAddress.Value = oParam.Address;
            else
                paramAddress.Value = System.DBNull.Value;
            if (oParam.Contact != AppConst.StringNull)
                paramContact.Value = oParam.Contact;
            else
                paramContact.Value = System.DBNull.Value;
            if (oParam.Phone != AppConst.StringNull)
                paramPhone.Value = oParam.Phone;
            else
                paramPhone.Value = System.DBNull.Value;
            if (oParam.Zip != AppConst.StringNull)
                paramZip.Value = oParam.Zip;
            else
                paramZip.Value = System.DBNull.Value;
            if (oParam.RecvTime != AppConst.DateTimeNull)
                paramRecvTime.Value = oParam.RecvTime;
            else
                paramRecvTime.Value = System.DBNull.Value;
            if (oParam.RecvUserSysNo != AppConst.IntNull)
                paramRecvUserSysNo.Value = oParam.RecvUserSysNo;
            else
                paramRecvUserSysNo.Value = System.DBNull.Value;
            if (oParam.Note != AppConst.StringNull)
                paramNote.Value = oParam.Note;
            else
                paramNote.Value = System.DBNull.Value;
            if (oParam.Memo != AppConst.StringNull)
                paramMemo.Value = oParam.Memo;
            else
                paramMemo.Value = System.DBNull.Value;
            if (oParam.Status != AppConst.IntNull)
                paramStatus.Value = oParam.Status;
            else
                paramStatus.Value = System.DBNull.Value;
            if (oParam.ETakeDate != AppConst.DateTimeNull)
                paramETakeDate.Value = oParam.ETakeDate;
            else
                paramETakeDate.Value = System.DBNull.Value;
            if (oParam.AreaSysNo != AppConst.IntNull)
                paramAreaSysNo.Value = oParam.AreaSysNo;
            else
                paramAreaSysNo.Value = System.DBNull.Value;
            if (oParam.CustomerSendTime != AppConst.DateTimeNull)
                paramCustomerSendTime.Value = oParam.CustomerSendTime;
            else
                paramCustomerSendTime.Value = System.DBNull.Value;
            if (oParam.IsRejectRMA != AppConst.IntNull)
                paramIsRejectRMA.Value = oParam.IsRejectRMA;
            else
                paramIsRejectRMA.Value = System.DBNull.Value;
            if (oParam.FreightUserSysNo != AppConst.IntNull)
                paramFreightUserSysNo.Value = oParam.FreightUserSysNo;
            else
                paramFreightUserSysNo.Value = System.DBNull.Value;
            if (oParam.SetDeliveryManTime != AppConst.DateTimeNull)
                paramSetDeliveryManTime.Value = oParam.SetDeliveryManTime;
            else
                paramSetDeliveryManTime.Value = System.DBNull.Value;
            if (oParam.IsRevertAddress != AppConst.IntNull)
                paramIsRevertAddress.Value = oParam.IsRevertAddress;
            else
                paramIsRevertAddress.Value = System.DBNull.Value;
            if (oParam.RevertAddress != AppConst.StringNull)
                paramRevertAddress.Value = oParam.RevertAddress;
            else
                paramRevertAddress.Value = System.DBNull.Value;
            if (oParam.RevertAreaSysNo != AppConst.IntNull)
                paramRevertAreaSysNo.Value = oParam.RevertAreaSysNo;
            else
                paramRevertAreaSysNo.Value = System.DBNull.Value;
            if (oParam.RevertZip != AppConst.StringNull)
                paramRevertZip.Value = oParam.RevertZip;
            else
                paramRevertZip.Value = System.DBNull.Value;
            if (oParam.RevertContact != AppConst.StringNull)
                paramRevertContact.Value = oParam.RevertContact;
            else
                paramRevertContact.Value = System.DBNull.Value;
            if (oParam.RevertContactPhone != AppConst.StringNull)
                paramRevertContactPhone.Value = System.DBNull.Value;
            if (oParam.ReceiveType != AppConst.IntNull)
                paramReceiveType.Value = oParam.ReceiveType;
            else
                paramReceiveType.Value = System.DBNull.Value;
            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramSOSysNo);
            cmd.Parameters.Add(paramRequestID);
            cmd.Parameters.Add(paramCreateTime);
            cmd.Parameters.Add(paramCustomerSysNo);
            cmd.Parameters.Add(paramCreateUserSysNo);
            cmd.Parameters.Add(paramCanDoorGet);
            cmd.Parameters.Add(paramDoorGetFee);
            cmd.Parameters.Add(paramAddress);
            cmd.Parameters.Add(paramContact);
            cmd.Parameters.Add(paramPhone);
            cmd.Parameters.Add(paramZip);
            cmd.Parameters.Add(paramRecvTime);
            cmd.Parameters.Add(paramRecvUserSysNo);
            cmd.Parameters.Add(paramNote);
            cmd.Parameters.Add(paramMemo);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramETakeDate);
            cmd.Parameters.Add(paramAreaSysNo);
            cmd.Parameters.Add(paramCustomerSendTime);
            cmd.Parameters.Add(paramIsRejectRMA);
            cmd.Parameters.Add(paramFreightUserSysNo);
            cmd.Parameters.Add(paramSetDeliveryManTime);
            cmd.Parameters.Add(paramIsRevertAddress);
            cmd.Parameters.Add(paramRevertAddress);
            cmd.Parameters.Add(paramRevertAreaSysNo);
            cmd.Parameters.Add(paramRevertZip);
            cmd.Parameters.Add(paramRevertContact);
            cmd.Parameters.Add(paramRevertContactPhone);
            cmd.Parameters.Add(paramReceiveType);

            return SqlHelper.ExecuteNonQuery(cmd);
        }