예제 #1
0
        private void butluuHD_Click(object sender, EventArgs e)
        {
            var    HoaDon_BLL = new HoaDon_BLL();
            string MaKH       = comboBox1.SelectedValue.ToString();
            string MaNV       = cbnhanvien.SelectedValue.ToString();

            datahoadon.DataSource = HoaDon_BLL.HoaDon_Insert(txtsoHD.Text, MaKH, MaNV, DateTime.Parse(dateTimePicker1.Value.ToString()), "Khó Quá", "Tiền Mặt");
            datahoadon.DataSource = HoaDon_BLL.HoaDon_Select_Where(txtsoHD.Text);


            foreach (DataRow dr in CTHD.Rows)
            {
                var CTHD_BLL = new CTHD_BLL();
                dataCTHD.DataSource = CTHD_BLL.CTHD_Insert(txtsoHD.Text, dr[0].ToString(), int.Parse(txtsoluong.Text));
                dataCTHD.DataSource = CTHD_BLL.CTHD_Select_Where(txtsoHD.Text);
            }
            CTHD.Clear();
            CTHD_HOADON_Load(sender, e);
        }