Ejemplo n.º 1
0
        public void LoadEnterCoupon()
        {
            txt_ID.Text = IdEnter;
            //Load du lieu phieu nhap,chi tiet phieu nhap
            DataTable temp = _enter.LoadEnterCoupon_Id(IdEnter);

            for (int i = 0; i < temp.Columns.Count; i++)
            {
                dtP_DayCreate.Text = temp.Rows[0][0].ToString();
                cbb_Supplier.Text  = temp.Rows[0][1].ToString();
                cbb_Reson.Text     = temp.Rows[0][2].ToString();
                cbb_Staff.Text     = temp.Rows[0][3].ToString();
            }
            DataTable list = _item.GetListDetail_IdEnter(IdEnter);

            for (int i = 0; i < list.Rows.Count; i++)
            {
                string   id     = list.Rows[i][0].ToString();
                string   name   = list.Rows[i][1].ToString();
                string   number = list.Rows[i][3].ToString();
                string   unit   = list.Rows[i][2].ToString();
                string   price  = list.Rows[i][4].ToString();
                string   money  = list.Rows[i][5].ToString();
                string[] row    = new string[] { name, number, unit, price, money, id };
                dgV_DetailsCoupon.Rows.Add(row);
            }
            SumMoneyItem();
        }