Exemplo n.º 1
0
        private void btnsua_Click(object sender, EventArgs e)
        {
            ePhieuQLiKho qlk = new ePhieuQLiKho();

            qlk._maPhieuQli = txtmphieu.Text;
            qlk._ngayLapQLi = txtngaylap.Text;
            qlk._maNV       = txtmanv.Text;
            qlk._maKho      = txtmakho.Text;
            qlk._tinhTrang  = txttinhtrang.Text;
            bool kq = pqlkBLL.UpDatePhieuQLK(qlk);

            if (kq == false)
            {
                MessageBox.Show("Không có mã để sửa!", "Thông báo!");
            }
            else
            {
                MessageBox.Show("Sửa thành công!", "Thông báo!");
                dataPQLK.DataSource = pqlkBLL.getAllPQLKho();
            }
        }
Exemplo n.º 2
0
        private void btnXacNhan_Click(object sender, EventArgs e)
        {
            string map = txtmphieu.Text;

            if (bllpqlk.Kiemtrasutontai(map) == true)
            {
                bllpqlk.UpDatePhieuQLK(map, comboboxMaNV.Text, comboBoxMaKho.Text, comboTinhTrang.Text, dtpNgayLap.Value);
                MessageBox.Show("Sửa xong !!");
                chedobutton(true);
                btnXacNhan.Enabled = false;
                chedotextbox(false);

                listpqlk = bllpqlk.getAllPQLKho();
                duadulieulendgvCTPQL(dgvPQLK, listpqlk);
                btnsua.Text = "Sửa";
            }
            else
            {
                MessageBox.Show("bạn chưa chọn vào phiếu quản lý kho cần sửa thông tin!");
            }
        }