// haac 28/01/2014 public BindingList <cxc_cobro_x_caj_Caja_Movimiento_Info> carga_grid_caj_Movimiento(BindingList <cxc_cobro_Info> lista_cobro, BindingList <cxc_cobro_x_caj_Caja_Movimiento_Info> lista_grid) { try { List <cxc_cobro_x_caj_Caja_Movimiento_Info> lista_Caj_Mov = new List <cxc_cobro_x_caj_Caja_Movimiento_Info>(); BindingList <cxc_cobro_x_caj_Caja_Movimiento_Info> Bindlista_Cobro_Caja = new BindingList <cxc_cobro_x_caj_Caja_Movimiento_Info>(); cxc_cobro_x_caj_Caja_Movimiento_Bus data = new cxc_cobro_x_caj_Caja_Movimiento_Bus(); foreach (var item in lista_cobro) { lista_Caj_Mov = data.Get_List_cobro_x_caj_Caja_Movimiento(item.IdEmpresa /*, item.IdSucursal, item.IdCobro*/); foreach (var item1 in lista_Caj_Mov) { cxc_cobro_x_caj_Caja_Movimiento_Info info = new cxc_cobro_x_caj_Caja_Movimiento_Info(); info.cbr_IdEmpresa = item1.cbr_IdEmpresa; info.cbr_IdSucursal = item1.cbr_IdSucursal; info.cbr_IdCobro = item1.cbr_IdCobro; info.mcj_IdEmpresa = item1.mcj_IdEmpresa; info.mcj_IdCbteCble = item1.mcj_IdCbteCble; info.mcj_IdTipocbte = item1.mcj_IdTipocbte; info.em_nombre = item1.em_nombre; info.Su_Descripcion = item1.Su_Descripcion; info.tc_descripcion = item1.tc_descripcion; info.tc_TipoCbte = item1.tc_TipoCbte; Bindlista_Cobro_Caja.Add(info); } } lista_grid = Bindlista_Cobro_Caja; return(lista_grid); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(lista_grid); } }
public void set(int IdEmpresa, int IdSucursal, int IdBodega, string TipoDoc, decimal IdCbteCble, Cl_Enumeradores.eTipo_action Accion) { try { cartera_I = cartera_B.Get_Info_cartera_x_cobrar(IdEmpresa, IdSucursal, IdBodega, IdCbteCble, TipoDoc); txt_sucursal.Text = (cartera_I.Su_Descripcion != null) ? cartera_I.Su_Descripcion.Trim() : ""; txt_bodega.Text = (cartera_I.Bodega != null) ? cartera_I.Bodega.Trim() : ""; txe_total.EditValue = Convert.ToDouble(cartera_I.vt_total); lbl_IdBodega.Text = cartera_I.IdBodega.ToString(); //haac 23/01/2014 this.txtSubtotal.EditValue = cartera_I.vt_Subtotal; this.txtIva.EditValue = cartera_I.vt_iva; //haac 23/01/2014 txe_saldo.EditValue = Convert.ToDouble(cartera_I.Saldo); dtp_fecha.Value = Convert.ToDateTime(cartera_I.vt_fecha); txt_NDoc.Text = cartera_I.vt_NunDocumento; txtObservacion.Text = cartera_I.Referencia; Cliente_I.IdCliente = cartera_I.IdCliente; Cliente_B.ConsultarClienteVendedor(IdEmpresa, ref Cliente_I, ref Vendedor_I); txt_cliente.Text = (Cliente_I.Nombre_Cliente != "" || Cliente_I.Nombre_Cliente != null) ? Cliente_I.Nombre_Cliente.Trim() : Cliente_I.Persona_Info.pe_razonSocial; //haac 23/01/2014 this.txtSubtotal.Enabled = false; this.txtSubtotal.BackColor = System.Drawing.Color.White; this.txtSubtotal.ForeColor = System.Drawing.Color.Black; this.txtIva.Enabled = false; this.txtIva.BackColor = System.Drawing.Color.White; this.txtIva.ForeColor = System.Drawing.Color.Black; //haac 23/01/2014 if (!(Accion == Cl_Enumeradores.eTipo_action.grabar)) { ucGe_Menu.Visible_btnGuardar = false; ucGe_Menu.Visible_bntGuardar_y_Salir = false; } if (Accion == Cl_Enumeradores.eTipo_action.grabar) { this.txtCXC.Enabled = false; this.txtCXC.BackColor = System.Drawing.Color.White; this.txtCXC.ForeColor = System.Drawing.Color.Black; this.txtCHQF.Enabled = false; this.txtCHQF.BackColor = System.Drawing.Color.White; this.txtCHQF.ForeColor = System.Drawing.Color.Black; this.txtEfectivo.Enabled = false; this.txtEfectivo.BackColor = System.Drawing.Color.White; this.txtEfectivo.ForeColor = System.Drawing.Color.Black; this.txtChq_Tarj.Enabled = false; this.txtChq_Tarj.BackColor = System.Drawing.Color.White; this.txtChq_Tarj.ForeColor = System.Drawing.Color.Black; this.txtOtros.Enabled = false; this.txtOtros.BackColor = System.Drawing.Color.White; this.txtOtros.ForeColor = System.Drawing.Color.Black; this.txtDeposito.Enabled = false; this.txtDeposito.BackColor = System.Drawing.Color.White; this.txtDeposito.ForeColor = System.Drawing.Color.Black; this.txtTotalCobrado.Enabled = false; this.txtTotalCobrado.BackColor = System.Drawing.Color.White; this.txtTotalCobrado.ForeColor = System.Drawing.Color.Black; } if (Accion == Cl_Enumeradores.eTipo_action.consultar) { this.gridView_detalle.OptionsBehavior.Editable = false; this.cmbCaja.Enabled = false; this.cmbCaja.BackColor = System.Drawing.Color.White; this.cmbCaja.ForeColor = System.Drawing.Color.Black; this.txtCXC.Enabled = false; this.txtCXC.BackColor = System.Drawing.Color.White; this.txtCXC.ForeColor = System.Drawing.Color.Black; this.txtCHQF.Enabled = false; this.txtCHQF.BackColor = System.Drawing.Color.White; this.txtCHQF.ForeColor = System.Drawing.Color.Black; this.txtEfectivo.Enabled = false; this.txtEfectivo.BackColor = System.Drawing.Color.White; this.txtEfectivo.ForeColor = System.Drawing.Color.Black; this.txtChq_Tarj.Enabled = false; this.txtChq_Tarj.BackColor = System.Drawing.Color.White; this.txtChq_Tarj.ForeColor = System.Drawing.Color.Black; this.txtOtros.Enabled = false; this.txtOtros.BackColor = System.Drawing.Color.White; this.txtOtros.ForeColor = System.Drawing.Color.Black; this.txtDeposito.Enabled = false; this.txtDeposito.BackColor = System.Drawing.Color.White; this.txtDeposito.ForeColor = System.Drawing.Color.Black; this.txtTotalCobrado.Enabled = false; this.txtTotalCobrado.BackColor = System.Drawing.Color.White; this.txtTotalCobrado.ForeColor = System.Drawing.Color.Black; this.txtObservacion.Enabled = false; this.txtObservacion.BackColor = System.Drawing.Color.White; this.txtObservacion.ForeColor = System.Drawing.Color.Black; } list_datasour = new BindingList <cxc_cobro_Info>(cobro_B.Get_List_cobros_x_Factura(IdEmpresa, IdSucursal, IdBodega, IdCbteCble, TipoDoc)); griddetalle.DataSource = list_datasour; lista = new BindingList <cxc_cobro_x_caj_Caja_Movimiento_Info>(); int idCaja = 0; decimal idCobro = 0; foreach (var item in list_datasour) { idCaja = item.IdCaja; idCobro = item.IdCobro; } cmbCaja.EditValue = idCaja; cargarGridContable(IdEmpresa, IdSucursal, idCobro); //haac 07-FEB-2014 List <cxc_cobro_x_caj_Caja_Movimiento_Info> lista1 = new List <cxc_cobro_x_caj_Caja_Movimiento_Info>(); cxc_cobro_x_caj_Caja_Movimiento_Bus Bus_cajMov = new cxc_cobro_x_caj_Caja_Movimiento_Bus(); lista1 = Bus_cajMov.Get_List_cobro_x_caj_Caja_Movimiento(IdEmpresa); this.gridControl_NCND.DataSource = lista1; //haac 07-FEB-2014 if (list_datasour != null) { this.Calcula_Totales(); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }