コード例 #1
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
        public void AddAccessory(RMASendAccessoryInfo 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_SendAccessory_Sequence");
               rmaInfo.SendAccessoryID = this.BuildSendAccessoryID(rmaInfo.SysNo);
               rmaInfo.Status = (int)AppEnum.RMASendAccessoryStatus.WaitingAudit;
               this.InsertSentAccessory(rmaInfo);
               foreach (RMASendAccessoryItemInfo rmaItem in rmaInfo.ItemHash.Values)
               {
                   rmaItem.SendAccessorySysNo = rmaInfo.SysNo;
                   RMASendAccessoryManager.GetInstance().InsertSentAccessoryItem(rmaItem);
               }
               scope.Complete();
               }
        }
コード例 #2
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
        public RMASendAccessoryInfo BuildfromSO(int soSysNo)
        {
            RMASendAccessoryInfo rmaInfo = new RMASendAccessoryInfo();
            SOInfo soInfo = SaleManager.GetInstance().LoadSO(soSysNo);
            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.AreaSysNo = soInfo.ReceiveAreaSysNo;
                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++)
                            {
                                RMASendAccessoryItemInfo rmaItem = new RMASendAccessoryItemInfo();
                                rmaItem.ProductSysNo = soItem.ProductSysNo;
                                rmaItem.AccessoryType=
                                rmaItem.AccessoryType = (int)AppEnum.RMAAccessoryType.Accessory;

                                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"]);
                                    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>";
                                    }
                                    rmaItem.ProductIDSysNo = ProductIDSysNo;
                                    rmaItem.AccessoryType =(int) AppEnum.RMAAccessoryType.Accessory;
                                }
                                rmaInfo.ItemHash.Add(j, rmaItem);
                                j = j + 1;
                            }
                        }
                    }
                }
            }
            else
                rmaInfo = null;
            return rmaInfo;
        }
コード例 #3
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
 private void map(RMASendAccessoryInfo oParam, DataRow tempdr)
 {
     oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]);
        oParam.SOSysNo = Util.TrimIntNull(tempdr["SOSysNo"]);
        oParam.CustomerSysNo = Util.TrimIntNull(tempdr["CustomerSysNo"]);
        oParam.SendAccessoryID = Util.TrimNull(tempdr["SendAccessoryID"]);
        oParam.CreateTime = Util.TrimDateNull(tempdr["CreateTime"]);
        oParam.CreateUserSysNo = Util.TrimIntNull(tempdr["CreateUserSysNo"]);
        oParam.AreaSysNo = Util.TrimIntNull(tempdr["AreaSysNo"]);
        oParam.Address = Util.TrimNull(tempdr["Address"]);
        oParam.Contact = Util.TrimNull(tempdr["Contact"]);
        oParam.Phone = Util.TrimNull(tempdr["Phone"]);
        oParam.Status = Util.TrimIntNull(tempdr["Status"]);
        oParam.UpdateUserSysNo = Util.TrimIntNull(tempdr["UpdateUserSysNo"]);
        oParam.UpdateTime = Util.TrimDateNull(tempdr["UpdateTime"]);
        oParam.AuditTime = Util.TrimDateNull(tempdr["AuditTime"]);
        oParam.AuditUserSysNo = Util.TrimIntNull(tempdr["AuditUserSysNo"]);
        oParam.SendTime = Util.TrimDateNull(tempdr["SendTime"]);
        oParam.SendStockSynNo = Util.TrimIntNull(tempdr["SendStockSynNo"]);
        oParam.ShipTypeSysNo = Util.TrimIntNull(tempdr["ShipTypeSysNo"]);
        oParam.SendUserSysNo = Util.TrimIntNull(tempdr["SendUserSysNo"]);
        oParam.Memo = Util.TrimNull(tempdr["Memo"]);
        oParam.IsPrintPackage = Util.TrimIntNull(tempdr["IsPrintPackage"]);
        oParam.PackageID = Util.TrimNull(tempdr["PackageID"]);
        oParam.FreightUserSysNo = Util.TrimIntNull(tempdr["FreightUserSysNo"]);
        oParam.SetDeliveryManTime = Util.TrimDateNull(tempdr["SetDeliveryManTime"]);
 }
