Пример #1
0
        public static FrmClienteMant Instance()
        {
            if (frmInstance == null || frmInstance.IsDisposed == true)
            {
                frmInstance = new FrmClienteMant();
            }

            frmInstance.BringToFront();

            return(frmInstance);
        }
Пример #2
0
        private void Editar(UI.Cliente uiCliente)
        {
            try
            {
                var frmClienteMant = FrmClienteMant.Instance();
                frmClienteMant.MdiParent = this.MdiParent;
                frmClienteMant.Show();

                frmClienteMant.frmList = this;
                frmClienteMant.Cargar(uiCliente);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            try
            {
                lastRowIndex = this.dgvClientes.Rows.Count;

                var frmClienteMant = FrmClienteMant.Instance();
                frmClienteMant.MdiParent = this.MdiParent;
                frmClienteMant.Show();

                frmClienteMant.frmList = this;
            }
            catch (Exception ex)
            {
                General.ErrorMessage(ex.Message);
            }
        }