yangle
2023-12-12 096f0a528fc003ad60d50155af11a40d14b9f0d9
DAL/²Ö¿â¹ÜÀí/ClsKf_SellOutBillForLayUI.cs
@@ -47,6 +47,10 @@
                {
                    oCn.RunProc("exec h_p_Xs_UpDateSeOutStockRelation_Back_Del " + lngBillKey.ToString());
                }
                else if (DetailColl[0].HSourceBillType == "1401")                    //销售订单
                {
                    oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + lngBillKey.ToString());
                }
                else
                {
@@ -72,6 +76,10 @@
                {
                    oCn.RunProc("exec h_p_Xs_UpDateSeOutStockRelation_Back_Add " + lngBillKey.ToString());
                }
                else if(DetailColl[0].HSourceBillType == "1401")                    //销售订单
                {
                    oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Add " + lngBillKey.ToString());
                }
                else
                {
@@ -90,8 +98,8 @@
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Kf_ICStockBillMain set  " +
                string mainSql = "UpDate Kf_ICStockBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
@@ -99,7 +107,10 @@
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                    //========================================
                //========================================
                ",HOrgID=" + omodel.HOrgID +
                ",HStockORGID=" + omodel.HOrgID +
                ",HEmpID=" + omodel.HEmpID.ToString() +
                ",HSupID=" + omodel.HSupID.ToString() +
                ",HWHID=" + omodel.HWHID.ToString() +
@@ -122,7 +133,10 @@
                ",HLinkMan='" + omodel.HLinkMan + "'" +
                ",HConveyMoney=" + omodel.HConveyMoney.ToString() +
                ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
                " where HInterID=" + lngBillKey.ToString());
                " where HInterID=" + lngBillKey.ToString();
                //更新主表
                oCn.RunProc(mainSql);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
@@ -189,16 +203,18 @@
                oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into Kf_ICStockBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HOrgID,HStockORGID" +
                ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID"+
                ",HSecManagerID,HSellSID,HCurID" +
                ",HLinkMan,HLinkPhone" +
                ",HSeOrderBillNo,HConveyCompID,HConveyTypeID,HConveyMoney" +
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag,HCarriage,HCheckStatusMan" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMainSourceBillType + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HOrgID + "," + omodel.HOrgID +
                ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() +
                "," + omodel.HSecManagerID.ToString() + "," + omodel.HSellSID.ToString() + "," + omodel.HCurID.ToString() +
                ",'" + omodel.HLinkMan + "','" + omodel.HLinkPhone + "'" +
@@ -286,6 +302,8 @@
                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                //========================================================
                omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
                omodel.HSellSID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSellSID"]);
                omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);