DAL/Ô´µ¥/Cls_S_Xt_BaseBill.cs
@@ -25,7 +25,8 @@
        public string sOrderSql2 = "";
        public string sKeyCol2 = "";
        public string sShowItemSql2 = "";
        public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
        public frmHlpBillList oFrm;
        //public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
        public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
        public List<DBUtility.BillSelect_A3> oBillSelectColl2 = new List<DBUtility.BillSelect_A3>();
        //
@@ -53,6 +54,7 @@
            tSQL = sWhere + sCondtion + sOrderSql;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol;
                oFrm.Text = mvarReportTitle;
                oFrm.lblCaption.Text = mvarReportTitle;
@@ -112,6 +114,7 @@
            tSQL = sWhere + sCondtion2 + sOrderSql2;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol2;
                oFrm.Text = mvarReportTitle2;
                oFrm.lblCaption.Text = mvarReportTitle2;
@@ -168,6 +171,7 @@
            tSQL = sWhere + sCondtion2 + sOrderSql2;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol2;
                oFrm.Text = mvarReportTitle2;
                oFrm.lblCaption.Text = mvarReportTitle2;
@@ -257,6 +261,7 @@
            tSQL = sWhere + sCondtion + sOrderSql;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol;
                oFrm.Text = mvarReportTitle;
                oFrm.lblCaption.Text = mvarReportTitle;
@@ -295,6 +300,56 @@
            return true;
        }
        //根据源单号 æ¨¡æ‹ŸæŸ¥è¯¢æ•°æ®
        /// <summary>
        /// æ˜¾ç¤ºæ•°æ®
        /// </summary>
        /// <param name="sWhere">主SQL</param>
        /// <param name="sCondtion">过滤条件</param>
        /// <param name="sOrderSql">排序条件</param>
        /// <param name="sKeyCol">不可重复列</param>
        /// <returns></returns>
        public virtual bool RefreshBySourceBillNo(string sWhere)
        {
            string sErr = "";
            string tSQL;
            ClsCN oCn = new ClsCN();
            tSQL = " select hmainid,hsubid,单据号 from " + ViewName + sWhere + sOrderSql;
            try
            {
                DataSet ds = oCn.RunProcReturn(tSQL, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    return false;
                }
                //返回数据到集合中
                oBillSelectColl.Clear();
                //循环 é€‰ä¸­è¡Œ
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    BillSelect oSelect = new BillSelect();
                    oSelect.BillNo = ClsPub.isStrNull(ds.Tables[0].Rows[i]["单据号"]);
                    oSelect.BillMainID = ClsPub.isLong(ds.Tables[0].Rows[i]["hmainid"]);
                    oSelect.BillSubID = ClsPub.isLong(ds.Tables[0].Rows[i]["hsubid"]);
                    oSelect.BillTitle = mvarReportTitle;
                    oSelect.BillType = mvarItemKey;
                    oBillSelectColl.Add(oSelect);
                }
                //
                if (oBillSelectColl.Count > 0)
                    return true;
                else
                    return false;
            }
            catch (Exception e)
            {
                sErr = e.Message;
            }
            return true;
        }
    }
}