Пример #1
0
        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();
                }
            }
        }
Пример #2
0
 private void btnGastosAgregar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     SalidasDinero.Gastos.FormNuevoGasto modal = new SalidasDinero.Gastos.FormNuevoGasto("AGREGAR");
     modal.ShowDialog();
 }