/// <summary> /// hàm thực hiện việc cho phép thông tin của phiếu cấp phát /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdUpdatePhieuNhap_Click(object sender, EventArgs e) { try { if (!IsValid4UpdateDelete()) { return; } int IdPhieu = Utility.Int32Dbnull(grdList.GetValue(TPhieuNhapxuatthuoc.Columns.IdPhieu), -1); frm_themmoi_phieuxuatthuoc_Bnnoitru frm = new frm_themmoi_phieuxuatthuoc_Bnnoitru(); frm.m_enAction = action.Update; frm.KIEU_THUOC_VT = KIEU_THUOC_VT; frm.grdList = grdList; frm.p_mDataPhieuNhapKho = m_dtDataNhapKho; frm.txtIDPhieuNhapKho.Text = Utility.sDbnull(IdPhieu); frm.ShowDialog(); if (frm.b_Cancel) { grdList_SelectionChanged(grdList, new EventArgs()); } } catch (Exception exception) { if (globalVariables.IsAdmin) { Utility.ShowMsg(exception.ToString()); } } finally { ModifyCommand(); } }
/// <summary> /// hàm thực hiện việc thêm phiếu /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdThemPhieuNhap_Click(object sender, EventArgs e) { try { frm_themmoi_phieuxuatthuoc_Bnnoitru frm = new frm_themmoi_phieuxuatthuoc_Bnnoitru(); frm.m_enAction = action.Insert; frm.p_mDataPhieuNhapKho = m_dtDataNhapKho; frm.KIEU_THUOC_VT = KIEU_THUOC_VT; frm.grdList = grdList; frm.txtIDPhieuNhapKho.Text = "-1"; frm.ShowDialog(); if (frm.b_Cancel) { grdList_SelectionChanged(grdList, new EventArgs()); } } catch (Exception exception) { if (globalVariables.IsAdmin) { Utility.ShowMsg(exception.ToString()); } } finally { ModifyCommand(); } }