コード例 #4
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
 public void Update(RMASendAccessoryInfo oParam)
 {
     new RMASendAccessoryDac().Update(oParam);
 }
コード例 #5
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
 public RMASendAccessoryInfo Load(int sysno)
 {
     try
        {
        RMASendAccessoryInfo oInfo = new RMASendAccessoryInfo();
        string sql = "select * from RMA_SendAccessory (NOLOCK) where sysno=" + sysno;
        DataSet ds = SqlHelper.ExecuteDataSet(sql);
        if (Util.HasMoreRow(ds))
        {
            DataRow dr = ds.Tables[0].Rows[0];
             map(oInfo,dr);
            string itemSql = @"select RMA_SendAccessory_Item.*
                                from   RMA_SendAccessory_Item (NOLOCK)
                                inner join  RMA_SendAccessory (NOLOCK) on RMA_SendAccessory_Item.SendAccessorySysNo = RMA_SendAccessory.SysNo
                                where RMA_SendAccessory.sysno=" + sysno;
            DataSet itemds = SqlHelper.ExecuteDataSet(itemSql);
            if (Util.HasMoreRow(itemds))
            {
                foreach (DataRow itemdr in itemds.Tables[0].Rows)
                {
                    RMASendAccessoryItemInfo oSAItem = new RMASendAccessoryItemInfo();
                    mapItem(oSAItem, itemdr);
                    oInfo.ItemHash.Add(Util.TrimIntNull(itemdr["SysNo"]), oSAItem);
                }
            }
        }
        return oInfo;
        }
        catch
        {
        throw new BizException("Load RMASendAccessoryInfo Error!");
        }
 }
コード例 #6
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
 public void InsertSentAccessory(RMASendAccessoryInfo oInfo)
 {
     new RMASendAccessoryDac().Insert(oInfo);
 }
コード例 #7
0
ファイル: RMASendAccessoryManager.cs プロジェクト: ue96/ue96
        public string CheckSOItem(RMASendAccessoryInfo oInfo)
        {
            //是否已存在该SO中该商品的RMA单

               string result = AppConst.StringNull;
               foreach (RMASendAccessoryItemInfo oSAItemInfo in oInfo.ItemHash.Values)
               {
               string sql = @"select RMA_SendAccessory_Item.*,RMA_SendAccessory.SendAccessoryID
                               from  RMA_SendAccessory_Item (NOLOCK)
                               inner join RMA_SendAccessory(NOLOCK) on RMA_SendAccessory.sysno = RMA_SendAccessory_Item.SendAccessorySysNo
                               where RMA_SendAccessory_Item.sosysno = " + oInfo.SOSysNo + " and RMA_SendAccessory_Item.productsysno=" + oSAItemInfo.ProductSysNo
                   + " and (RMA_SendAccessory.status = " + (int)AppEnum.RMASendAccessoryStatus.WaitingAudit + " or RMA_SendAccessory.status = " + (int)AppEnum.RMASendAccessoryStatus.WaitingSend + ")";

               DataSet ds = SqlHelper.ExecuteDataSet(sql);
               foreach(DataRow dr in ds.Tables[0].Rows)
               {
                   ProductBasicInfo oProduct = ProductManager.GetInstance().LoadBasic(oSAItemInfo.ProductSysNo);
                   if (result != AppConst.StringNull)
                       result += "<br>";
                   result += oProduct.ProductName + "(" + oProduct.ProductID + ")" + "&nbsp;&nbsp;<a href='../RMA/SendAccessoryOpt.aspx?sysno=" + dr["sendAccessorysysno"].ToString() + "&opt=view'>" + dr["SendAccessoryID"].ToString() + "</a>";
               }

               }
               return result;
        }
