Ejemplo n.º 1
0
        /// <summary>
        /// hàm thực hiện việc cho phép thông tin của phiếu nhập
        /// </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_phieuxuatkho_benhnhan frm = new frm_themmoi_phieuxuatkho_benhnhan();
                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();
            }
        }
Ejemplo n.º 2
0
 /// <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_phieuxuatkho_benhnhan frm = new frm_themmoi_phieuxuatkho_benhnhan();
         frm.m_enAction             = action.Insert;
         frm.p_mDataPhieuNhapKho    = m_dtDataNhapKho;
         frm.grdList                = grdList;
         frm.KIEU_THUOC_VT          = KIEU_THUOC_VT;
         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();
     }
 }