Ejemplo n.º 1
0
 private void frmRequestEdit_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_frmDefecture != null)
     {
         if (_frmDefecture.IsDisposed)
         {
             _frmDefecture = null;
         }
         else
         {
             _frmDefecture.Close();
         }
     }
     if (_frmMedicament != null)
     {
         if (_frmMedicament.IsDisposed)
         {
             _frmMedicament = null;
         }
         else
         {
             _frmMedicament.Close();
         }
     }
 }
Ejemplo n.º 2
0
        private void AddDetailMedicament()
        {
            if (OptionsBaseForm.ReadOnly)
            {
                return;
            }
            try
            {
                //if (ds_Request.SP_GetRequestHeader.Rows.Count == 0)
                //    throw new Exception("გთხოვთ შეავსოთ ძირითადი პარამეტრები.");

                bool  isContainsForm = FormHelper.ContainsForm(FormHelper.GetFormID(typeof(frmMedicamentBrowse), Handle));
                IForm frm            = FormHelper.CreateInstance(typeof(frmMedicamentBrowse), MdiParent, Handle);
                if (!isContainsForm)
                {
                    if (frm is frmMedicamentBrowse)
                    {
                        _frmMedicament = ((frmMedicamentBrowse)frm);
                        _frmMedicament.OptionsListForm.ServerMode      = true;
                        _frmMedicament.OptionsListForm.BrowseFormStyle = BrowseFormStyle.Browse;
                        _frmMedicament.OnChooseRecord += new CancelEventHandler(OnChooseProduct);
                        _frmMedicament.OptionsListForm.CloseAfterChoose = false;
                    }
                }

                frm.Show();
                frm.BringToFront();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "შეცდომა", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 3
0
        public void AddDetail()
        {
            if (ReadOnly)
            {
                return;
            }
            try
            {
                //if (ds_Purchasing.SP_GetPurchaseOrderHeader.Rows.Count == 0)
                //    throw new Exception("გთხოვთ შეავსოთ ძირითადი პარამეტრები.");

                bool  isContainsForm = FormHelper.ContainsForm(FormHelper.GetFormID(typeof(frmMedicamentBrowse), Handle));
                IForm frm            = FormHelper.CreateInstance(typeof(frmMedicamentBrowse), MdiParent, Handle);
                if (!isContainsForm)
                {
                    if (frm is frmMedicamentBrowse)
                    {
                        _frmm = ((frmMedicamentBrowse)frm);
                        _frmm.OptionsListForm.ServerMode      = true;
                        _frmm.OptionsListForm.BrowseFormStyle = BrowseFormStyle.Browse;
                        _frmm.OnChooseRecord += new CancelEventHandler(OnChooseProduct);
                        _frmm.OptionsListForm.CloseAfterChoose = false;
                        _frmm.CurrencyRate = CurrencyRate;
                    }
                }

                frm.Show();
                frm.BringToFront();
            }
            catch (Exception ex)
            {
                ExceptionHelper.Show(this, ex, "შეცდომა", MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
 private void frmWarehouseDescriptionEdit_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_frmm != null)
     {
         if (_frmm.IsDisposed)
         {
             _frmm = null;
         }
         else
         {
             _frmm.Close();
         }
     }
 }