private void btnEditar_Click(object sender, EventArgs e) { if (gridView1.DataRowCount > 0) { if (Convert.ToDateTime(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "fecha_creacion")) == DateTime.Now.Date) { bool SeEdito = false; FormNuevoGasto form = new FormNuevoGasto("EDITAR"); form.id_salida_dinero = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "id_salida_dinero")); form.txtSerieFactura.Text = Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "serie_factura")); form.spinEditMonto.Value = Convert.ToDecimal(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "monto")); form.spinEditCorrelativo.Value = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "correlativo_factura")); form.lookUpEditGastos.EditValue = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "id_tipo_salida_dinero")); form.txtDestino.Text = Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "destino")); form.txtObservaciones.Text = Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "observaciones")); form.ShowDialog(); dt = new DataTable(); dt = ControllerMovimientoDinero.MostrarSalidasGastos(Configuraciones.Configuraciones.idtienda, DateTime.Now.Date, DateTime.Now.Date, 0, Configuraciones.Configuraciones.idusuario, 66); gridControl1.DataSource = dt; gridControl1.ForceInitialize(); gridView1.BestFitColumns(); } } }
private void FormLista_Load(object sender, EventArgs e) { if (tipo_de_lista.Equals("EDICION")) { emptySpaceItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; emptySpaceItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; emptySpaceItem4.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyGastos.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyOpciones.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyFechaInicial.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyFechaFinal.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyBtnProcesar.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyBtnVerReporte.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyCheck.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; dt = new DataTable(); dt = ControllerMovimientoDinero.MostrarSalidasGastos(Configuraciones.Configuraciones.idtienda, DateTime.Now.Date, DateTime.Now.Date, 0, Configuraciones.Configuraciones.idusuario, 66); gridControl1.DataSource = dt; gridControl1.ForceInitialize(); gridView1.BestFitColumns(); this.Text = "SALIDAS POR GASTOS DEL DIA"; } if (tipo_de_lista.Equals("REPORTE")) { this.Text = "VER REPORTE DE SALIDAS POR GASTOS"; lyLista.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyBtnEditar.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lyBtnProcesar.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; emptySpaceItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; emptySpaceItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; emptySpaceItem4.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; lyOpciones.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; this.Width = 600; this.Height = 250; this.StartPosition = FormStartPosition.CenterScreen; lookUpEditGastos.Properties.DataSource = ControllerMostrar.TiposDeGastos(); lookUpEditGastos.Properties.DisplayMember = "nombre"; lookUpEditGastos.Properties.ValueMember = "id_tipo_salida_dinero"; } }