Exemple #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            #region LLenando el Combo de las Minas
            List <Ent_VwMinas> Lista1 = new List <Ent_VwMinas>();
            Lista1 = ConsultaTablas.ListaVwMinas("VwMinas", "", 0, 0.00);

            this.CmbMinas.DataSource    = Lista1;
            this.CmbMinas.DisplayMember = "Nombre";
            this.CmbMinas.ValueMember   = "Id";
            this.CmbMinas.SelectedIndex = -1;
            #endregion

            #region Limpiando Datos generales Contratos Operaciones
            this.TxbCodigo.Text                 = "";
            this.TxbCodigoPM.Text               = "";
            this.TxbNombre.Text                 = "";
            this.TxbExpediente.Text             = "";
            this.CmbDepende.SelectedIndex       = -1;
            this.CmbTenorPromedio.SelectedIndex = -1;
            this.TxbArea.Text                  = "";
            this.CmbMinas.SelectedIndex        = -1;
            this.CmbTipoContrato.SelectedIndex = -1;
            this.TxbEste.Text                  = "";
            this.TxbNorte.Text                 = "";
            this.TxbElevacion.Text             = "";
            this.TxbDetalle.Text               = "";
            this.TxbCodigoPlaza.Text           = "";
            this.TxbDetallePlaza.Text          = "";
            this.TxbEmail.Text                 = "";
            this.ChbInformes.Checked           = false;
            this.TxbCodigo.Focus();
            this.ChbEstado.Checked             = false;
            this.ChbEstado.Text                = "Estado";
            this.ChbRecuperacion.Checked       = false;
            this.CmbTipoContrato.SelectedIndex = -1;
            #endregion

            #region Limpiando Page Contratos y Liquidacion
            this.CmbEsquema.SelectedIndex     = -1;
            this.CmbContratista.SelectedIndex = -1;
            this.DtpContrato.Text             = "";
            this.DtpInscriContrato.Text       = "";
            this.DtpVenciContrato.Text        = "";
            this.TxbRecuperacion.Text         = "";
            this.TxbFondo.Text           = "";
            this.NmrDuracion.Value       = 0;
            this.ChbTenores.Checked      = false;
            this.ChbAnexos.Checked       = false;
            this.ChbClausulas.Checked    = false;
            this.ChbFondo.Checked        = false;
            this.DgvContratos.DataSource = null;
            this.TxbPorcImpuestos.Text   = "0.00";
            #endregion

            #region Limpiando Page Adjuntos
            this.TxbAdjuntosPath.Text    = "";
            this.TxbAdjuntosDetalle.Text = "";
            this.DtgAdjunto.DataSource   = null;
            #endregion

            ConsultaEntidades Maestro = new ConsultaEntidades();

            #region LLenando el Combo de los Tipo de Contratos
            List <Ent_VwTipoContrato> Lista2 = new List <Ent_VwTipoContrato>();
            Lista2 = ConsultaTablas.ListaVwTipoContrato("VwTipoContrato", "", 0, 0.00);

            this.CmbTipoContrato.DataSource    = Lista2;
            this.CmbTipoContrato.DisplayMember = "Nombre";
            this.CmbTipoContrato.ValueMember   = "Id";
            this.CmbTipoContrato.SelectedIndex = 0;
            #endregion

            #region LLenando el Combo de los Contenedores
            List <Ent_Contenedores> Lista3 = new List <Ent_Contenedores>();
            Lista3 = ConsultaTablas.ListaContenedores("ContenedoresGeneral", "", 0, 0.00);

            this.CmbDepende.DataSource    = Lista3;
            this.CmbDepende.DisplayMember = "Nombre";
            this.CmbDepende.ValueMember   = "Codigo";
            this.CmbDepende.SelectedIndex = -1;
            #endregion

            #region LLenando el Combo de los Tipo de Empresas
            List <Ent_TiposDeEmpresa> Lista4 = new List <Ent_TiposDeEmpresa>();
            Lista4 = ConsultaTablas.ListaTipoEmpresas("TipoEmpresas", "", 0, 0.00);

            this.CmbTipoEmpresa.DataSource    = Lista4;
            this.CmbTipoEmpresa.DisplayMember = "Nombre";
            this.CmbTipoEmpresa.ValueMember   = "Id";
            this.CmbTipoEmpresa.SelectedIndex = -1;
            #endregion

            #region LLenando el Combo de los Esquema
            List <Ent_Esquemas> Lista5 = new List <Ent_Esquemas>();
            Lista5 = ConsultaTablas.ListaEsquemas("EsquemasGeneral", "", 0, 0.00);

            this.CmbEsquema.DataSource    = Lista5;
            this.CmbEsquema.DisplayMember = "Nombre";
            this.CmbEsquema.ValueMember   = "Codigo";
            this.CmbEsquema.SelectedIndex = -1;
            #endregion

            #region LLenando el Combo de los Contratistas
            List <Ent_VwContratistas> Lista6 = new List <Ent_VwContratistas>();
            Lista6 = ConsultaTablas.ListaVwContratista("VwContratistas", "", 0, 0.00);

            this.CmbContratista.DataSource    = Lista6;
            this.CmbContratista.DisplayMember = "Nombre";
            this.CmbContratista.ValueMember   = "Id";
            this.CmbContratista.SelectedIndex = -1;
            #endregion

            this.TxbCodigo.Focus();
        }