コード例 #8
0
ファイル: RMASendAccessoryDac.cs プロジェクト: ue96/ue96
        public int Update(RMASendAccessoryInfo oParam)
        {
            string sql = @"UPDATE RMA_SendAccessory SET
                            SOSysNo=@SOSysNo, CustomerSysNo=@CustomerSysNo,
                            SendAccessoryID=@SendAccessoryID, CreateTime=@CreateTime,
                            CreateUserSysNo=@CreateUserSysNo, AreaSysNo=@AreaSysNo,
                            Address=@Address, Contact=@Contact,
                            Phone=@Phone, Status=@Status,
                            UpdateUserSysNo=@UpdateUserSysNo, UpdateTime=@UpdateTime,
                            AuditTime=@AuditTime, AuditUserSysNo=@AuditUserSysNo,
                            SendTime=@SendTime, SendStockSynNo=@SendStockSynNo,
                            ShipTypeSysNo=@ShipTypeSysNo, SendUserSysNo=@SendUserSysNo,
                            Memo=@Memo, IsPrintPackage=@IsPrintPackage,
                            PackageID=@PackageID, FreightUserSysNo=@FreightUserSysNo,
                            SetDeliveryManTime=@SetDeliveryManTime
                            WHERE SysNo=@SysNo";
              SqlCommand cmd = new SqlCommand(sql);

              SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4);
              SqlParameter paramSOSysNo = new SqlParameter("@SOSysNo", SqlDbType.Int, 4);
              SqlParameter paramCustomerSysNo = new SqlParameter("@CustomerSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendAccessoryID = new SqlParameter("@SendAccessoryID", SqlDbType.NVarChar, 10);
              SqlParameter paramCreateTime = new SqlParameter("@CreateTime", SqlDbType.DateTime);
              SqlParameter paramCreateUserSysNo = new SqlParameter("@CreateUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramAreaSysNo = new SqlParameter("@AreaSysNo", SqlDbType.Int, 4);
              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 paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4);
              SqlParameter paramUpdateUserSysNo = new SqlParameter("@UpdateUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramUpdateTime = new SqlParameter("@UpdateTime", SqlDbType.DateTime);
              SqlParameter paramAuditTime = new SqlParameter("@AuditTime", SqlDbType.DateTime);
              SqlParameter paramAuditUserSysNo = new SqlParameter("@AuditUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendTime = new SqlParameter("@SendTime", SqlDbType.DateTime);
              SqlParameter paramSendStockSynNo = new SqlParameter("@SendStockSynNo", SqlDbType.Int, 4);
              SqlParameter paramShipTypeSysNo = new SqlParameter("@ShipTypeSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendUserSysNo = new SqlParameter("@SendUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramMemo = new SqlParameter("@Memo", SqlDbType.NVarChar, 200);
              SqlParameter paramIsPrintPackage = new SqlParameter("@IsPrintPackage", SqlDbType.Int, 4);
              SqlParameter paramPackageID = new SqlParameter("@PackageID", SqlDbType.NVarChar, 50);
              SqlParameter paramFreightUserSysNo = new SqlParameter("@FreightUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramSetDeliveryManTime = new SqlParameter("@SetDeliveryManTime", SqlDbType.DateTime);

              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.CustomerSysNo != AppConst.IntNull)
              paramCustomerSysNo.Value = oParam.CustomerSysNo;
              else
              paramCustomerSysNo.Value = System.DBNull.Value;
              if (oParam.SendAccessoryID != AppConst.StringNull)
              paramSendAccessoryID.Value = oParam.SendAccessoryID;
              else
              paramSendAccessoryID.Value = System.DBNull.Value;
              if (oParam.CreateTime != AppConst.DateTimeNull)
              paramCreateTime.Value = oParam.CreateTime;
              else
              paramCreateTime.Value = System.DBNull.Value;
              if (oParam.CreateUserSysNo != AppConst.IntNull)
              paramCreateUserSysNo.Value = oParam.CreateUserSysNo;
              else
              paramCreateUserSysNo.Value = System.DBNull.Value;
              if (oParam.AreaSysNo != AppConst.IntNull)
              paramAreaSysNo.Value = oParam.AreaSysNo;
              else
              paramAreaSysNo.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.Status != AppConst.IntNull)
              paramStatus.Value = oParam.Status;
              else
              paramStatus.Value = System.DBNull.Value;
              if (oParam.UpdateUserSysNo != AppConst.IntNull)
              paramUpdateUserSysNo.Value = oParam.UpdateUserSysNo;
              else
              paramUpdateUserSysNo.Value = System.DBNull.Value;
              if (oParam.UpdateTime != AppConst.DateTimeNull)
              paramUpdateTime.Value = oParam.UpdateTime;
              else
              paramUpdateTime.Value = System.DBNull.Value;
              if (oParam.AuditTime != AppConst.DateTimeNull)
              paramAuditTime.Value = oParam.AuditTime;
              else
              paramAuditTime.Value = System.DBNull.Value;
              if (oParam.AuditUserSysNo != AppConst.IntNull)
              paramAuditUserSysNo.Value = oParam.AuditUserSysNo;
              else
              paramAuditUserSysNo.Value = System.DBNull.Value;
              if (oParam.SendTime != AppConst.DateTimeNull)
              paramSendTime.Value = oParam.SendTime;
              else
              paramSendTime.Value = System.DBNull.Value;
              if (oParam.SendStockSynNo != AppConst.IntNull)
              paramSendStockSynNo.Value = oParam.SendStockSynNo;
              else
              paramSendStockSynNo.Value = System.DBNull.Value;
              if (oParam.ShipTypeSysNo != AppConst.IntNull)
              paramShipTypeSysNo.Value = oParam.ShipTypeSysNo;
              else
              paramShipTypeSysNo.Value = System.DBNull.Value;
              if (oParam.SendUserSysNo != AppConst.IntNull)
              paramSendUserSysNo.Value = oParam.SendUserSysNo;
              else
              paramSendUserSysNo.Value = System.DBNull.Value;
              if (oParam.Memo != AppConst.StringNull)
              paramMemo.Value = oParam.Memo;
              else
              paramMemo.Value = System.DBNull.Value;
              if (oParam.IsPrintPackage != AppConst.IntNull)
              paramIsPrintPackage.Value = oParam.IsPrintPackage;
              else
              paramIsPrintPackage.Value = System.DBNull.Value;
              if (oParam.PackageID != AppConst.StringNull)
              paramPackageID.Value = oParam.PackageID;
              else
              paramPackageID.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;

              cmd.Parameters.Add(paramSysNo);
              cmd.Parameters.Add(paramSOSysNo);
              cmd.Parameters.Add(paramCustomerSysNo);
              cmd.Parameters.Add(paramSendAccessoryID);
              cmd.Parameters.Add(paramCreateTime);
              cmd.Parameters.Add(paramCreateUserSysNo);
              cmd.Parameters.Add(paramAreaSysNo);
              cmd.Parameters.Add(paramAddress);
              cmd.Parameters.Add(paramContact);
              cmd.Parameters.Add(paramPhone);
              cmd.Parameters.Add(paramStatus);
              cmd.Parameters.Add(paramUpdateUserSysNo);
              cmd.Parameters.Add(paramUpdateTime);
              cmd.Parameters.Add(paramAuditTime);
              cmd.Parameters.Add(paramAuditUserSysNo);
              cmd.Parameters.Add(paramSendTime);
              cmd.Parameters.Add(paramSendStockSynNo);
              cmd.Parameters.Add(paramShipTypeSysNo);
              cmd.Parameters.Add(paramSendUserSysNo);
              cmd.Parameters.Add(paramMemo);
              cmd.Parameters.Add(paramIsPrintPackage);
              cmd.Parameters.Add(paramPackageID);
              cmd.Parameters.Add(paramFreightUserSysNo);
              cmd.Parameters.Add(paramSetDeliveryManTime);

              return SqlHelper.ExecuteNonQuery(cmd);
        }
コード例 #9
0
ファイル: RMASendAccessoryDac.cs プロジェクト: ue96/ue96
        public int Insert(RMASendAccessoryInfo oParam)
        {
            string sql = @"INSERT INTO RMA_SendAccessory
                            (
                            SOSysNo, CustomerSysNo, SendAccessoryID, CreateTime,
                            CreateUserSysNo, AreaSysNo, Address, Contact,
                            Phone, Status, UpdateUserSysNo, UpdateTime,
                            AuditTime, AuditUserSysNo, SendTime, SendStockSynNo,
                            ShipTypeSysNo, SendUserSysNo, Memo, IsPrintPackage,
                            PackageID, FreightUserSysNo, SetDeliveryManTime
                            )
                            VALUES (
                            @SOSysNo, @CustomerSysNo, @SendAccessoryID, @CreateTime,
                            @CreateUserSysNo, @AreaSysNo, @Address, @Contact,
                            @Phone, @Status, @UpdateUserSysNo, @UpdateTime,
                            @AuditTime, @AuditUserSysNo, @SendTime, @SendStockSynNo,
                            @ShipTypeSysNo, @SendUserSysNo, @Memo, @IsPrintPackage,
                            @PackageID, @FreightUserSysNo, @SetDeliveryManTime
                            );set @SysNo = SCOPE_IDENTITY();";
              SqlCommand cmd = new SqlCommand(sql);

              SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4);
              SqlParameter paramSOSysNo = new SqlParameter("@SOSysNo", SqlDbType.Int, 4);
              SqlParameter paramCustomerSysNo = new SqlParameter("@CustomerSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendAccessoryID = new SqlParameter("@SendAccessoryID", SqlDbType.NVarChar, 10);
              SqlParameter paramCreateTime = new SqlParameter("@CreateTime", SqlDbType.DateTime);
              SqlParameter paramCreateUserSysNo = new SqlParameter("@CreateUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramAreaSysNo = new SqlParameter("@AreaSysNo", SqlDbType.Int, 4);
              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 paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4);
              SqlParameter paramUpdateUserSysNo = new SqlParameter("@UpdateUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramUpdateTime = new SqlParameter("@UpdateTime", SqlDbType.DateTime);
              SqlParameter paramAuditTime = new SqlParameter("@AuditTime", SqlDbType.DateTime);
              SqlParameter paramAuditUserSysNo = new SqlParameter("@AuditUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendTime = new SqlParameter("@SendTime", SqlDbType.DateTime);
              SqlParameter paramSendStockSynNo = new SqlParameter("@SendStockSynNo", SqlDbType.Int, 4);
              SqlParameter paramShipTypeSysNo = new SqlParameter("@ShipTypeSysNo", SqlDbType.Int, 4);
              SqlParameter paramSendUserSysNo = new SqlParameter("@SendUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramMemo = new SqlParameter("@Memo", SqlDbType.NVarChar, 200);
              SqlParameter paramIsPrintPackage = new SqlParameter("@IsPrintPackage", SqlDbType.Int, 4);
              SqlParameter paramPackageID = new SqlParameter("@PackageID", SqlDbType.NVarChar, 50);
              SqlParameter paramFreightUserSysNo = new SqlParameter("@FreightUserSysNo", SqlDbType.Int, 4);
              SqlParameter paramSetDeliveryManTime = new SqlParameter("@SetDeliveryManTime", SqlDbType.DateTime);
              paramSysNo.Direction = ParameterDirection.Output;
              if (oParam.SOSysNo != AppConst.IntNull)
              paramSOSysNo.Value = oParam.SOSysNo;
              else
              paramSOSysNo.Value = System.DBNull.Value;
              if (oParam.CustomerSysNo != AppConst.IntNull)
              paramCustomerSysNo.Value = oParam.CustomerSysNo;
              else
              paramCustomerSysNo.Value = System.DBNull.Value;
              if (oParam.SendAccessoryID != AppConst.StringNull)
              paramSendAccessoryID.Value = oParam.SendAccessoryID;
              else
              paramSendAccessoryID.Value = System.DBNull.Value;
              if (oParam.CreateTime != AppConst.DateTimeNull)
              paramCreateTime.Value = oParam.CreateTime;
              else
              paramCreateTime.Value = System.DBNull.Value;
              if (oParam.CreateUserSysNo != AppConst.IntNull)
              paramCreateUserSysNo.Value = oParam.CreateUserSysNo;
              else
              paramCreateUserSysNo.Value = System.DBNull.Value;
              if (oParam.AreaSysNo != AppConst.IntNull)
              paramAreaSysNo.Value = oParam.AreaSysNo;
              else
              paramAreaSysNo.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.Status != AppConst.IntNull)
              paramStatus.Value = oParam.Status;
              else
              paramStatus.Value = System.DBNull.Value;
              if (oParam.UpdateUserSysNo != AppConst.IntNull)
              paramUpdateUserSysNo.Value = oParam.UpdateUserSysNo;
              else
              paramUpdateUserSysNo.Value = System.DBNull.Value;
              if (oParam.UpdateTime != AppConst.DateTimeNull)
              paramUpdateTime.Value = oParam.UpdateTime;
              else
              paramUpdateTime.Value = System.DBNull.Value;
              if (oParam.AuditTime != AppConst.DateTimeNull)
              paramAuditTime.Value = oParam.AuditTime;
              else
              paramAuditTime.Value = System.DBNull.Value;
              if (oParam.AuditUserSysNo != AppConst.IntNull)
              paramAuditUserSysNo.Value = oParam.AuditUserSysNo;
              else
              paramAuditUserSysNo.Value = System.DBNull.Value;
              if (oParam.SendTime != AppConst.DateTimeNull)
              paramSendTime.Value = oParam.SendTime;
              else
              paramSendTime.Value = System.DBNull.Value;
              if (oParam.SendStockSynNo != AppConst.IntNull)
              paramSendStockSynNo.Value = oParam.SendStockSynNo;
              else
              paramSendStockSynNo.Value = System.DBNull.Value;
              if (oParam.ShipTypeSysNo != AppConst.IntNull)
              paramShipTypeSysNo.Value = oParam.ShipTypeSysNo;
              else
              paramShipTypeSysNo.Value = System.DBNull.Value;
              if (oParam.SendUserSysNo != AppConst.IntNull)
              paramSendUserSysNo.Value = oParam.SendUserSysNo;
              else
              paramSendUserSysNo.Value = System.DBNull.Value;
              if (oParam.Memo != AppConst.StringNull)
              paramMemo.Value = oParam.Memo;
              else
              paramMemo.Value = System.DBNull.Value;
              if (oParam.IsPrintPackage != AppConst.IntNull)
              paramIsPrintPackage.Value = oParam.IsPrintPackage;
              else
              paramIsPrintPackage.Value = System.DBNull.Value;
              if (oParam.PackageID != AppConst.StringNull)
              paramPackageID.Value = oParam.PackageID;
              else
              paramPackageID.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;

              cmd.Parameters.Add(paramSysNo);
              cmd.Parameters.Add(paramSOSysNo);
              cmd.Parameters.Add(paramCustomerSysNo);
              cmd.Parameters.Add(paramSendAccessoryID);
              cmd.Parameters.Add(paramCreateTime);
              cmd.Parameters.Add(paramCreateUserSysNo);
              cmd.Parameters.Add(paramAreaSysNo);
              cmd.Parameters.Add(paramAddress);
              cmd.Parameters.Add(paramContact);
              cmd.Parameters.Add(paramPhone);
              cmd.Parameters.Add(paramStatus);
              cmd.Parameters.Add(paramUpdateUserSysNo);
              cmd.Parameters.Add(paramUpdateTime);
              cmd.Parameters.Add(paramAuditTime);
              cmd.Parameters.Add(paramAuditUserSysNo);
              cmd.Parameters.Add(paramSendTime);
              cmd.Parameters.Add(paramSendStockSynNo);
              cmd.Parameters.Add(paramShipTypeSysNo);
              cmd.Parameters.Add(paramSendUserSysNo);
              cmd.Parameters.Add(paramMemo);
              cmd.Parameters.Add(paramIsPrintPackage);
              cmd.Parameters.Add(paramPackageID);
              cmd.Parameters.Add(paramFreightUserSysNo);
              cmd.Parameters.Add(paramSetDeliveryManTime);

              return SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo);
        }