示例#1
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�̳ǿͷ�");
        }
示例#2
0
 public RMARequestInfo Load(int sysno)
 {
     try
     {
         RMARequestInfo oInfo = null;
         string sql = "select * from RMA_Request (NOLOCK) where sysno=" + sysno;
         DataSet ds = SqlHelper.ExecuteDataSet(sql);
         if (Util.HasMoreRow(ds))
         {
             DataRow dr = ds.Tables[0].Rows[0];
             oInfo = MapRequest(dr);
             string itemSql = @"select RMA_Register.*
                                from   RMA_Request_Item (NOLOCK)
                                inner join  RMA_Register (NOLOCK) on RMA_Register.sysno = RMA_Request_Item.RegisterSysNO
                                where RMA_Request_Item.RequestSysNo=" + sysno;
             DataSet itemds = SqlHelper.ExecuteDataSet(itemSql);
             if (Util.HasMoreRow(itemds))
             {
                 foreach (DataRow itemdr in itemds.Tables[0].Rows)
                 {
                     RMARegisterInfo oRegister = new RMARegisterInfo();
                     mapRegister(oRegister, itemdr);
                     oInfo.ItemHash.Add(Util.TrimIntNull(itemdr["SysNo"]), oRegister);
                 }
             }
         }
         return oInfo;
     }
     catch
     {
         throw new BizException("Load RMARequestInfo Error!");
     }
 }
示例#3
0
 public void mapRegister(RMARegisterInfo oInfo, DataRow dr)
 {
     oInfo.SysNo = Util.TrimIntNull(dr["SysNo"]);
     oInfo.ProductSysNo = Util.TrimIntNull(dr["ProductSysNo"]);
     oInfo.RequestType = Util.TrimIntNull(dr["RequestType"]);
     oInfo.CustomerDesc = Util.TrimNull(dr["CustomerDesc"]);
     //oInfo.IsChecked = Util.TrimIntNull(dr["IsChecked"]);
     oInfo.CheckDesc = Util.TrimNull(dr["CheckDesc"]);
     oInfo.NewProductStatus = Util.TrimIntNull(dr["NewProductStatus"]);
     oInfo.RevertStatus = Util.TrimIntNull(dr["RevertStatus"]);
     oInfo.OutBoundStatus = Util.TrimIntNull(dr["OutBoundStatus"]);
     oInfo.ReturnStatus = Util.TrimIntNull(dr["ReturnStatus"]);
     oInfo.ResponseDesc = Util.TrimNull(dr["ResponseDesc"]);
     oInfo.ResponseTime = Util.TrimDateNull(dr["ResponseTime"]);
     oInfo.NextHandler = Util.TrimIntNull(dr["NextHandler"]);
     oInfo.Memo = Util.TrimNull(dr["Memo"]);
     oInfo.Status = Util.TrimIntNull(dr["Status"]);
     oInfo.ProductNo = Util.TrimNull(dr["ProductNo"]);
 }
示例#4
0
        public void GetRegisterHash(out Hashtable RegisterInfoHash, out Hashtable ProductHash, Hashtable sysnoHash)
        {
            RegisterInfoHash = new Hashtable(5);
            ProductHash = new Hashtable(5);
            if (sysnoHash == null || sysnoHash.Count == 0)
            {
                RegisterInfoHash = null;
                ProductHash = null;
                return;
            }
            string sql = "select * from RMA_Register (NOLOCK) where sysno in (";
            int index = 0;
            foreach (int item in sysnoHash.Keys)
            {
                if (index != 0)
                    sql += ",";

                sql += item.ToString();

                index++;
            }
            sql += ")";
            DataSet ds = SqlHelper.ExecuteDataSet(sql);

            if (!Util.HasMoreRow(ds))
                return;

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                RMARegisterInfo paramInfo = new RMARegisterInfo();
                mapRegister(paramInfo, dr);
                RegisterInfoHash.Add(paramInfo.SysNo, paramInfo);
            }
            sql = "select distinct productsysno from RMA_Register (NOLOCK) where sysno in (";
            index = 0;
            foreach (int item in sysnoHash.Keys)
            {
                if (index != 0)
                    sql += ",";

                sql += item.ToString();

                index++;
            }
            sql += ")";
            ds = SqlHelper.ExecuteDataSet(sql);
            if (!Util.HasMoreRow(ds))
                return;
            Hashtable tempht = new Hashtable(5);
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                tempht.Add(dr["ProductSysNo"].ToString(), null);
            }
            ProductHash = ProductManager.GetInstance().GetProductBoundle(tempht);
        }
示例#5
0
 public RMAReturnInfo Load(int sysno)
 {
     RMAReturnInfo oReturn = new RMAReturnInfo();
     string sql = "select * from RMA_Return where sysno=" + sysno;
     DataSet ds = SqlHelper.ExecuteDataSet(sql);
     if (Util.HasMoreRow(ds))
     {
         DataRow dr = ds.Tables[0].Rows[0];
         MapReturn(oReturn, dr);
         string itemsql = @"select RMA_Register.* ,RMA_Return_Item.SysNo as ItemSysNo
                            from   RMA_Return_Item (NOLOCK)
                            inner  join  RMA_Register (NOLOCK) on RMA_Register.SysNo = RMA_Return_Item.RegisterSysNo
                            where  RMA_Return_Item.ReturnSysNo = " + sysno;
         DataSet itemds = SqlHelper.ExecuteDataSet(itemsql);
         if (Util.HasMoreRow(itemds))
         {
             foreach (DataRow itemdr in itemds.Tables[0].Rows)
             {
                 RMARegisterInfo oRegister = new RMARegisterInfo();
                 RMARequestManager.GetInstance().mapRegister(oRegister, itemdr);
                 oReturn.ItemHash.Add(itemdr["ItemSysNo"], oRegister);
             }
         }
     }
     return oReturn;
 }
示例#6
0
 public void mapReg(RMARegisterInfo oInfo, DataRow dr)
 {
     oInfo.SysNo = Util.TrimIntNull(dr["SysNo"]);
     oInfo.ProductSysNo = Util.TrimIntNull(dr["ProductSysNo"]);
     oInfo.RequestType = Util.TrimIntNull(dr["RequestType"]);
     oInfo.CustomerDesc = Util.TrimNull(dr["CustomerDesc"]);
     oInfo.CheckDesc = Util.TrimNull(dr["CheckDesc"]);
     oInfo.NewProductStatus = Util.TrimIntNull(dr["NewProductStatus"]);
     oInfo.RevertStatus = Util.TrimIntNull(dr["RevertStatus"]);
     oInfo.OutBoundStatus = Util.TrimIntNull(dr["OutBoundStatus"]);
     oInfo.ReturnStatus = Util.TrimIntNull(dr["ReturnStatus"]);
     oInfo.ResponseDesc = Util.TrimNull(dr["ResponseDesc"]);
     oInfo.ResponseTime = Util.TrimDateNull(dr["ResponseTime"]);
     oInfo.NextHandler = Util.TrimIntNull(dr["NextHandler"]);
     oInfo.Memo = Util.TrimNull(dr["Memo"]);
     oInfo.RMAReason = Util.TrimIntNull(dr["RMAReason"]);
     oInfo.Status = RMARegisterManager.GetInstance().GetStatusValue(Util.TrimIntNull(dr["SysNo"]));
     oInfo.ProductNo = Util.TrimNull(dr["ProductNo"]);
 }
示例#7
0
        public void CancelResponse(int registerSysNo)
        {
            //1 �Ƿ����cancel response
            //2 partly response or all sendalready

            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {

                string sql = @"select top 1 sysno,location from rma_register (NOLOCK) where outboundstatus=@3 and status in (@0)
                                and sysno in
                                (
                                    select registersysno from rma_outbound (NOLOCK), rma_outbound_item (NOLOCK)
                                    where rma_outbound.sysno = rma_outbound_item.outboundsysno and rma_outbound.status in (@2,@4)
                                ) and sysno = " + registerSysNo;
                sql = sql.Replace("@0", ((int)AppEnum.RMARequestStatus.Handling).ToString());
                sql = sql.Replace("@2", ((int)AppEnum.RMAOutBoundStatus.PartlyResponsed).ToString());
                sql = sql.Replace("@4", ((int)AppEnum.RMAOutBoundStatus.Responsed).ToString());
                sql = sql.Replace("@3", ((int)AppEnum.RMAOutBoundStatus.Responsed).ToString());

                DataSet ds = SqlHelper.ExecuteDataSet(sql);
                if (!Util.HasMoreRow(ds))
                    throw new BizException("this record's outbound status or status can't allow such operation");
                else
                {
                    DataRow dr = ds.Tables[0].Rows[0];
                    if (Util.TrimIntNull(dr["location"]) != (int)AppEnum.RMALocation.Icson)
                        throw new BizException("����ʧ�ܣ�����Ʒ�Ѿ�������������δ������");
                }

                //��ȡ��ͬһ��outbound ����� ����register, �ж�response״̬��Ȼ�����������״̬��
                //������ȡ����������û�д�vendor�����õ���Ʒ���������״̬���������޻��߲��ַ���,ѡ�������״̬Ϊ�����ϵ�
                //                string sql2 = @"select rma_register.outboundstatus, b.outboundsysno
                //								from
                //									rma_outbound_item a (NOLOCK), rma_outbound_item b (NOLOCK), rma_register (NOLOCK)
                //								where
                //									a.outboundsysno = b.outboundsysno
                //								and a.registersysno = @0
                //								and b.registersysno = rma_register.sysno  and rma_register.sysno!=@0";
                //                sql2 = sql2.Replace("@0", registerSysNo.ToString());

                string sql2 = @"select rma_register.outboundstatus, b.outboundsysno
                                from
                                    rma_outbound_item a (NOLOCK), rma_outbound_item b (NOLOCK), rma_register (NOLOCK),rma_outbound e(NOLOCK)
                                where
                                    a.outboundsysno = b.outboundsysno
                                and a.registersysno = @0
                                and b.registersysno = rma_register.sysno and rma_register.sysno!=@0
                                and e.sysno=b.outboundsysno and e.status <> @status";

                sql2 = sql2.Replace("@0", registerSysNo.ToString());
                sql2 = sql2.Replace("@status", ((int)AppEnum.RMAOutBoundStatus.Abandon).ToString());

                bool isAllInVendor = true;
                int outboundSysNo = AppConst.IntNull;

                DataSet ds2 = SqlHelper.ExecuteDataSet(sql2);
                if (Util.HasMoreRow(ds2))
                {
                    foreach (DataRow dr2 in ds2.Tables[0].Rows)
                    {
                        //��Ϊoutbound sysno ����һ���ģ�����ֻ��ȡһ��
                        if (outboundSysNo == AppConst.IntNull)
                        {
                            outboundSysNo = Util.TrimIntNull(dr2["outboundsysno"]);
                        }
                        int outBoundStatus = Util.TrimIntNull(dr2["outboundstatus"]);
                        if (outBoundStatus == (int)AppEnum.RMAOutBoundStatus.Responsed)
                        {
                            isAllInVendor = false;
                            break;
                        }
                    }

                }
                else  //ֻ��һ�����޼�
                {
                    isAllInVendor = true;
                    //string sqlReadBoundSysNo = "select outboundsysno from rma_outbound_item (nolock) where registersysno={0}";
                    string sqlReadBoundSysNo = "select outboundsysno from rma_outbound_item (nolock),rma_outbound (nolock) where registersysno={0} and rma_outbound.sysno=rma_outbound_item.outboundsysno and rma_outbound.status<> @status";
                    sqlReadBoundSysNo = sqlReadBoundSysNo.Replace("@status", ((int)AppEnum.RMAOutBoundStatus.Abandon).ToString());

                    DataSet tempDS = SqlHelper.ExecuteDataSet(String.Format(sqlReadBoundSysNo, registerSysNo));
                    if (Util.HasMoreRow(tempDS)) outboundSysNo = Util.TrimIntNull(tempDS.Tables[0].Rows[0]["outboundsysno"]);
                    else throw new BizException("�쳣�����޵���ϸ��û��RegistersysnoΪ" + registerSysNo.ToString() + "�ĵ��ݡ�");

                }

                int outStatus = (int)AppEnum.RMAOutBoundStatus.SendAlready;
                if (!isAllInVendor)
                    outStatus = (int)AppEnum.RMAOutBoundStatus.PartlyResponsed;

                Hashtable htOutBound = new Hashtable(5);
                htOutBound.Add("SysNo", outboundSysNo);
                htOutBound.Add("Status", outStatus);
                new RMAOutBoundDac().UpdateMaster(htOutBound);

                Hashtable ht = new Hashtable(5);
                ht.Add("SysNo", registerSysNo);
                ht.Add("OutBoundStatus", (int)AppEnum.RMAOutBoundStatus.SendAlready);
                ht.Add("Location", (int)AppEnum.RMALocation.Vendor);

                this.UpdateRegister(ht);

                RMARegisterInfo reg = new RMARegisterInfo();
                map(reg, GetRegisterRow(registerSysNo));
                InventoryManager.GetInstance().SetInStockQty(reg.ReceiveStockSysNo, reg.ProductSysNo, -1);

                scope.Complete();
            }
        }
示例#8
0
        public int Insert(RMARegisterInfo oParam)
        {
            string sql = @"INSERT INTO RMA_Register
                            (
                            SysNo, ProductSysNo, RequestType, CustomerDesc,
                            CheckTime, CheckDesc, NewProductStatus, RevertStatus,
                            OutBoundStatus, ReturnStatus, ResponseDesc, ResponseTime,
                            RefundStatus, NextHandler, Memo, Status,
                            ProductNo, ProductIDSysNo, NewProductIDSysNo, IsWithin7Days,
                            IsRecommendRefund, RefundInfo, OwnBy, Location,
                            Cost, RMAReason, CheckUserSysNo, ResponseUserSysNo,
                            CloseUserSysNo, CloseTime, RevertAuditUserSysNo, RevertAuditTime,
                            RevertAuditMemo, RevertProductSysNo, IsHaveInvoice, IsFullAccessory,
                            IsFullPackage, ReceiveStockSysNo, AttachmentInfo, InspectionResultType,
                            VendorRepairResultType, OutBoundWithInvoice, ResponseProductNo, RevertStockSysNo,
                            PMDunDesc, PMDunTime, IsContactCustomer, RegisterReceiveType,
                            RefundAuditUserSysNo, RefundAuditTime, RefundAuditMemo
                            )
                            VALUES (
                            @SysNo, @ProductSysNo, @RequestType, @CustomerDesc,
                            @CheckTime, @CheckDesc, @NewProductStatus, @RevertStatus,
                            @OutBoundStatus, @ReturnStatus, @ResponseDesc, @ResponseTime,
                            @RefundStatus, @NextHandler, @Memo, @Status,
                            @ProductNo, @ProductIDSysNo, @NewProductIDSysNo, @IsWithin7Days,
                            @IsRecommendRefund, @RefundInfo, @OwnBy, @Location,
                            @Cost, @RMAReason, @CheckUserSysNo, @ResponseUserSysNo,
                            @CloseUserSysNo, @CloseTime, @RevertAuditUserSysNo, @RevertAuditTime,
                            @RevertAuditMemo, @RevertProductSysNo, @IsHaveInvoice, @IsFullAccessory,
                            @IsFullPackage, @ReceiveStockSysNo, @AttachmentInfo, @InspectionResultType,
                            @VendorRepairResultType, @OutBoundWithInvoice, @ResponseProductNo, @RevertStockSysNo,
                            @PMDunDesc, @PMDunTime, @IsContactCustomer, @RegisterReceiveType,
                            @RefundAuditUserSysNo, @RefundAuditTime, @RefundAuditMemo
                            )";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramProductSysNo = new SqlParameter("@ProductSysNo", SqlDbType.Int, 4);
            SqlParameter paramRequestType = new SqlParameter("@RequestType", SqlDbType.Int, 4);
            SqlParameter paramCustomerDesc = new SqlParameter("@CustomerDesc", SqlDbType.NVarChar, 500);
            SqlParameter paramCheckTime = new SqlParameter("@CheckTime", SqlDbType.DateTime);
            SqlParameter paramCheckDesc = new SqlParameter("@CheckDesc", SqlDbType.NVarChar, 500);
            SqlParameter paramNewProductStatus = new SqlParameter("@NewProductStatus", SqlDbType.Int, 4);
            SqlParameter paramRevertStatus = new SqlParameter("@RevertStatus", SqlDbType.Int, 4);
            SqlParameter paramOutBoundStatus = new SqlParameter("@OutBoundStatus", SqlDbType.Int, 4);
            SqlParameter paramReturnStatus = new SqlParameter("@ReturnStatus", SqlDbType.Int, 4);
            SqlParameter paramResponseDesc = new SqlParameter("@ResponseDesc", SqlDbType.NVarChar, 200);
            SqlParameter paramResponseTime = new SqlParameter("@ResponseTime", SqlDbType.DateTime);
            SqlParameter paramRefundStatus = new SqlParameter("@RefundStatus", SqlDbType.Int, 4);
            SqlParameter paramNextHandler = new SqlParameter("@NextHandler", SqlDbType.Int, 4);
            SqlParameter paramMemo = new SqlParameter("@Memo", SqlDbType.NVarChar, 200);
            SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4);
            SqlParameter paramProductNo = new SqlParameter("@ProductNo", SqlDbType.NVarChar, 50);
            SqlParameter paramProductIDSysNo = new SqlParameter("@ProductIDSysNo", SqlDbType.Int, 4);
            SqlParameter paramNewProductIDSysNo = new SqlParameter("@NewProductIDSysNo", SqlDbType.Int, 4);
            SqlParameter paramIsWithin7Days = new SqlParameter("@IsWithin7Days", SqlDbType.Int, 4);
            SqlParameter paramIsRecommendRefund = new SqlParameter("@IsRecommendRefund", SqlDbType.Int, 4);
            SqlParameter paramRefundInfo = new SqlParameter("@RefundInfo", SqlDbType.NVarChar, 200);
            SqlParameter paramOwnBy = new SqlParameter("@OwnBy", SqlDbType.Int, 4);
            SqlParameter paramLocation = new SqlParameter("@Location", SqlDbType.Int, 4);
            SqlParameter paramCost = new SqlParameter("@Cost", SqlDbType.Decimal, 9);
            SqlParameter paramRMAReason = new SqlParameter("@RMAReason", SqlDbType.Int, 4);
            SqlParameter paramCheckUserSysNo = new SqlParameter("@CheckUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramResponseUserSysNo = new SqlParameter("@ResponseUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCloseUserSysNo = new SqlParameter("@CloseUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCloseTime = new SqlParameter("@CloseTime", SqlDbType.DateTime);
            SqlParameter paramRevertAuditUserSysNo = new SqlParameter("@RevertAuditUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramRevertAuditTime = new SqlParameter("@RevertAuditTime", SqlDbType.DateTime);
            SqlParameter paramRevertAuditMemo = new SqlParameter("@RevertAuditMemo", SqlDbType.NVarChar, 100);
            SqlParameter paramRevertProductSysNo = new SqlParameter("@RevertProductSysNo", SqlDbType.Int, 4);
            SqlParameter paramIsHaveInvoice = new SqlParameter("@IsHaveInvoice", SqlDbType.Int, 4);
            SqlParameter paramIsFullAccessory = new SqlParameter("@IsFullAccessory", SqlDbType.Int, 4);
            SqlParameter paramIsFullPackage = new SqlParameter("@IsFullPackage", SqlDbType.Int, 4);
            SqlParameter paramReceiveStockSysNo = new SqlParameter("@ReceiveStockSysNo", SqlDbType.Int, 4);
            SqlParameter paramAttachmentInfo = new SqlParameter("@AttachmentInfo", SqlDbType.NVarChar, 500);
            SqlParameter paramInspectionResultType = new SqlParameter("@InspectionResultType", SqlDbType.NVarChar, 100);
            SqlParameter paramVendorRepairResultType = new SqlParameter("@VendorRepairResultType", SqlDbType.NVarChar, 100);
            SqlParameter paramOutBoundWithInvoice = new SqlParameter("@OutBoundWithInvoice", SqlDbType.Int, 4);
            SqlParameter paramResponseProductNo = new SqlParameter("@ResponseProductNo", SqlDbType.NVarChar, 50);
            SqlParameter paramRevertStockSysNo = new SqlParameter("@RevertStockSysNo", SqlDbType.Int, 4);
            SqlParameter paramPMDunDesc = new SqlParameter("@PMDunDesc", SqlDbType.NVarChar, 1000);
            SqlParameter paramPMDunTime = new SqlParameter("@PMDunTime", SqlDbType.DateTime);
            SqlParameter paramIsContactCustomer = new SqlParameter("@IsContactCustomer", SqlDbType.Int, 4);
            SqlParameter paramRegisterReceiveType = new SqlParameter("@RegisterReceiveType", SqlDbType.Int, 4);
            SqlParameter paramRefundAuditUserSysNo = new SqlParameter("@RefundAuditUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramRefundAuditTime = new SqlParameter("@RefundAuditTime", SqlDbType.DateTime);
            SqlParameter paramRefundAuditMemo = new SqlParameter("@RefundAuditMemo", SqlDbType.NVarChar, 100);

            if (oParam.SysNo != AppConst.IntNull)
                paramSysNo.Value = oParam.SysNo;
            else
                paramSysNo.Value = System.DBNull.Value;
            if (oParam.ProductSysNo != AppConst.IntNull)
                paramProductSysNo.Value = oParam.ProductSysNo;
            else
                paramProductSysNo.Value = System.DBNull.Value;
            if (oParam.RequestType != AppConst.IntNull)
                paramRequestType.Value = oParam.RequestType;
            else
                paramRequestType.Value = System.DBNull.Value;
            if (oParam.CustomerDesc != AppConst.StringNull)
                paramCustomerDesc.Value = oParam.CustomerDesc;
            else
                paramCustomerDesc.Value = System.DBNull.Value;
            if (oParam.CheckTime != AppConst.DateTimeNull)
                paramCheckTime.Value = oParam.CheckTime;
            else
                paramCheckTime.Value = System.DBNull.Value;
            if (oParam.CheckDesc != AppConst.StringNull)
                paramCheckDesc.Value = oParam.CheckDesc;
            else
                paramCheckDesc.Value = System.DBNull.Value;
            if (oParam.NewProductStatus != AppConst.IntNull)
                paramNewProductStatus.Value = oParam.NewProductStatus;
            else
                paramNewProductStatus.Value = System.DBNull.Value;
            if (oParam.RevertStatus != AppConst.IntNull)
                paramRevertStatus.Value = oParam.RevertStatus;
            else
                paramRevertStatus.Value = System.DBNull.Value;
            if (oParam.OutBoundStatus != AppConst.IntNull)
                paramOutBoundStatus.Value = oParam.OutBoundStatus;
            else
                paramOutBoundStatus.Value = System.DBNull.Value;
            if (oParam.ReturnStatus != AppConst.IntNull)
                paramReturnStatus.Value = oParam.ReturnStatus;
            else
                paramReturnStatus.Value = System.DBNull.Value;
            if (oParam.ResponseDesc != AppConst.StringNull)
                paramResponseDesc.Value = oParam.ResponseDesc;
            else
                paramResponseDesc.Value = System.DBNull.Value;
            if (oParam.ResponseTime != AppConst.DateTimeNull)
                paramResponseTime.Value = oParam.ResponseTime;
            else
                paramResponseTime.Value = System.DBNull.Value;
            if (oParam.RefundStatus != AppConst.IntNull)
                paramRefundStatus.Value = oParam.RefundStatus;
            else
                paramRefundStatus.Value = System.DBNull.Value;
            if (oParam.NextHandler != AppConst.IntNull)
                paramNextHandler.Value = oParam.NextHandler;
            else
                paramNextHandler.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.ProductNo != AppConst.StringNull)
                paramProductNo.Value = oParam.ProductNo;
            else
                paramProductNo.Value = System.DBNull.Value;
            if (oParam.ProductIDSysNo != AppConst.IntNull)
                paramProductIDSysNo.Value = oParam.ProductIDSysNo;
            else
                paramProductIDSysNo.Value = System.DBNull.Value;
            if (oParam.NewProductIDSysNo != AppConst.IntNull)
                paramNewProductIDSysNo.Value = oParam.NewProductIDSysNo;
            else
                paramNewProductIDSysNo.Value = System.DBNull.Value;
            if (oParam.IsWithin7Days != AppConst.IntNull)
                paramIsWithin7Days.Value = oParam.IsWithin7Days;
            else
                paramIsWithin7Days.Value = System.DBNull.Value;
            if (oParam.IsRecommendRefund != AppConst.IntNull)
                paramIsRecommendRefund.Value = oParam.IsRecommendRefund;
            else
                paramIsRecommendRefund.Value = System.DBNull.Value;
            if (oParam.RefundInfo != AppConst.StringNull)
                paramRefundInfo.Value = oParam.RefundInfo;
            else
                paramRefundInfo.Value = System.DBNull.Value;
            if (oParam.OwnBy != AppConst.IntNull)
                paramOwnBy.Value = oParam.OwnBy;
            else
                paramOwnBy.Value = System.DBNull.Value;
            if (oParam.Location != AppConst.IntNull)
                paramLocation.Value = oParam.Location;
            else
                paramLocation.Value = System.DBNull.Value;
            if (oParam.Cost != AppConst.DecimalNull)
                paramCost.Value = oParam.Cost;
            else
                paramCost.Value = System.DBNull.Value;
            if (oParam.RMAReason != AppConst.IntNull)
                paramRMAReason.Value = oParam.RMAReason;
            else
                paramRMAReason.Value = System.DBNull.Value;
            if (oParam.CheckUserSysNo != AppConst.IntNull)
                paramCheckUserSysNo.Value = oParam.CheckUserSysNo;
            else
                paramCheckUserSysNo.Value = System.DBNull.Value;
            if (oParam.ResponseUserSysNo != AppConst.IntNull)
                paramResponseUserSysNo.Value = oParam.ResponseUserSysNo;
            else
                paramResponseUserSysNo.Value = System.DBNull.Value;
            if (oParam.CloseUserSysNo != AppConst.IntNull)
                paramCloseUserSysNo.Value = oParam.CloseUserSysNo;
            else
                paramCloseUserSysNo.Value = System.DBNull.Value;
            if (oParam.CloseTime != AppConst.DateTimeNull)
                paramCloseTime.Value = oParam.CloseTime;
            else
                paramCloseTime.Value = System.DBNull.Value;
            if (oParam.RevertAuditUserSysNo != AppConst.IntNull)
                paramRevertAuditUserSysNo.Value = oParam.RevertAuditUserSysNo;
            else
                paramRevertAuditUserSysNo.Value = System.DBNull.Value;
            if (oParam.RevertAuditTime != AppConst.DateTimeNull)
                paramRevertAuditTime.Value = oParam.RevertAuditTime;
            else
                paramRevertAuditTime.Value = System.DBNull.Value;
            if (oParam.RevertAuditMemo != AppConst.StringNull)
                paramRevertAuditMemo.Value = oParam.RevertAuditMemo;
            else
                paramRevertAuditMemo.Value = System.DBNull.Value;
            if (oParam.RevertProductSysNo != AppConst.IntNull)
                paramRevertProductSysNo.Value = oParam.RevertProductSysNo;
            else
                paramRevertProductSysNo.Value = System.DBNull.Value;
            if (oParam.IsHaveInvoice != AppConst.IntNull)
                paramIsHaveInvoice.Value = oParam.IsHaveInvoice;
            else
                paramIsHaveInvoice.Value = System.DBNull.Value;
            if (oParam.IsFullAccessory != AppConst.IntNull)
                paramIsFullAccessory.Value = oParam.IsFullAccessory;
            else
                paramIsFullAccessory.Value = System.DBNull.Value;
            if (oParam.IsFullPackage != AppConst.IntNull)
                paramIsFullPackage.Value = oParam.IsFullPackage;
            else
                paramIsFullPackage.Value = System.DBNull.Value;
            if (oParam.ReceiveStockSysNo != AppConst.IntNull)
                paramReceiveStockSysNo.Value = oParam.ReceiveStockSysNo;
            else
                paramReceiveStockSysNo.Value = System.DBNull.Value;
            if (oParam.AttachmentInfo != AppConst.StringNull)
                paramAttachmentInfo.Value = oParam.AttachmentInfo;
            else
                paramAttachmentInfo.Value = System.DBNull.Value;
            if (oParam.InspectionResultType != AppConst.StringNull)
                paramInspectionResultType.Value = oParam.InspectionResultType;
            else
                paramInspectionResultType.Value = System.DBNull.Value;
            if (oParam.VendorRepairResultType != AppConst.StringNull)
                paramVendorRepairResultType.Value = oParam.VendorRepairResultType;
            else
                paramVendorRepairResultType.Value = System.DBNull.Value;
            if (oParam.OutBoundWithInvoice != AppConst.IntNull)
                paramOutBoundWithInvoice.Value = oParam.OutBoundWithInvoice;
            else
                paramOutBoundWithInvoice.Value = System.DBNull.Value;
            if (oParam.ResponseProductNo != AppConst.StringNull)
                paramResponseProductNo.Value = oParam.ResponseProductNo;
            else
                paramResponseProductNo.Value = System.DBNull.Value;
            if (oParam.RevertStockSysNo != AppConst.IntNull)
                paramRevertStockSysNo.Value = oParam.RevertStockSysNo;
            else
                paramRevertStockSysNo.Value = System.DBNull.Value;
            if (oParam.PMDunDesc != AppConst.StringNull)
                paramPMDunDesc.Value = oParam.PMDunDesc;
            else
                paramPMDunDesc.Value = System.DBNull.Value;
            if (oParam.PMDunTime != AppConst.DateTimeNull)
                paramPMDunTime.Value = oParam.PMDunTime;
            else
                paramPMDunTime.Value = System.DBNull.Value;
            if (oParam.IsContactCustomer != AppConst.IntNull)
                paramIsContactCustomer.Value = oParam.IsContactCustomer;
            else
                paramIsContactCustomer.Value = System.DBNull.Value;
            if (oParam.RegisterReceiveType != AppConst.IntNull)
                paramRegisterReceiveType.Value = oParam.RegisterReceiveType;
            else
                paramRegisterReceiveType.Value = System.DBNull.Value;
            if (oParam.RefundAuditUserSysNo != AppConst.IntNull)
                paramRefundAuditUserSysNo.Value = oParam.RefundAuditUserSysNo;
            else
                paramRefundAuditUserSysNo.Value = System.DBNull.Value;
            if (oParam.RefundAuditTime != AppConst.DateTimeNull)
                paramRefundAuditTime.Value = oParam.RefundAuditTime;
            else
                paramRefundAuditTime.Value = System.DBNull.Value;
            if (oParam.RefundAuditMemo != AppConst.StringNull)
                paramRefundAuditMemo.Value = oParam.RefundAuditMemo;
            else
                paramRefundAuditMemo.Value = System.DBNull.Value;

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramProductSysNo);
            cmd.Parameters.Add(paramRequestType);
            cmd.Parameters.Add(paramCustomerDesc);
            cmd.Parameters.Add(paramCheckTime);
            cmd.Parameters.Add(paramCheckDesc);
            cmd.Parameters.Add(paramNewProductStatus);
            cmd.Parameters.Add(paramRevertStatus);
            cmd.Parameters.Add(paramOutBoundStatus);
            cmd.Parameters.Add(paramReturnStatus);
            cmd.Parameters.Add(paramResponseDesc);
            cmd.Parameters.Add(paramResponseTime);
            cmd.Parameters.Add(paramRefundStatus);
            cmd.Parameters.Add(paramNextHandler);
            cmd.Parameters.Add(paramMemo);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramProductNo);
            cmd.Parameters.Add(paramProductIDSysNo);
            cmd.Parameters.Add(paramNewProductIDSysNo);
            cmd.Parameters.Add(paramIsWithin7Days);
            cmd.Parameters.Add(paramIsRecommendRefund);
            cmd.Parameters.Add(paramRefundInfo);
            cmd.Parameters.Add(paramOwnBy);
            cmd.Parameters.Add(paramLocation);
            cmd.Parameters.Add(paramCost);
            cmd.Parameters.Add(paramRMAReason);
            cmd.Parameters.Add(paramCheckUserSysNo);
            cmd.Parameters.Add(paramResponseUserSysNo);
            cmd.Parameters.Add(paramCloseUserSysNo);
            cmd.Parameters.Add(paramCloseTime);
            cmd.Parameters.Add(paramRevertAuditUserSysNo);
            cmd.Parameters.Add(paramRevertAuditTime);
            cmd.Parameters.Add(paramRevertAuditMemo);
            cmd.Parameters.Add(paramRevertProductSysNo);
            cmd.Parameters.Add(paramIsHaveInvoice);
            cmd.Parameters.Add(paramIsFullAccessory);
            cmd.Parameters.Add(paramIsFullPackage);
            cmd.Parameters.Add(paramReceiveStockSysNo);
            cmd.Parameters.Add(paramAttachmentInfo);
            cmd.Parameters.Add(paramInspectionResultType);
            cmd.Parameters.Add(paramVendorRepairResultType);
            cmd.Parameters.Add(paramOutBoundWithInvoice);
            cmd.Parameters.Add(paramResponseProductNo);
            cmd.Parameters.Add(paramRevertStockSysNo);
            cmd.Parameters.Add(paramPMDunDesc);
            cmd.Parameters.Add(paramPMDunTime);
            cmd.Parameters.Add(paramIsContactCustomer);
            cmd.Parameters.Add(paramRegisterReceiveType);
            cmd.Parameters.Add(paramRefundAuditUserSysNo);
            cmd.Parameters.Add(paramRefundAuditTime);
            cmd.Parameters.Add(paramRefundAuditMemo);

            return SqlHelper.ExecuteNonQuery(cmd);
        }
示例#9
0
        public void ConvertRegisterBoundleHash(Hashtable ht)
        {
            if (ht == null || ht.Count == 0)
                return;

            int index = 0;
            string boundle = "";

            foreach (int rSysNo in ht.Keys)
            {
                if (index != 0)
                    boundle += ",";

                boundle += rSysNo.ToString();
                index++;
            }

            string sql = "select * from rma_register (NOLOCK) where sysno in (@0)";
            sql = sql.Replace("@0", boundle);
            DataSet ds = SqlHelper.ExecuteDataSet(sql);
            ht.Clear();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                RMARegisterInfo oR = new RMARegisterInfo();
                map(oR, dr);
                ht.Add(oR.SysNo, oR);
            }
        }
示例#10
0
 private void map(RMARegisterInfo oParam, DataRow tempdr)
 {
     oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]);
     oParam.ProductSysNo = Util.TrimIntNull(tempdr["ProductSysNo"]);
     oParam.RequestType = Util.TrimIntNull(tempdr["RequestType"]);
     oParam.CustomerDesc = Util.TrimNull(tempdr["CustomerDesc"]);
     oParam.CheckTime = Util.TrimDateNull(tempdr["CheckTime"]);
     oParam.CheckDesc = Util.TrimNull(tempdr["CheckDesc"]);
     oParam.NewProductStatus = Util.TrimIntNull(tempdr["NewProductStatus"]);
     oParam.RevertStatus = Util.TrimIntNull(tempdr["RevertStatus"]);
     oParam.OutBoundStatus = Util.TrimIntNull(tempdr["OutBoundStatus"]);
     oParam.ReturnStatus = Util.TrimIntNull(tempdr["ReturnStatus"]);
     oParam.ResponseDesc = Util.TrimNull(tempdr["ResponseDesc"]);
     oParam.ResponseTime = Util.TrimDateNull(tempdr["ResponseTime"]);
     oParam.RefundStatus = Util.TrimIntNull(tempdr["RefundStatus"]);
     oParam.NextHandler = Util.TrimIntNull(tempdr["NextHandler"]);
     oParam.Memo = Util.TrimNull(tempdr["Memo"]);
     oParam.Status = Util.TrimIntNull(tempdr["Status"]);
     oParam.ProductNo = Util.TrimNull(tempdr["ProductNo"]);
     oParam.ProductIDSysNo = Util.TrimIntNull(tempdr["ProductIDSysNo"]);
     oParam.NewProductIDSysNo = Util.TrimIntNull(tempdr["NewProductIDSysNo"]);
     oParam.IsWithin7Days = Util.TrimIntNull(tempdr["IsWithin7Days"]);
     oParam.IsRecommendRefund = Util.TrimIntNull(tempdr["IsRecommendRefund"]);
     oParam.RefundInfo = Util.TrimNull(tempdr["RefundInfo"]);
     oParam.OwnBy = Util.TrimIntNull(tempdr["OwnBy"]);
     oParam.Location = Util.TrimIntNull(tempdr["Location"]);
     oParam.Cost = Util.TrimDecimalNull(tempdr["Cost"]);
     oParam.RMAReason = Util.TrimIntNull(tempdr["RMAReason"]);
     oParam.CheckUserSysNo = Util.TrimIntNull(tempdr["CheckUserSysNo"]);
     oParam.ResponseUserSysNo = Util.TrimIntNull(tempdr["ResponseUserSysNo"]);
     oParam.CloseUserSysNo = Util.TrimIntNull(tempdr["CloseUserSysNo"]);
     oParam.CloseTime = Util.TrimDateNull(tempdr["CloseTime"]);
     oParam.RevertAuditUserSysNo = Util.TrimIntNull(tempdr["RevertAuditUserSysNo"]);
     oParam.RevertAuditTime = Util.TrimDateNull(tempdr["RevertAuditTime"]);
     oParam.RevertAuditMemo = Util.TrimNull(tempdr["RevertAuditMemo"]);
     oParam.RevertProductSysNo = Util.TrimIntNull(tempdr["RevertProductSysNo"]);
     oParam.IsHaveInvoice = Util.TrimIntNull(tempdr["IsHaveInvoice"]);
     oParam.IsFullAccessory = Util.TrimIntNull(tempdr["IsFullAccessory"]);
     oParam.IsFullPackage = Util.TrimIntNull(tempdr["IsFullPackage"]);
     oParam.ReceiveStockSysNo = Util.TrimIntNull(tempdr["ReceiveStockSysNo"]);
     oParam.AttachmentInfo = Util.TrimNull(tempdr["AttachmentInfo"]);
     oParam.InspectionResultType = Util.TrimNull(tempdr["InspectionResultType"]);
     oParam.VendorRepairResultType = Util.TrimNull(tempdr["VendorRepairResultType"]);
     oParam.OutBoundWithInvoice = Util.TrimIntNull(tempdr["OutBoundWithInvoice"]);
     oParam.ResponseProductNo = Util.TrimNull(tempdr["ResponseProductNo"]);
     oParam.RevertStockSysNo = Util.TrimIntNull(tempdr["RevertStockSysNo"]);
     oParam.PMDunDesc = Util.TrimNull(tempdr["PMDunDesc"]);
     oParam.PMDunTime = Util.TrimDateNull(tempdr["PMDunTime"]);
     oParam.IsContactCustomer = Util.TrimIntNull(tempdr["IsContactCustomer"]);
     oParam.RegisterReceiveType = Util.TrimIntNull(tempdr["RegisterReceiveType"]);
     oParam.RefundAuditUserSysNo = Util.TrimIntNull(tempdr["RefundAuditUserSysNo"]);
     oParam.RefundAuditTime = Util.TrimDateNull(tempdr["RefundAuditTime"]);
     oParam.RefundAuditMemo = Util.TrimNull(tempdr["RefundAuditMemo"]);
     oParam.ShiftStatus = Util.TrimIntNull(tempdr["ShiftStatus"]);
     oParam.SetShiftUserSysNo = Util.TrimIntNull(tempdr["SetShiftUserSysNo"]);
     oParam.SetShiftTime = Util.TrimDateNull(tempdr["SetShiftTime"]);
     oParam.CheckRepairResult = Util.TrimIntNull(tempdr["CheckRepairResult"]);
     oParam.CheckRepairNote = Util.TrimNull(tempdr["CheckRepairNote"]);
     oParam.CheckRepairUserSysNo = Util.TrimIntNull(tempdr["CheckRepairUserSysNo"]);
     oParam.CheckRepairTime = Util.TrimDateNull(tempdr["CheckRepairTime"]);
 }
