yxj
11 小时以前 ebb5a4cabce43b6eff66a1f46f9adecb337ed820
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System;
using System.Collections.Generic;
using System.Text;
using SQLHelper;
using DBUtility;
 
namespace DAL
{
    public class Cls_S_Cg_POInStockBill
    {
        private string mvarReportTitle;
        public string MvarReportTitle
        {
            get { return mvarReportTitle; }
            set { mvarReportTitle = value; }
        }
        private string mvarItemKey;
        public string MvarItemKey
        {
            get { return mvarItemKey; }
            set { mvarItemKey = value; }
        }
        frmHlpBillList oFrm = new frmHlpBillList();
        const string ViewName = "h_v_Cg_POInStockBillList";
        public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
        //
        public Cls_S_Cg_POInStockBill()
        {
            mvarReportTitle = "收料通知单";
            mvarItemKey = "1103";
        }
        //
        public bool Refresh(string sWhere)
        {
            string sErr = "";
            int MainIDCol, SubIDCol, BillNoCol;
            string tSQL;
            ClsCN oCn = new ClsCN();
            tSQL = sWhere + " and isnull(审核人,'')<>'' order by 单据号 desc,hsubid ";
            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;
        }
        
    }
}