public void get_InfoSede() { try { if (cmbSede.EditValue != null && cmbSede.EditValue != "") { //Aca_Jornada_Bus negJornada = new Aca_Jornada_Bus(); //cmbJornada.Properties.DataSource = negJornada.Get_List_Jornada(param.IdInstitucion, Convert.ToInt16(cmbSede.EditValue)); //listSucursal = BusSucu.Get_List_Sucursal(param.IdEmpresa); listPuntoVta = BusPtoVta.Get_List_PuntoVta(param.IdEmpresa); ListInfoSede = BusSede.Get_List_Sede(param.IdInstitucion); InfoSede = (Aca_Sede_Info)(ListInfoSede.FirstOrDefault(v => v.IdSede == Convert.ToInt32(cmbSede.EditValue))); //Info_Sucursal = (tb_Sucursal_Info)(listSucursal.FirstOrDefault(v => v.IdSucursal == Convert.ToInt32(cmbSede.EditValue))); if (InfoSede != null) { cargar_PtoVta_en_Combo(Convert.ToInt16(InfoSede.IdEmpresa), Convert.ToInt16(InfoSede.IdSucursal)); //Event_cmb_sucursal_EditValueChanged(sender, e); } //cmb_PtoVta.Properties.DataSource = listPuntoVta; } } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
private void cmb_sucursal_fact_EditValueChanged(object sender, EventArgs e) { try { if (cmb_sucursal_fact.EditValue == null) { lst_bodega = new List <tb_Bodega_Info>(); lst_punto_venta = new List <fa_PuntoVta_Info>(); } else { int IdSucursal = Convert.ToInt32(cmb_sucursal_fact.EditValue); lst_bodega = bus_bodega.Get_List_Bodega(param.IdEmpresa, IdSucursal); lst_punto_venta = bus_punto_venta.Get_List_PuntoVta(param.IdEmpresa, IdSucursal); } cmb_bodega_fact.EditValue = null; cmb_bodega_fact.Properties.DataSource = lst_bodega; cmb_ptovta_fact.EditValue = null; cmb_ptovta_fact.Properties.DataSource = lst_punto_venta; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void cargar_PtoVta(int IdEmpresa) { try { if (TipoCarga == Cl_Enumeradores.eTipoFiltro.Normal) { listPuntoVta = BusPtoVta.Get_List_PuntoVta(IdEmpresa); } if (TipoCarga == Cl_Enumeradores.eTipoFiltro.todos) { listPuntoVta = BusPtoVta.Get_List_PuntoVta(IdEmpresa); listPuntoVta.Add(new fa_PuntoVta_Info(IdEmpresa, 0, 0, "Todos", "Todos", 1)); } } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
private void Cargar_Grid() { try { info = Bus.Get_List_PuntoVta(param.IdEmpresa); gridControlPuntoVta.DataSource = info; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cmb_sucursal_EditValueChanged(object sender, EventArgs e) { try { cmb_puntoVta.EditValue = null; Lista_PuntoVta = new List <fa_PuntoVta_Info>(Bus_PuntoVta.Get_List_PuntoVta(param.IdEmpresa, Convert.ToInt32(cmb_sucursal.EditValue))); cmb_puntoVta.Properties.DataSource = Lista_PuntoVta; } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
private void cargar_combos() { try { info_fa_param = bus_fa_param.Get_Info_parametro(param.IdEmpresa); lst_vendedor = bus_vendedor.Get_List_Vendedores(param.IdEmpresa); cmb_vendedor.Properties.DataSource = lst_vendedor; lst_punto_venta = bus_punto_venta.Get_List_PuntoVta(param.IdEmpresa); cmb_punto_venta.Properties.DataSource = lst_punto_venta; if (lst_punto_venta.FirstOrDefault(q => q.IdSucursal == param.IdSucursal) != null) { cmb_punto_venta.EditValue = lst_punto_venta.FirstOrDefault(q => q.IdSucursal == param.IdSucursal).IdPuntoVta; } lst_caja = bus_caja.Get_list_caja(param.IdEmpresa, ref MensajeError); cmb_caja.Properties.DataSource = lst_caja; cmb_caja.EditValue = info_fa_param.IdCaja_Default_Factura; lst_termino_pago = bus_termino_pago.Get_List_TerminoPago(); cmb_termino_pago.Properties.DataSource = lst_termino_pago; ucFa_FormaPago_x_Factura.Cargar_grid(); UCNumDoc.Cargar_parametros(); de_fecha.DateTime = DateTime.Now.Date; spinEditDiasPlazo.EditValue = 1; lst_impuesto = bus_impuesto.Get_List_impuesto("IVA"); cmb_impuesto.DataSource = lst_impuesto; lst_producto = bus_producto.Get_list_Producto(param.IdEmpresa); cmb_producto_det.DataSource = lst_producto; blst_cuotas = new BindingList <fa_cuotas_x_doc_Info>(); gridControl_detalle_cuotas.DataSource = blst_cuotas; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }