YL
2021-10-08 2ac00187f30033a0cc8238598034b30150956ea2
WebAPI/DLL/ClsPay_SingleBalBill.cs
@@ -5,7 +5,7 @@
namespace DAL
{
    public  class ClsPay_SingleBalBill:DBUtility.ClsXt_BaseBill
    public class ClsPay_SingleBalBill : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsPay_SingleBalBillMain omodel = new Model.ClsPay_SingleBalBillMain();
        public List<Model.ClsPay_SingleBalBillSub> DetailColl = new List<Model.ClsPay_SingleBalBillSub>();
@@ -16,9 +16,9 @@
            base.MvarItemKeySub2 = "Pay_SingleBalBillKS_HeaderText";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey="Pay_SingleBalBillMain";
            base.MvarReportTitle="工资结算单(单人)";
            base.BillType="2205";
            base.MvarItemKey = "Pay_SingleBalBillMain";
            base.MvarReportTitle = "工资结算单(单人)";
            base.BillType = "2205";
            base.HBillSubType = "2205";
        }
@@ -29,7 +29,7 @@
        {
            DetailColl = null;
        }
        #endregion   自定义方法
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
@@ -120,8 +120,8 @@
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HSaveFlag" +
                ",HGroupID,HDeptID,HEmpID,HPayType,HExplanation,HInnerBillNo" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + Convert.ToString(omodel.HSaveFlag ? 1 : 0) +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + Convert.ToString(omodel.HSaveFlag ? 1 : 0) +
                ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
                ") ");
                //插入子表
@@ -176,9 +176,9 @@
            try
            {
                //查询主表
                DataSet Ds ;
                DataSet Ds;
                Ds = oCn.RunProcReturn("Select * from Pay_SingleBalBillMain Where HInterID=" + lngBillKey.ToString(), "Pay_SingleBalBillMain");
                if(Ds.Tables[0].Rows.Count==0)
                if (Ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "单据未找到!";
                    return false;
@@ -217,9 +217,9 @@
                omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
                omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
                //
                //循环
                DataSet DsSub ;
                DataSet DsSub;
                DsSub = oCn.RunProcReturn("Select * from Pay_SingleBalBillSub Where HInterID=" + lngBillKey.ToString() + "order by HEntryID", "Pay_SingleBalBillSub");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
@@ -233,8 +233,8 @@
                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
                    oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
                    oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
@@ -282,8 +282,8 @@
                throw (e);
            }
        }
    }
}