private void EditValue(int rowhandle)
        {
            if (rowhandle < 0)
            {
                return;
            }
            NhapHangTraMuaInfor item = (NhapHangTraMuaInfor)grvDanhSach.GetRow(rowhandle);

            if (item != null)
            {
                if (item.LoaiChungTu == (int)TransactionType.NHAPTRAHANGMUA)
                {
                    frmChiTietYeuCauNhapLaiHangMua frm = new frmChiTietYeuCauNhapLaiHangMua(item);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        LoadDataSource();
                    }
                }
                else if (item.LoaiChungTu == (int)TransactionType.DON_HANG_NHAP_LAI && nguoiDung.SupperUser == 1)
                {
                    frmChiTietYeuCauNhapLaiKhac frm = new frmChiTietYeuCauNhapLaiKhac(item);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        LoadDataSource();
                    }
                }
            }
        }
        private void tsbNhapLaiKhac_Click(object sender, EventArgs e)
        {
            frmChiTietYeuCauNhapLaiKhac frm = new frmChiTietYeuCauNhapLaiKhac();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadDataSource();
            }
        }
Example #3
0
        private void btnLapDonHangNLaiKhac_Click(object sender, EventArgs e)
        {
            if (gvListChungTu.FocusedRowHandle < 0)
            {
                return;
            }
            ChungTuBanHangInfor ct = (ChungTuBanHangInfor)gvListChungTu.GetRow(gvListChungTu.FocusedRowHandle);

            if (ct != null)
            {
                frmChiTietYeuCauNhapLaiKhac frm = new frmChiTietYeuCauNhapLaiKhac(ct);
                frm.HideMenu();
                frm.ShowDialog();
            }
        }