private void frmRo_placa_mant_Load(object sender, EventArgs e) { try { ro_rubro_tipo_Info = new BindingList <ro_rubro_tipo_Info>(bus_rubro.Get_List_Formulas(param.IdEmpresa)); ro_rubros_calculados_Info = ro_rubros_calculados_Bus.get_info(param.IdEmpresa); set_info(); } 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()); } }
public void CargarRubrosNovedad() { try { ro_rubro_tipo_Bus busRubro = new ro_rubro_tipo_Bus(); var lstRubro = (from a in busRubro.Get_List_Formulas(param.IdEmpresa) where a.rub_concep == true select a).ToList(); cmbNovedad.Properties.DataSource = lstRubro; } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log_Error_bus.Log_Error(ex.ToString()); } }
private void pu_CrearGrillaFormula() { try { string idCatalogo = ""; DataTable table = new DataTable(); ro_rubro_tipo_Bus oRo_rubro_tipo_Bus = new ro_rubro_tipo_Bus(); List <ro_rubro_tipo_Info> oListadoRubro = new List <ro_rubro_tipo_Info>(); ro_Catalogo_Bus oCatalogoBus = new ro_Catalogo_Bus(); view.Columns.Clear(); table.Columns.Clear(); table.Rows.Clear(); oListadoRubro = oRo_rubro_tipo_Bus.Get_List_Formulas(param.IdEmpresa); //CREAR COLUMNAS EN LA GRILLA PARA EL PROCESO DE FORMULAS int cont = 0; foreach (ro_rubro_tipo_Info item in oListadoRubro) { // GridColumn column = view.Columns.Add(); GridColumn column = new GridColumn(); column.Name = item.ru_codRolGen.Trim(); column.FieldName = item.ru_codRolGen.Trim(); column.Caption = item.ru_codRolGen.Trim(); column.Visible = true; column.DisplayFormat.FormatType = FormatType.Custom; column.DisplayFormat.FormatString = "c2"; column.VisibleIndex = cont; //column.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; idCatalogo = (oCatalogoBus.Get_info_Catalogo((item.rub_tipcal == null ? 0 : Convert.ToInt32(item.rub_tipcal)))).CodCatalogo; switch (idCatalogo) { //VARIABLE case "TPC1": break; //CONSTANTE case "TPC2": break; //FUNCION case "TPC3": break; //FORMULA LOGICA case "TPC4": column.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; column.OptionsColumn.AllowEdit = false; column.ShowUnboundExpressionMenu = true; column.UnboundExpression = item.rub_formul.Trim(); break; default: break; } view.Columns.Add(column); if (idCatalogo != "TPC4") { table.Columns.Add(item.ru_codRolGen.Trim(), typeof(Decimal)); } cont += 1; } grid.DataSource = table; } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log_Error_bus.Log_Error(ex.ToString()); } }
private void pu_CargaInicial() { try { event_frmRo_Nomina_Tipoliqui_Mant_FormClosing += frmRo_Nomina_Tipoliqui_Mant_event_frmRo_Nomina_Tipoliqui_Mant_FormClosing; ro_Nomina_Tipo_Bus busTipoNom = new ro_Nomina_Tipo_Bus(); cmbNomina.Properties.DataSource = busTipoNom.Get_List_Nomina_Tipo(param.IdEmpresa); //CARGAR DATOS EN EL COMBO RUBROS oListRo_rubro_tipo_Info = oRo_rubro_tipo_Bus.Get_List_Formulas(param.IdEmpresa); cmbRubro.DataSource = oListRo_rubro_tipo_Info; //Carga combo Tipo de Campo ro_Catalogo_Bus tlB = new ro_Catalogo_Bus(); List <ro_Catalogo_Info> listTL = new List <ro_Catalogo_Info>(); listTL = tlB.Get_List_Catalogo_x_Tipo(13); this.cmbTipoCalc.DataSource = listTL; cmbTipoCalc.DisplayMember = "ca_descripcion"; cmbTipoCalc.ValueMember = "IdCatalogo"; if (Accion == Cl_Enumeradores.eTipo_action.consultar) { ucGe_Menu.Enabled_bntAnular = false; ucGe_Menu.Visible_bntGuardar_y_Salir = false; ucGe_Menu.Visible_btnGuardar = false; this.txtDescripcion.ReadOnly = true; this.txtDescripcion.BackColor = System.Drawing.Color.White; this.cmbNomina.Enabled = false; this.cmbNomina.BackColor = System.Drawing.Color.White; this.cmbNomina.ForeColor = System.Drawing.Color.Black; viewListado.OptionsBehavior.ReadOnly = true; } else if (Accion == Cl_Enumeradores.eTipo_action.Anular) { ucGe_Menu.Enabled_bntAnular = true; ucGe_Menu.Visible_bntGuardar_y_Salir = false; ucGe_Menu.Visible_btnGuardar = false; this.cmbNomina.Enabled = false; this.cmbNomina.BackColor = System.Drawing.Color.White; this.cmbNomina.ForeColor = System.Drawing.Color.Black; this.txtDescripcion.ReadOnly = true; this.txtDescripcion.BackColor = System.Drawing.Color.White; viewListado.OptionsBehavior.ReadOnly = true; } else if (Accion == Cl_Enumeradores.eTipo_action.actualizar) { ucGe_Menu.Enabled_bntAnular = true; ucGe_Menu.Visible_bntGuardar_y_Salir = true; ucGe_Menu.Visible_btnGuardar = true; this.cmbNomina.Enabled = false; this.cmbNomina.BackColor = System.Drawing.Color.White; this.cmbNomina.ForeColor = System.Drawing.Color.Black; this.txtDescripcion.ReadOnly = false; this.txtDescripcion.BackColor = System.Drawing.Color.White; viewListado.OptionsBehavior.ReadOnly = false; } else if (Accion == Cl_Enumeradores.eTipo_action.grabar) { lblAnulado.Visible = false; viewListado.OptionsBehavior.ReadOnly = false; } pu_CrearGrillaFormula(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log_Error_bus.Log_Error(ex.ToString()); } }