示例#11
0
        public void UpdateRegister(Hashtable paramHash)
        {
            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                string alarm = AppConst.StringNull;
                RMARegisterInfo oRegister = new RMARegisterInfo();
                DataRow dr = this.GetRegisterRow(Util.TrimIntNull(paramHash["SysNo"]));
                this.map(oRegister, dr);

                //��������϶�������Ҫ�ж��Ƿ����˿���˻����ѷ����������ޡ�
                if (paramHash.ContainsKey("Status"))
                {
                    if (Util.TrimIntNull(paramHash["Status"]) == (int)AppEnum.RMARequestStatus.Abandon)
                    {
                        //OutBound���漰������Լ�����IJ������Ƿ��Ѿ����ڴ����л��ߴ�����ϵ�OutBound��������û��Ӱ��
                        //if(oRegister.OutBoundStatus==(int)AppEnum.RMAOutBoundStatus.PartlyResponsed || oRegister.OutBoundStatus == (int)AppEnum.RMAOutBoundStatus.Responsed || oRegister.OutBoundStatus == (int)AppEnum.RMAOutBoundStatus.SendAlready)
                        //	alarm += "RegisterSysNo��" + paramHash["sysno"].ToString() + "���ڴ����е�OutBound���޵���" + "<br>";
                        if (oRegister.RefundStatus == (int)AppEnum.RMARefundStatus.Refunded)
                            alarm += "RegisterSysNo��" + paramHash["SysNo"].ToString() + "�Ѿ�������Refund�˿����������ȡ���˿�����ϸ�RMA����" + "<br>";
                        if (oRegister.ReturnStatus == (int)AppEnum.RMAReturnStatus.Returned)
                            alarm += "RegisterSysNo��" + paramHash["SysNo"].ToString() + "�Ѿ�������Return�˻�������������ȡ���˻���⣬�����ϸ�RMA����" + "<br>";
                        if (oRegister.RevertStatus == (int)AppEnum.RMARevertStatus.Reverted)
                            alarm += "RegisterSysNo��" + paramHash["SysNo"].ToString() + "�Ѿ�������Revert�����������������ȡ���������⣬�����ϸ�RMA����" + "<br>";
                        else
                        {
                            if (oRegister.RevertStatus != (int)AppEnum.RMARevertStatus.Abandon && oRegister.NewProductStatus != (int)AppEnum.NewProductStatus.Origin)
                                alarm += "RegisterSysNo��" + paramHash["SysNo"].ToString() + "����WaitingRevert���Ƿǵ������ĵ���,����ȡ��WaitingRevert�������ϸ�RMA����" + "<br>";
                        }
                    }
                    //if (Util.TrimIntNull(paramHash["Status"]) == (int)AppEnum.RMARequestStatus.Closed)
                    //{
                    //    if (oRegister.OwnBy != (int)AppEnum.RMAOwnBy.Origin || oRegister.Location != (int)AppEnum.RMALocation.Origin)
                    //        alarm += "RegisterSysNo��" + paramHash["SysNo"].ToString() + "ֻ���ڴ�����ɺ����Close����ȷ���Ƿ񷢻�������ͻ������˻���⡣";
                    //}
                }
                if (alarm != AppConst.StringNull)
                {
                    throw new BizException(alarm + "����ʧ�ܣ�");
                }
                new RMARegisterDac().Update(paramHash);
                scope.Complete();
            }
        }
示例#12
0
 public RMARegisterInfo Load(int sysno)
 {
     RMARegisterInfo oRegister = new RMARegisterInfo();
     string sql = "select * from RMA_Register (NOLOCK) where sysno = " + sysno;
     DataSet ds = SqlHelper.ExecuteDataSet(sql);
     if (Util.HasMoreRow(ds))
     {
         map(oRegister, ds.Tables[0].Rows[0]);
     }
     return oRegister;
 }
示例#13
0
 public void InsertRegister(RMARegisterInfo oInfo)
 {
     oInfo.IsWithin7Days = (int)AppEnum.YNStatus.No;
     oInfo.IsRecommendRefund = (int)AppEnum.RecommendRefund.No;
     oInfo.NewProductStatus = (int)AppEnum.NewProductStatus.Origin;
     new RMARegisterDac().Insert(oInfo);
 }