//CONTROLAR COMO BUSCA Y COMO TRAE LOS DATOS public void CargarGrilla(string codigo) { cmbLista comboBuscar = new cmbLista(); grdGrillaEdit grilla = new grdGrillaEdit(); _filtroCampos = ""; _filtroValores = ""; string tabla = ""; switch (codigo) { case "1": { comboBuscar = _vista.busquedaPrimaria; _filtroValores = _vista.filtro1; tabla = tablaPrimaria; grilla = _vista.grillaPrimaria; _Campo = _camposPrimarios; break; } case "2": { comboBuscar = _vista.busquedaSecundaria; tabla = tablaSecundaria; grilla = _vista.grillaSecundaria; _filtroValores = _vista.filtro2; _Campo = _camposSecundarios; break; } } _filtroCampos = comboBuscar.SelectedValue.ToString(); TablasBus oTablasBus = new TablasBus(); grilla.DataSource = oTablasBus.TablasBusquedaGetAllFilter(tabla, _Campo.Replace('&', ','), _filtroCampos, _filtroValores); switch (codigo) { case "1": { _vista.cantidadPrimaria = "Se encontraron " + _vista.grillaPrimaria.RowCount.ToString() + " registros"; break; } case "2": { _vista.cantidadSecundaria = "Se encontraron " + _vista.grillaSecundaria.RowCount.ToString() + " registros"; break; } } }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCrudGrilla)); this.gpbGrupoEstado = new Controles.contenedores.gpbGrupo(); this.cmbEstado = new Controles.datos.cmbLista(); this.lblEEstado = new Controles.labels.lblEtiqueta(); this.gpbGrupoFecha = new Controles.contenedores.gpbGrupo(); this.dtpFechaHasta = new System.Windows.Forms.DateTimePicker(); this.dtpFechaDesde = new System.Windows.Forms.DateTimePicker(); this.lblEFechaHasta = new Controles.labels.lblEtiqueta(); this.lblEFechaDesde = new Controles.labels.lblEtiqueta(); this.gpbGrupo2 = new Controles.contenedores.gpbGrupo(); this.grdGrillaEdit1 = new Controles.datos.grdGrillaEdit(); this.lblCantidad = new Controles.labels.lblEtiqueta(); this.gpbGrupo3 = new Controles.contenedores.gpbGrupo(); this.btnCancelar1 = new Controles.buttons.btnCancelar(); this.btnAceptar1 = new Controles.buttons.btnAceptar(); this.gpbGrupo1 = new Controles.contenedores.gpbGrupo(); this.lblEtiqueta3 = new Controles.labels.lblEtiqueta(); this.lblEtiqueta2 = new Controles.labels.lblEtiqueta(); this.txtFiltro1 = new Controles.txtFiltro(); this.cmbLista1 = new Controles.datos.cmbLista(); this.gpbGrupoEstado.SuspendLayout(); this.gpbGrupoFecha.SuspendLayout(); this.gpbGrupo2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdGrillaEdit1)).BeginInit(); this.gpbGrupo3.SuspendLayout(); this.gpbGrupo1.SuspendLayout(); this.SuspendLayout(); // // gpbGrupoEstado // this.gpbGrupoEstado.Controls.Add(this.cmbEstado); this.gpbGrupoEstado.Controls.Add(this.lblEEstado); this.gpbGrupoEstado.Location = new System.Drawing.Point(584, 7); this.gpbGrupoEstado.Name = "gpbGrupoEstado"; this.gpbGrupoEstado.Size = new System.Drawing.Size(176, 98); this.gpbGrupoEstado.TabIndex = 9; this.gpbGrupoEstado.TabStop = false; this.gpbGrupoEstado.Visible = false; // // cmbEstado // this.cmbEstado.FormattingEnabled = true; this.cmbEstado.Location = new System.Drawing.Point(6, 54); this.cmbEstado.Name = "cmbEstado"; this.cmbEstado.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.cmbEstado.Size = new System.Drawing.Size(164, 21); this.cmbEstado.TabIndex = 8; // // lblEEstado // this.lblEEstado.AutoSize = true; this.lblEEstado.Location = new System.Drawing.Point(6, 16); this.lblEEstado.Name = "lblEEstado"; this.lblEEstado.Size = new System.Drawing.Size(40, 13); this.lblEEstado.TabIndex = 8; this.lblEEstado.Text = "Estado"; // // gpbGrupoFecha // this.gpbGrupoFecha.Controls.Add(this.dtpFechaHasta); this.gpbGrupoFecha.Controls.Add(this.dtpFechaDesde); this.gpbGrupoFecha.Controls.Add(this.lblEFechaHasta); this.gpbGrupoFecha.Controls.Add(this.lblEFechaDesde); this.gpbGrupoFecha.Location = new System.Drawing.Point(352, 7); this.gpbGrupoFecha.Name = "gpbGrupoFecha"; this.gpbGrupoFecha.Size = new System.Drawing.Size(226, 98); this.gpbGrupoFecha.TabIndex = 8; this.gpbGrupoFecha.TabStop = false; this.gpbGrupoFecha.Visible = false; // // dtpFechaHasta // this.dtpFechaHasta.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpFechaHasta.Location = new System.Drawing.Point(117, 55); this.dtpFechaHasta.Name = "dtpFechaHasta"; this.dtpFechaHasta.Size = new System.Drawing.Size(96, 20); this.dtpFechaHasta.TabIndex = 9; // // dtpFechaDesde // this.dtpFechaDesde.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpFechaDesde.Location = new System.Drawing.Point(6, 55); this.dtpFechaDesde.Name = "dtpFechaDesde"; this.dtpFechaDesde.Size = new System.Drawing.Size(96, 20); this.dtpFechaDesde.TabIndex = 8; // // lblEFechaHasta // this.lblEFechaHasta.AutoSize = true; this.lblEFechaHasta.Location = new System.Drawing.Point(114, 16); this.lblEFechaHasta.Name = "lblEFechaHasta"; this.lblEFechaHasta.Size = new System.Drawing.Size(68, 13); this.lblEFechaHasta.TabIndex = 7; this.lblEFechaHasta.Text = "Fecha Hasta"; // // lblEFechaDesde // this.lblEFechaDesde.AutoSize = true; this.lblEFechaDesde.Location = new System.Drawing.Point(6, 16); this.lblEFechaDesde.Name = "lblEFechaDesde"; this.lblEFechaDesde.Size = new System.Drawing.Size(71, 13); this.lblEFechaDesde.TabIndex = 6; this.lblEFechaDesde.Text = "Fecha Desde"; // // gpbGrupo2 // this.gpbGrupo2.Controls.Add(this.grdGrillaEdit1); this.gpbGrupo2.Controls.Add(this.lblCantidad); this.gpbGrupo2.Controls.Add(this.gpbGrupo3); this.gpbGrupo2.Location = new System.Drawing.Point(12, 111); this.gpbGrupo2.Name = "gpbGrupo2"; this.gpbGrupo2.Size = new System.Drawing.Size(748, 831); this.gpbGrupo2.TabIndex = 1; this.gpbGrupo2.TabStop = false; // // grdGrillaEdit1 // this.grdGrillaEdit1.Location = new System.Drawing.Point(6, 25); this.grdGrillaEdit1.Name = "grdGrillaEdit1"; this.grdGrillaEdit1.Size = new System.Drawing.Size(650, 500); this.grdGrillaEdit1.TabIndex = 3; this.grdGrillaEdit1.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdGrillaEdit1_CellBeginEdit); this.grdGrillaEdit1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdGrillaEdit1_CellEndEdit); this.grdGrillaEdit1.UserAddedRow += new System.Windows.Forms.DataGridViewRowEventHandler(this.grdGrillaEdit1_UserAddedRow); this.grdGrillaEdit1.UserDeletingRow += new System.Windows.Forms.DataGridViewRowCancelEventHandler(this.grdGrillaEdit1_UserDeletingRow); // // lblCantidad // this.lblCantidad.AutoSize = true; this.lblCantidad.Location = new System.Drawing.Point(7, 791); this.lblCantidad.Name = "lblCantidad"; this.lblCantidad.Size = new System.Drawing.Size(49, 13); this.lblCantidad.TabIndex = 2; this.lblCantidad.Text = "Cantidad"; // // gpbGrupo3 // this.gpbGrupo3.Controls.Add(this.btnCancelar1); this.gpbGrupo3.Controls.Add(this.btnAceptar1); this.gpbGrupo3.Location = new System.Drawing.Point(288, 531); this.gpbGrupo3.Name = "gpbGrupo3"; this.gpbGrupo3.Size = new System.Drawing.Size(189, 84); this.gpbGrupo3.TabIndex = 1; this.gpbGrupo3.TabStop = false; // // btnCancelar1 // this.btnCancelar1.Image = ((System.Drawing.Image)(resources.GetObject("btnCancelar1.Image"))); this.btnCancelar1.Location = new System.Drawing.Point(100, 14); this.btnCancelar1.Name = "btnCancelar1"; this.btnCancelar1.Size = new System.Drawing.Size(80, 60); this.btnCancelar1.TabIndex = 1; this.btnCancelar1.UseVisualStyleBackColor = true; this.btnCancelar1.Click += new System.EventHandler(this.btnCancelar1_Click); // // btnAceptar1 // this.btnAceptar1.Image = ((System.Drawing.Image)(resources.GetObject("btnAceptar1.Image"))); this.btnAceptar1.Location = new System.Drawing.Point(9, 14); this.btnAceptar1.Name = "btnAceptar1"; this.btnAceptar1.Size = new System.Drawing.Size(80, 60); this.btnAceptar1.TabIndex = 0; this.btnAceptar1.UseVisualStyleBackColor = true; this.btnAceptar1.Click += new System.EventHandler(this.btnAceptar1_Click); // // gpbGrupo1 // this.gpbGrupo1.Controls.Add(this.lblEtiqueta3); this.gpbGrupo1.Controls.Add(this.lblEtiqueta2); this.gpbGrupo1.Controls.Add(this.txtFiltro1); this.gpbGrupo1.Controls.Add(this.cmbLista1); this.gpbGrupo1.Location = new System.Drawing.Point(12, 6); this.gpbGrupo1.Name = "gpbGrupo1"; this.gpbGrupo1.Size = new System.Drawing.Size(334, 99); this.gpbGrupo1.TabIndex = 0; this.gpbGrupo1.TabStop = false; // // lblEtiqueta3 // this.lblEtiqueta3.AutoSize = true; this.lblEtiqueta3.Location = new System.Drawing.Point(7, 61); this.lblEtiqueta3.Name = "lblEtiqueta3"; this.lblEtiqueta3.Size = new System.Drawing.Size(45, 13); this.lblEtiqueta3.TabIndex = 7; this.lblEtiqueta3.Text = "FILTRO"; // // lblEtiqueta2 // this.lblEtiqueta2.AutoSize = true; this.lblEtiqueta2.Location = new System.Drawing.Point(6, 23); this.lblEtiqueta2.Name = "lblEtiqueta2"; this.lblEtiqueta2.Size = new System.Drawing.Size(78, 13); this.lblEtiqueta2.TabIndex = 6; this.lblEtiqueta2.Text = "FILTRAR POR"; // // txtFiltro1 // this.txtFiltro1.BackColor = System.Drawing.Color.White; this.txtFiltro1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; this.txtFiltro1.ColorTextoVacio = System.Drawing.Color.Gray; this.txtFiltro1.Location = new System.Drawing.Point(127, 58); this.txtFiltro1.Name = "txtFiltro1"; this.txtFiltro1.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.txtFiltro1.Size = new System.Drawing.Size(175, 20); this.txtFiltro1.TabIndex = 5; this.txtFiltro1.TextoVacio = "<Descripcion>"; this.txtFiltro1.TipoControl = Controles.util.Enumerados.enumTipos.Ninguna; this.txtFiltro1.TextChanged += new System.EventHandler(this.txtFiltro1_TextChanged_1); // // cmbLista1 // this.cmbLista1.FormattingEnabled = true; this.cmbLista1.Location = new System.Drawing.Point(127, 15); this.cmbLista1.Name = "cmbLista1"; this.cmbLista1.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.cmbLista1.Size = new System.Drawing.Size(175, 21); this.cmbLista1.TabIndex = 4; // // frmCrudGrilla // this.ClientSize = new System.Drawing.Size(776, 749); this.Controls.Add(this.gpbGrupoEstado); this.Controls.Add(this.gpbGrupoFecha); this.Controls.Add(this.gpbGrupo2); this.Controls.Add(this.gpbGrupo1); this.Name = "frmCrudGrilla"; this.Load += new System.EventHandler(this.frmCrudGrilla_Load); this.gpbGrupoEstado.ResumeLayout(false); this.gpbGrupoEstado.PerformLayout(); this.gpbGrupoFecha.ResumeLayout(false); this.gpbGrupoFecha.PerformLayout(); this.gpbGrupo2.ResumeLayout(false); this.gpbGrupo2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdGrillaEdit1)).EndInit(); this.gpbGrupo3.ResumeLayout(false); this.gpbGrupo1.ResumeLayout(false); this.gpbGrupo1.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmLecturasModosCrud)); this.gesGroup1 = new Controles.contenedores.gesGroup(); this.lblESTCodigo = new Controles.labels.lblEtiqueta(); this.cmbSRVCodigo = new Controles.datos.cmbLista(); this.chkESTCodigo = new Controles.datos.chkBox(); this.lblSRVCodigo = new Controles.labels.lblEtiqueta(); this.dtpFechaAlta = new Controles.Fecha.dtpFecha(); this.lblLEMFechaAlta = new Controles.labels.lblEtiqueta(); this.lblLEMDescripcion = new Controles.labels.lblEtiqueta(); this.gesGroup2 = new Controles.contenedores.gesGroup(); this.grdLecturasConceptos = new Controles.datos.grdGrillaEdit(); this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.gesGroup3 = new Controles.contenedores.gesGroup(); this.btnCancelar = new Controles.buttons.btnCancelar(); this.btnAceptar = new Controles.buttons.btnAceptar(); this.gesGroup1.SuspendLayout(); this.gesGroup2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdLecturasConceptos)).BeginInit(); this.gesGroup3.SuspendLayout(); this.SuspendLayout(); // // gesGroup1 // this.gesGroup1.Controls.Add(this.lblESTCodigo); this.gesGroup1.Controls.Add(this.cmbSRVCodigo); this.gesGroup1.Controls.Add(this.chkESTCodigo); this.gesGroup1.Controls.Add(this.lblSRVCodigo); this.gesGroup1.Controls.Add(this.dtpFechaAlta); this.gesGroup1.Controls.Add(this.lblLEMFechaAlta); this.gesGroup1.Controls.Add(this.lblLEMDescripcion); this.gesGroup1.Location = new System.Drawing.Point(12, 12); this.gesGroup1.Name = "gesGroup1"; this.gesGroup1.Size = new System.Drawing.Size(566, 181); this.gesGroup1.TabIndex = 0; this.gesGroup1.TabStop = false; this.gesGroup1.Text = "Datos"; // // lblESTCodigo // this.lblESTCodigo.AutoSize = true; this.lblESTCodigo.Location = new System.Drawing.Point(6, 165); this.lblESTCodigo.Name = "lblESTCodigo"; this.lblESTCodigo.Size = new System.Drawing.Size(43, 13); this.lblESTCodigo.TabIndex = 7; this.lblESTCodigo.Text = "Estado:"; // // cmbSRVCodigo // this.cmbSRVCodigo.FormattingEnabled = true; this.cmbSRVCodigo.Location = new System.Drawing.Point(89, 47); this.cmbSRVCodigo.Name = "cmbSRVCodigo"; this.cmbSRVCodigo.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.cmbSRVCodigo.Size = new System.Drawing.Size(199, 21); this.cmbSRVCodigo.TabIndex = 6; // // chkESTCodigo // this.chkESTCodigo.AutoSize = true; this.chkESTCodigo.Checked = true; this.chkESTCodigo.CheckState = System.Windows.Forms.CheckState.Checked; this.chkESTCodigo.Location = new System.Drawing.Point(89, 161); this.chkESTCodigo.Name = "chkESTCodigo"; this.chkESTCodigo.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.chkESTCodigo.Size = new System.Drawing.Size(73, 17); this.chkESTCodigo.TabIndex = 5; this.chkESTCodigo.Text = "Habilitado"; this.chkESTCodigo.UseVisualStyleBackColor = true; // // lblSRVCodigo // this.lblSRVCodigo.AutoSize = true; this.lblSRVCodigo.Location = new System.Drawing.Point(6, 55); this.lblSRVCodigo.Name = "lblSRVCodigo"; this.lblSRVCodigo.Size = new System.Drawing.Size(53, 13); this.lblSRVCodigo.TabIndex = 4; this.lblSRVCodigo.Text = "Servicios:"; // // dtpFechaAlta // this.dtpFechaAlta.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpFechaAlta.Location = new System.Drawing.Point(89, 94); this.dtpFechaAlta.Name = "dtpFechaAlta"; this.dtpFechaAlta.Requerido = Controles.util.Enumerados.enumRequerido.NO; this.dtpFechaAlta.Size = new System.Drawing.Size(199, 20); this.dtpFechaAlta.TabIndex = 3; // // lblLEMFechaAlta // this.lblLEMFechaAlta.AutoSize = true; this.lblLEMFechaAlta.Location = new System.Drawing.Point(6, 101); this.lblLEMFechaAlta.Name = "lblLEMFechaAlta"; this.lblLEMFechaAlta.Size = new System.Drawing.Size(61, 13); this.lblLEMFechaAlta.TabIndex = 2; this.lblLEMFechaAlta.Text = "Fecha Alta:"; // // lblLEMDescripcion // this.lblLEMDescripcion.AutoSize = true; this.lblLEMDescripcion.Location = new System.Drawing.Point(6, 27); this.lblLEMDescripcion.Name = "lblLEMDescripcion"; this.lblLEMDescripcion.Size = new System.Drawing.Size(66, 13); this.lblLEMDescripcion.TabIndex = 0; this.lblLEMDescripcion.Text = "Descripcion:"; // // gesGroup2 // this.gesGroup2.Controls.Add(this.grdLecturasConceptos); this.gesGroup2.Location = new System.Drawing.Point(12, 214); this.gesGroup2.Name = "gesGroup2"; this.gesGroup2.Size = new System.Drawing.Size(566, 184); this.gesGroup2.TabIndex = 1; this.gesGroup2.TabStop = false; this.gesGroup2.Text = "Conceptos asociados"; // // grdLecturasConceptos // this.grdLecturasConceptos.AllowUserToAddRows = false; this.grdLecturasConceptos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.grdLecturasConceptos.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Column1, this.Column2, this.Column3}); this.grdLecturasConceptos.Location = new System.Drawing.Point(9, 19); this.grdLecturasConceptos.MultiSelect = false; this.grdLecturasConceptos.Name = "grdLecturasConceptos"; this.grdLecturasConceptos.Size = new System.Drawing.Size(546, 150); this.grdLecturasConceptos.TabIndex = 0; this.grdLecturasConceptos.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdLecturasConceptos_CellEndEdit); // // Column1 // this.Column1.HeaderText = "CODIGO"; this.Column1.Name = "Column1"; // // Column2 // this.Column2.HeaderText = "DESCRIPCION CORTA"; this.Column2.Name = "Column2"; this.Column2.Width = 150; // // Column3 // this.Column3.HeaderText = "DESCRIPCION"; this.Column3.Name = "Column3"; this.Column3.Width = 250; // // gesGroup3 // this.gesGroup3.Controls.Add(this.btnCancelar); this.gesGroup3.Controls.Add(this.btnAceptar); this.gesGroup3.Location = new System.Drawing.Point(386, 404); this.gesGroup3.Name = "gesGroup3"; this.gesGroup3.Size = new System.Drawing.Size(192, 89); this.gesGroup3.TabIndex = 6; this.gesGroup3.TabStop = false; // // btnCancelar // this.btnCancelar.Image = ((System.Drawing.Image)(resources.GetObject("btnCancelar.Image"))); this.btnCancelar.Location = new System.Drawing.Point(6, 19); this.btnCancelar.Name = "btnCancelar"; this.btnCancelar.Size = new System.Drawing.Size(80, 60); this.btnCancelar.TabIndex = 6; this.btnCancelar.UseVisualStyleBackColor = true; this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click); // // btnAceptar // this.btnAceptar.Image = ((System.Drawing.Image)(resources.GetObject("btnAceptar.Image"))); this.btnAceptar.Location = new System.Drawing.Point(101, 19); this.btnAceptar.Name = "btnAceptar"; this.btnAceptar.Size = new System.Drawing.Size(80, 60); this.btnAceptar.TabIndex = 7; this.btnAceptar.UseVisualStyleBackColor = true; this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click); // // frmLecturasModosCrud // this.ClientSize = new System.Drawing.Size(593, 496); this.Controls.Add(this.gesGroup3); this.Controls.Add(this.gesGroup2); this.Controls.Add(this.gesGroup1); this.Name = "frmLecturasModosCrud"; this.Load += new System.EventHandler(this.frmLecturasModosCrud_Load); this.gesGroup1.ResumeLayout(false); this.gesGroup1.PerformLayout(); this.gesGroup2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.grdLecturasConceptos)).EndInit(); this.gesGroup3.ResumeLayout(false); this.ResumeLayout(false); }