Ejemplo n.º 1
0
 ////自定义绑定数据
 //private void requistionDate()
 //{
 //    this.dataGridViewQG.AutoGenerateColumns = false;// 关闭自动创建列
 //    string sql = "select * from HY_RequisitionInfo order by r_ID desc";
 //    this.dataGridViewQG.DataSource = hyrepinfobll.ExecuteQuery(sql);
 //}
 //自定义绑定listView数据
 private void listViewDate()
 {
     string sql = "select distinct r_DID from HY_RequisitionInfo";
     HY_BLL.HY_ProcurementBLL hyul = new HY_ProcurementBLL();
     this.listView1.View = View.Details;
     this.listView1.FullRowSelect = true;
     SqlDataReader sdr = hyul.f_RequisitionInfo(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem(sdr[0].ToString());
         //lv.SubItems.Add(sdr[1].ToString());
         this.listView1.Items.Add(lv);
     }
 }
Ejemplo n.º 2
0
 //自定义绑定listView数据
 private void listViewDate(string sql)
 {
     HY_BLL.HY_ProcurementBLL hyul = new HY_ProcurementBLL();
     this.listView1.GridLines = true;
     this.listView1.FullRowSelect = true;
     SqlDataReader sdr = hyul.f_RequisitionInfo(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem(sdr[1].ToString());
         lv.SubItems.Add(sdr[0].ToString());
         lv.SubItems.Add(sdr[2].ToString());
         lv.SubItems.Add(sdr[3].ToString());
         this.listView1.Items.Add(lv);
     }
 }
Ejemplo n.º 3
0
 //构造函数
 public HY_Purchaseorder()
 {
     InitializeComponent();
     hyprocmentbll = new HY_ProcurementBLL();
     valid         = new HYWJ.HY_System.OperateAndValidate();
 }
Ejemplo n.º 4
0
        private LL.Main.HY_System.OperateAndValidate valid; //实例化数据验证类

        #endregion Fields

        #region Constructors

        //构造函数
        public LL_PurchaseOrder()
        {
            InitializeComponent();
            hyprocmentbll = new HY_ProcurementBLL();
            valid = new LL.Main.HY_System.OperateAndValidate();
        }
Ejemplo n.º 5
0
 //自定义绑定listView数据
 private void listViewDate(string sql)
 {
     HY_BLL.HY_ProcurementBLL hyul = new HY_ProcurementBLL();
     this.listView1.GridLines = true;
     this.listView1.FullRowSelect = true;
     SqlDataReader sdr = hyul.f_RequisitionInfo(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem();
         if (sdr[0].ToString() == "已确认")
         {
             lv.ImageIndex = 0;
         }
         else
         {
             lv.ImageIndex = 1;
         }
         lv.SubItems.Add(sdr[1].ToString());
         lv.SubItems.Add(sdr[2].ToString());
         lv.SubItems.Add(sdr[3].ToString());
         lv.SubItems.Add(sdr[4].ToString());
         lv.SubItems.Add(sdr[5].ToString());
         lv.SubItems.Add(sdr[6].ToString());
         lv.SubItems.Add(sdr[7].ToString());
         lv.SubItems.Add(sdr[8].ToString());
         lv.SubItems.Add(sdr[9].ToString());
         lv.SubItems.Add(sdr[10].ToString());
         lv.SubItems.Add(sdr[11].ToString());
         lv.SubItems.Add(sdr[12].ToString());
         lv.SubItems.Add(sdr[13].ToString());
         lv.SubItems.Add(sdr[14].ToString());
         this.listView1.Items.Add(lv);
     }
 }
Ejemplo n.º 6
0
 //自定义绑定数据
 private void requistionDate(string sql)
 {
     HY_BLL.HY_ProcurementBLL hyul = new HY_ProcurementBLL();
     this.listView1.View = View.Details;
     this.listView1.GridLines = true;
     this.listView1.FullRowSelect = true;
     SqlDataReader sdr = hyul.f_RequisitionInfo(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem(sdr[0].ToString());
         lv.SubItems.Add(sdr[1].ToString());
         lv.SubItems.Add(sdr[2].ToString());
         lv.SubItems.Add(sdr[3].ToString());
         if (sdr[3].ToString() ==string.Empty)
         {
             lv.ImageIndex = 0;
         }
         if (sdr[3].ToString()== "1")
         {
             lv.ImageIndex = 1;
         }
         if (sdr[3].ToString() == "2")
         {
             lv.ImageIndex = 2;
         }
         if (sdr[3].ToString() == "3")
         {
             lv.ImageIndex = 3;
         }
         this.listView1.Items.Add(lv);
     }
 }