Beispiel #1
0
        //
        //
        //

        private void button14_Click(object sender, EventArgs e)
        {
            string sl = cboTimKiem.Text;

            try
            {
                //  sl = sl.Replace();

                if (sl == "Mã hàng hóa")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheomahanghoa(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
                else if (sl == "Tên hàng hóa")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheotentenhanghoa(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
                //
                if (sl == "Mã khách hàng")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheomakhachhang(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
                else if (sl == "Tên khách hàng")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheotenkhachhang(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
                //
                //
                if (sl == "Mã kho")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheomakho(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
                else if (sl == "Tên kho")
                {
                    dt = BUS_XuatKho.hienthixuatkhotheotenkho(cmbKey.Text);
                    loaddata1(dt);
                    bindings();
                }
            }
            catch (Exception ex)
            {
            }
        }
Beispiel #2
0
 //xoa
 private void btnXoa_Click(object sender, EventArgs e)
 {
     try
     {
         BUS_XuatKho.Xoa_xuatkho(txtSoPX.Text);
         DialogResult dr = MessageBox.Show("Đã Xóa", "Thông Báo", MessageBoxButtons.OK);
         if (dr == DialogResult.OK)
         {
             loaddata();
         }
     }
     catch (Exception ex)
     {
         //MessageBox.Show("Lỗi");
     }
 }
Beispiel #3
0
 private void btnSua_Click(object sender, EventArgs e)
 {
     try
     {
         DTO_XuatKho sv = new DTO_XuatKho(txtSoPX.Text, txtMaKho.Text, txtNgayXuat.Text, txtMaKH.Text, txtNoiDung.Text, txtMaHH.Text, txtSoLuongHH.Text);
         BUS_XuatKho.Sua_xuatkho(sv);
         DialogResult dr = MessageBox.Show("Sua thanh Cong", "Thông Báo", MessageBoxButtons.OK);
         loaddata();
         if (dr == DialogResult.OK)
         {
             loaddata();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Sua không thành công!\n" + ex.Message);
     }
 }
Beispiel #4
0
 // co ban //
 private void loaddata()
 {
     dt = BUS_XuatKho.Hienthi_xuatkho_all();
     grdGiangVien.DataSource = dt;
 }