using System; 
 | 
using System.Collections.Generic; 
 | 
using System.Text; 
 | 
using SQLHelper; 
 | 
using DBUtility; 
 | 
  
 | 
namespace DAL 
 | 
{ 
 | 
    public class Cls_S_K3_ICMOList 
 | 
    { 
 | 
        private string mvarReportTitle; 
 | 
        public string MvarReportTitle 
 | 
        { 
 | 
            get { return mvarReportTitle; } 
 | 
            set { mvarReportTitle = value; } 
 | 
        } 
 | 
        private string mvarItemKey; 
 | 
        public string MvarItemKey 
 | 
        { 
 | 
            get { return mvarItemKey; } 
 | 
            set { mvarItemKey = value; } 
 | 
        } 
 | 
        DBUtility.frmHlpBillList oFrm = new DBUtility.frmHlpBillList(); 
 | 
        const string ViewName = "h_v_K3_ICMOList"; 
 | 
        public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>(); 
 | 
        // 
 | 
        public Cls_S_K3_ICMOList() 
 | 
        { 
 | 
            mvarReportTitle = "生产任务单"; 
 | 
            mvarItemKey = "85"; 
 | 
        } 
 | 
        // 
 | 
        public bool Refresh(string sWhere) 
 | 
        { 
 | 
            string sErr = ""; 
 | 
            int MainIDCol, SubIDCol, BillNoCol; 
 | 
            string tSQL; 
 | 
            ClsCN oCn = new ClsCN(); 
 | 
            tSQL = sWhere + "  order by 任务单号  "; 
 | 
            try 
 | 
            { 
 | 
                oFrm.sPrimaryCol = "物料"; 
 | 
                oFrm.Text = mvarReportTitle; 
 | 
                oFrm.lblCaption.Text = mvarReportTitle; 
 | 
                oFrm.tSQL = tSQL; 
 | 
                oFrm.ViewName = ViewName; 
 | 
                oFrm.ShowDialog(); 
 | 
                //返回数据到集合中 
 | 
                oBillSelectColl.Clear(); 
 | 
                MainIDCol = oFrm.Fun_GetCol("hmainid"); 
 | 
                SubIDCol = oFrm.Fun_GetCol("hsubid"); 
 | 
                BillNoCol = oFrm.Fun_GetCol("任务单号"); 
 | 
                int SelectCol = oFrm.Fun_GetCol("选择"); 
 | 
                // 
 | 
                for (int i = oFrm.grdMain.FixedRows; i < oFrm.grdMain.Rows - 1; i++) 
 | 
                { 
 | 
                    if (ClsPub.isStrNull( oFrm.grdMain.get_TextMatrix(i, SelectCol)) == "*") 
 | 
                    { 
 | 
                        BillSelect oSelect = new BillSelect(); 
 | 
                        oSelect.BillNo = ClsPub.isStrNull(oFrm.grdMain.get_TextMatrix(i, BillNoCol)); 
 | 
                        oSelect.BillMainID = ClsPub.isLong(oFrm.grdMain.get_TextMatrix(i, MainIDCol)); 
 | 
                        oSelect.BillSubID = ClsPub.isLong(oFrm.grdMain.get_TextMatrix(i, SubIDCol)); 
 | 
                        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; 
 | 
        } 
 | 
         
 | 
    } 
 | 
} 
 |