public ActionResult Modificar(ro_rubros_calculados_Info info) { try { if (ModelState.IsValid) { if (!bus_cargo.modificarDB(info)) { return(View(info)); } else { return(RedirectToAction("Index")); } } else { return(View(info)); } } catch (Exception) { throw; } }
public ActionResult Index(ro_rubros_calculados_Info info) { try { if (ModelState.IsValid) { info.IdEmpresa = GetIdEmpresa(); if (!bus_cargo.guardarDB(info)) { cargar_combos(); return(View(info)); } else { cargar_combos(); return(View(info)); } } else { cargar_combos(); return(View(info)); } } catch (Exception) { throw; } }
public ActionResult Nuevo(ro_rubros_calculados_Info info) { try { if (ModelState.IsValid) { info.IdEmpresa = GetIdEmpresa(); if (!bus_cargo.guardarDB(info)) { return(View(info)); } else { return(RedirectToAction("Index")); } } else { return(View(info)); } } catch (Exception) { throw; } }
public ro_rubros_calculados_Info get_info(int IdEmpresa) { try { ro_rubros_calculados_Info info = new ro_rubros_calculados_Info(); using (EntityRoles_FJ Context = new EntityRoles_FJ()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == IdEmpresa); if (Entity == null) { return(null); } info = new ro_rubros_calculados_Info { IdEmpresa = Entity.IdEmpresa, IdRubro_dias_trabajados = Entity.IdRubro_dias_trabajados, IdRubro_iess_perso = Entity.IdRubro_iess_perso, IdRubro_sueldo = Entity.IdRubro_sueldo, IdRubro_tot_egr = Entity.IdRubro_tot_egr, IdRubro_tot_ing = Entity.IdRubro_tot_ing, IdRubro_tot_pagar = Entity.IdRubro_tot_pagar, IdRubro_aporte_patronal = Entity.IdRubro_aporte_patronal, IdRubro_fondo_reserva = Entity.IdRubro_fondo_reserva, IdRubro_prov_vac = Entity.IdRubro_prov_vac, IdRubro_prov_DIII = Entity.IdRubro_prov_DIII, IdRubro_prov_DIV = Entity.IdRubro_prov_DIV, IdRubro_prov_FR = Entity.IdRubro_prov_FR, IdRubro_DIII = Entity.IdRubro_DIII, IdRubro_DIV = Entity.IdRubro_DIV, IdRubro_IR = Entity.IdRubro_IR, IdRubro_alimentacion = Entity.IdRubro_alimentacion, IdRubro_transporte = Entity.IdRubro_transporte, IdRubro_otros_ingresos = Entity.IdRubro_otros_ingresos, IdRubro_anticipo = Entity.IdRubro_anticipo, IdRubro_horas_extras = Entity.IdRubro_horas_extras, IdRubro_otros_descuentos = Entity.IdRubro_otros_descuentos, IdRubro_dias_efectivos = Entity.IdRubro_dias_efectivos, IdRubro_subtotal_variable = Entity.IdRubro_subtotal_variable, IdRubro_descuento_permiso = Entity.IdRubro_descuento_permiso, IdRubro_alm_car = Entity.IdRubro_alm_car, IdRubro_alm_ent = Entity.IdRubro_alm_ent, IdRubro_alm_vol = Entity.IdRubro_alm_vol, IdRubro_beb_car = Entity.IdRubro_beb_car, IdRubro_beb_ent = Entity.IdRubro_beb_ent, IdRubro_beb_vol = Entity.IdRubro_beb_vol, IdRubro_servicio = Entity.IdRubro_servicio }; } return(info); } catch (Exception) { throw; } }
public ActionResult Index() { ro_rubros_calculados_Info model = new ro_rubros_calculados_Info(); model = bus_cargo.get_info(Convert.ToInt32(SessionFixed.IdEmpresa)); cargar_combos(); return(View(model)); }
public bool modificarDB(ro_rubros_calculados_Info info) { try { return(odata.modificarDB(info)); } catch (Exception) { throw; } }
public bool GuardarDB(ro_rubros_calculados_Info Info) { try { return(oData.guardarDB(Info)); } catch (Exception ex) { throw; } }
public ro_rubros_calculados_Info get_info(int IdEmpresa) { try { ro_rubros_calculados_Info info = new ro_rubros_calculados_Info(); using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == IdEmpresa); if (Entity == null) { return(null); } info = new ro_rubros_calculados_Info { IdEmpresa = Entity.IdEmpresa, IdRubro_dias_trabajados = Entity.IdRubro_dias_trabajados, IdRubro_iess_perso = Entity.IdRubro_iess_perso, IdRubro_sueldo = Entity.IdRubro_sueldo, IdRubro_tot_egr = Entity.IdRubro_tot_egr, IdRubro_tot_ing = Entity.IdRubro_tot_ing, IdRubro_tot_pagar = Entity.IdRubro_tot_pagar, IdRubro_aporte_patronal = Entity.IdRubro_aporte_patronal, IdRubro_fondo_reserva = Entity.IdRubro_fondo_reserva, IdRubro_prov_vac = Entity.IdRubro_prov_vac, IdRubro_prov_DIII = Entity.IdRubro_prov_DIII, IdRubro_prov_DIV = Entity.IdRubro_prov_DIV, IdRubro_prov_FR = Entity.IdRubro_prov_FR, IdRubro_DIII = Entity.IdRubro_DIII, IdRubro_DIV = Entity.IdRubro_DIV, IdRubro_IR = Entity.IdRubro_IR, IdRubro_horas_matutina = Entity.IdRubro_horas_matutina, IdRubro_horas_brigadas = Entity.IdRubro_horas_brigadas, IdRubro_horas_vespertina = Entity.IdRubro_horas_vespertina, IdRubro_horas_adicionales = Entity.IdRubro_horas_adicionales, IdRubro_horas_recargo = Entity.IdRubro_horas_recargo, IdRubro_bono_x_antiguedad = Entity.IdRubro_bono_x_antiguedad, IdRubro_horas_control_salida = Entity.IdRubro_horas_control_salida, IdRubro_anticipo = Entity.IdRubro_anticipo, IdRubro_novedad_proceso = Entity.IdRubro_novedad_proceso, IdRubro_primaria_vespertina = Entity.IdRubro_primaria_vespertina, IdRubro_utilidad = Entity.IdRubro_utilidad }; } return(info); } catch (Exception) { throw; } }
public ActionResult Nuevo() { try { cargar_combos(); ro_rubros_calculados_Info info = new ro_rubros_calculados_Info(); return(View(info)); } catch (Exception) { throw; } }
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 ActionResult Index() { #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion ro_rubros_calculados_Info model = new ro_rubros_calculados_Info(); model = bus_rubro_calculado.get_info(Convert.ToInt32(SessionFixed.IdEmpresa)); cargar_combos(); return(View(model)); }
public bool modificarDB(ro_rubros_calculados_Info info) { try { using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == info.IdEmpresa); if (Entity == null) { return(false); } Entity.IdRubro_dias_trabajados = info.IdRubro_dias_trabajados; Entity.IdRubro_iess_perso = info.IdRubro_iess_perso; Entity.IdRubro_sueldo = info.IdRubro_sueldo; Entity.IdRubro_tot_egr = info.IdRubro_tot_egr; Entity.IdRubro_tot_ing = info.IdRubro_tot_ing; Entity.IdRubro_tot_pagar = info.IdRubro_tot_pagar; Entity.IdRubro_aporte_patronal = info.IdRubro_aporte_patronal; Entity.IdRubro_fondo_reserva = info.IdRubro_fondo_reserva; Entity.IdRubro_prov_vac = info.IdRubro_prov_vac; Entity.IdRubro_prov_DIII = info.IdRubro_prov_DIII; Entity.IdRubro_prov_DIV = info.IdRubro_prov_DIV; Entity.IdRubro_prov_FR = info.IdRubro_prov_FR; Entity.IdRubro_DIII = info.IdRubro_DIII; Entity.IdRubro_DIV = info.IdRubro_DIV; Entity.IdRubro_IR = info.IdRubro_IR; Entity.IdRubro_horas_vespertina = info.IdRubro_horas_vespertina; Entity.IdRubro_horas_matutina = info.IdRubro_horas_matutina; Entity.IdRubro_horas_brigadas = info.IdRubro_horas_brigadas; Entity.IdRubro_horas_adicionales = info.IdRubro_horas_adicionales; Entity.IdRubro_horas_recargo = info.IdRubro_horas_recargo; Entity.IdRubro_bono_x_antiguedad = info.IdRubro_bono_x_antiguedad; Entity.IdRubro_horas_control_salida = info.IdRubro_horas_control_salida; Entity.IdRubro_novedad_proceso = info.IdRubro_novedad_proceso; Entity.IdRubro_anticipo = info.IdRubro_anticipo; Entity.IdRubro_primaria_vespertina = info.IdRubro_primaria_vespertina; Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }
public bool guardarDB(ro_rubros_calculados_Info info) { try { using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = new ro_rubros_calculados { IdEmpresa = info.IdEmpresa, IdRubro_dias_trabajados = info.IdRubro_dias_trabajados, IdRubro_iess_perso = info.IdRubro_iess_perso, IdRubro_sueldo = info.IdRubro_sueldo, IdRubro_tot_egr = info.IdRubro_tot_egr, IdRubro_tot_ing = info.IdRubro_tot_ing, IdRubro_tot_pagar = info.IdRubro_tot_pagar, IdRubro_aporte_patronal = info.IdRubro_aporte_patronal, IdRubro_fondo_reserva = info.IdRubro_fondo_reserva, IdRubro_prov_vac = info.IdRubro_prov_vac, IdRubro_prov_DIII = info.IdRubro_prov_DIII, IdRubro_prov_DIV = info.IdRubro_prov_DIV, IdRubro_prov_FR = info.IdRubro_prov_FR, IdRubro_DIII = info.IdRubro_DIII, IdRubro_DIV = info.IdRubro_DIV, IdRubro_IR = info.IdRubro_IR, IdRubro_horas_matutina = info.IdRubro_horas_matutina, IdRubro_horas_vespertina = info.IdRubro_horas_vespertina, IdRubro_horas_brigadas = info.IdRubro_horas_brigadas, IdRubro_horas_adicionales = info.IdRubro_horas_adicionales, IdRubro_horas_recargo = info.IdRubro_horas_recargo, IdRubro_bono_x_antiguedad = info.IdRubro_bono_x_antiguedad, IdRubro_horas_control_salida = info.IdRubro_horas_control_salida, IdRubro_novedad_proceso = info.IdRubro_novedad_proceso, IdRubro_anticipo = info.IdRubro_anticipo, IdRubro_primaria_vespertina = info.IdRubro_primaria_vespertina }; Context.ro_rubros_calculados.Add(Entity); Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }
private void get_info() { try { ro_rubros_calculados_Info = new Info.Roles_Fj.ro_rubros_calculados_Info(); ro_rubros_calculados_Info.IdEmpresa = param.IdEmpresa; ro_rubros_calculados_Info.IdRubro_dias_trabajados = cmb_dias_trabajados.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_tot_ing = cmb_ingresos.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_tot_egr = cmb_egresos.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_iess_perso = cmb_iess.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_sueldo = cmb_sueldo.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_tot_pagar = cmb_total_pagar.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_aporte_patronal = cmb_aporte_patronal.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_fondo_reserva = cmb_fondo_reserva.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_prov_vac = cmb_provision_vacaciones.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_prov_DIII = cmb_prov_dIII.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_prov_DIV = cmb_prov_cuarto.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_prov_FR = cmb_prov_fr.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_DIII = cmb_decimo_iii.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_DIV = cmb_decimo_iv.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_IR = cmb_ir.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_anticipo = cmb_anticipo.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_dias_efectivos = cmb_dias_efectivos.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_alimentacion = cmb_alimentacion.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_transporte = cmb_transporte.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_otros_descuentos = cmb_otros_descuentos.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_horas_extras = cmb_horas_extras.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_subtotal_variable = cmb_subtotal_variable.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_alm_car = cmb_car_alim.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_alm_ent = cmb_ent_alim.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_alm_vol = cmb_vol_alim.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_beb_car = cmb_car_beb.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_beb_ent = cmb_ent_beb.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_beb_vol = cmb_vol_beb.EditValue.ToString(); ro_rubros_calculados_Info.IdRubro_servicio = cmb_nivel_serv.EditValue.ToString(); } catch (Exception) { throw; } }
public bool guardarDB(ro_rubros_calculados_Info info) { try { if (odata.si_existe(info.IdEmpresa)) { return(odata.modificarDB(info)); } else { return(odata.guardarDB(info)); } } catch (Exception) { throw; } }
public ro_rubros_calculados_Info get_info(int IdEmpresa) { try { ro_rubros_calculados_Info info = new ro_rubros_calculados_Info(); using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == IdEmpresa); if (Entity == null) { return(null); } info = new ro_rubros_calculados_Info { IdEmpresa = Entity.IdEmpresa, IdRubro_dias_trabajados = Entity.IdRubro_dias_trabajados, IdRubro_iess_perso = Entity.IdRubro_iess_perso, IdRubro_sueldo = Entity.IdRubro_sueldo, IdRubro_tot_egr = Entity.IdRubro_tot_egr, IdRubro_tot_ing = Entity.IdRubro_tot_ing, IdRubro_tot_pagar = Entity.IdRubro_tot_pagar, IdRubro_aporte_patronal = Entity.IdRubro_aporte_patronal, IdRubro_fondo_reserva = Entity.IdRubro_fondo_reserva, IdRubro_prov_vac = Entity.IdRubro_prov_vac, IdRubro_prov_DIII = Entity.IdRubro_prov_DIII, IdRubro_prov_DIV = Entity.IdRubro_prov_DIV, IdRubro_prov_FR = Entity.IdRubro_prov_FR, IdRubro_DIII = Entity.IdRubro_DIII, IdRubro_DIV = Entity.IdRubro_DIV, IdRubro_IR = Entity.IdRubro_IR, IdRubro_FR = Entity.IdRubro_FR }; } return(info); } catch (Exception) { throw; } }
public ActionResult Index(ro_rubros_calculados_Info info) { try { info.IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa); if (!bus_rubro_calculado.guardarDB(info)) { cargar_combos(); return(View(info)); } else { cargar_combos(); return(View(info)); } } catch (Exception) { throw; } }
public bool modificarDB(ro_rubros_calculados_Info info) { try { using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == info.IdEmpresa); if (Entity == null) { return(false); } Entity.IdRubro_dias_trabajados = info.IdRubro_dias_trabajados; Entity.IdRubro_iess_perso = info.IdRubro_iess_perso; Entity.IdRubro_sueldo = info.IdRubro_sueldo; Entity.IdRubro_tot_egr = info.IdRubro_tot_egr; Entity.IdRubro_tot_ing = info.IdRubro_tot_ing; Entity.IdRubro_tot_pagar = info.IdRubro_tot_pagar; Entity.IdRubro_aporte_patronal = info.IdRubro_aporte_patronal; Entity.IdRubro_fondo_reserva = info.IdRubro_fondo_reserva; Entity.IdRubro_prov_vac = info.IdRubro_prov_vac; Entity.IdRubro_prov_DIII = info.IdRubro_prov_DIII; Entity.IdRubro_prov_DIV = info.IdRubro_prov_DIV; Entity.IdRubro_prov_FR = info.IdRubro_prov_FR; Entity.IdRubro_DIII = info.IdRubro_DIII; Entity.IdRubro_DIV = info.IdRubro_DIV; Entity.IdRubro_IR = info.IdRubro_IR; Entity.IdRubro_FR = info.IdRubro_FR; Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }
public bool guardarDB(ro_rubros_calculados_Info info) { try { using (Entities_rrhh Context = new Entities_rrhh()) { ro_rubros_calculados Entity = new ro_rubros_calculados { IdEmpresa = info.IdEmpresa, IdRubro_dias_trabajados = info.IdRubro_dias_trabajados, IdRubro_iess_perso = info.IdRubro_iess_perso, IdRubro_sueldo = info.IdRubro_sueldo, IdRubro_tot_egr = info.IdRubro_tot_egr, IdRubro_tot_ing = info.IdRubro_tot_ing, IdRubro_tot_pagar = info.IdRubro_tot_pagar, IdRubro_aporte_patronal = info.IdRubro_aporte_patronal, IdRubro_fondo_reserva = info.IdRubro_fondo_reserva, IdRubro_prov_vac = info.IdRubro_prov_vac, IdRubro_prov_DIII = info.IdRubro_prov_DIII, IdRubro_prov_DIV = info.IdRubro_prov_DIV, IdRubro_prov_FR = info.IdRubro_prov_FR, IdRubro_DIII = info.IdRubro_DIII, IdRubro_DIV = info.IdRubro_DIV, IdRubro_IR = info.IdRubro_IR, IdRubro_FR = info.IdRubro_FR }; Context.ro_rubros_calculados.Add(Entity); Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }
private void ROL_002_RolPago_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { lbl_fecha.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss"); ro_rubros_calculados_Info info_rubros_calculados = new ro_rubros_calculados_Info(); ro_rubros_calculados_Bus bus_rubros_calculados = new ro_rubros_calculados_Bus(); int IdEmpresa = p_IdEmpresa.Value == null ? 0 : Convert.ToInt32(p_IdEmpresa.Value); int IdNomina = p_IdNomina.Value == null ? 0 : Convert.ToInt32(p_IdNomina.Value); int IdNominaTipo = p_IdNominaTipo.Value == null ? 0 : Convert.ToInt32(p_IdNominaTipo.Value); int IdPeriodo = p_IdPeriodo.Value == null ? 0 : Convert.ToInt32(p_IdPeriodo.Value); int IdSucursal = p_IdSucursal.Value == null ? 0 : Convert.ToInt32(p_IdSucursal.Value); int IdEmpleado = p_IdEmpleado.Value == null ? 0 : Convert.ToInt32(p_IdEmpleado.Value); info_rubros_calculados = bus_rubros_calculados.get_info(IdEmpresa); ROL_002_Bus bus_rpt = new ROL_002_Bus(); List <ROL_002_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdNomina, IdNominaTipo, IdPeriodo, IdSucursal, IdEmpleado); tb_empresa_Bus bus_empresa = new tb_empresa_Bus(); var emp = bus_empresa.get_info(IdEmpresa); if (emp != null && emp.em_logo != null) { ImageConverter obj = new ImageConverter(); lbl_imagen.Image = (Image)obj.ConvertFrom(emp.em_logo); } lbl_empresa.Text = emp.RazonSocial; Lista_ingreso = (from q in lst_rpt where q.Valor > 0 group q by new { q.IdEmpresa, q.IdSucursal, q.IdPeriodo, q.IdNominaTipo, q.IdNominaTipoLiqui, q.IdEmpleado, q.RubroDescripcion, q.Valor, q.Grupo, q.ca_orden, q.ru_orden } into ing select new ROL_002_Info { IdEmpresa = ing.Key.IdEmpresa, IdSucursal = ing.Key.IdSucursal, IdPeriodo = ing.Key.IdPeriodo, IdNominaTipo = ing.Key.IdNominaTipo, IdNominaTipoLiqui = ing.Key.IdNominaTipoLiqui, IdEmpleado = ing.Key.IdEmpleado, RubroDescripcion = ing.Key.RubroDescripcion, Valor = ing.Key.Valor, Grupo = ing.Key.Grupo, ca_orden = ing.Key.ca_orden, ru_orden = ing.Key.ru_orden }).ToList(); Lista_egreso = (from q in lst_rpt where q.Valor < 0 group q by new { q.IdEmpresa, q.IdSucursal, q.IdPeriodo, q.IdNominaTipo, q.IdNominaTipoLiqui, q.IdEmpleado, q.RubroDescripcion, q.Valor, q.Grupo, q.ca_orden, q.ru_orden } into egr select new ROL_002_Info { IdEmpresa = egr.Key.IdEmpresa, IdSucursal = egr.Key.IdSucursal, IdPeriodo = egr.Key.IdPeriodo, IdNominaTipo = egr.Key.IdNominaTipo, IdNominaTipoLiqui = egr.Key.IdNominaTipoLiqui, IdEmpleado = egr.Key.IdEmpleado, RubroDescripcion = egr.Key.RubroDescripcion, Valor = (egr.Key.Valor) * -1, Grupo = egr.Key.Grupo, ca_orden = egr.Key.ca_orden, ru_orden = egr.Key.ru_orden }).ToList(); lb_liquido.Text = Convert.ToString(Convert.ToDecimal(string.Format("{0:F2}", (lst_rpt.Sum(v => v.Valor))))); this.DataSource = lst_rpt; }
public ro_Acta_Finiquito_Info ObtenerIndemnizacion(ro_Acta_Finiquito_Info info) { try { cl_enumeradores.eTipoTerminacioncontratoRRHH TipoterminacionContrato; TipoterminacionContrato = (cl_enumeradores.eTipoTerminacioncontratoRRHH)Enum.Parse(typeof(cl_enumeradores.eTipoTerminacioncontratoRRHH), info.IdCausaTerminacion); info_parametro = bus_parametros.get_info(info.IdEmpresa); info_rubros_calculados = bus_rubros_calculados.get_info(info.IdEmpresa); _Info = info; switch (TipoterminacionContrato) { case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_01: //Por las causas legalmente previstas en el contrato ObtenerIndemnizacionXDesahucio(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_02: //Por acuerdo de las partes (Renuncia) ObtenerIndemnizacionXDesahucio(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_03: break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_04: // Por muerte o incapacidad del empleador o extinción de la persona jurídica contratante ObtenerIndemnizacionXDespidoIntempestivo(); ObtenerIndemnizacionXDesahucio(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_05: break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_06: break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_07: break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_08: //Por voluntad del trabajador previo visto bueno ObtenerIndemnizacionXDespidoIntempestivo(); ObtenerIndemnizacionXDesahucio(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_09: //Por desahucio ObtenerIndemnizacionXDesahucio(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_10: ObtenerIndemnizacionXDespidoIntempestivo(); break; case cl_enumeradores.eTipoTerminacioncontratoRRHH.CTL_11: break; default: break; } // Obtenersueldo_no_pagados(); // ObtenerAportePersonal(); ObtenerProvisionDecimoIII(); ObtenerProvisionDecimoIV(); ObtenerProvisionFondoReserva(); ObtenerProvisionVacaciones(); ObtenerCuotasPrestamosPendientes(); ObtenerNovedadesPendientes(); if (info.EsMujerEmbarazada) { ObtenerIndemnizacionXDespidoMujerEmbarazada(); } if (info.EsDirigenteSindical) { ObtenerIndemnizacionXDespidoDirigenteSindical(); } if (info.EsPorEnfermedadNoProfesional) { ObtenerIndemnizacionXDespidoEnfermedadNoProfesional(); } if (info.EsPorDiscapacidad) { ObtenerIndemnizacionXDespidoDiscapacitado(); } info.lst_detalle = lst_valores_x_indegnizacion; int sec = 1; info.lst_detalle.ForEach(v => v.IdSecuencia = sec++); return(info); } catch (Exception) { throw; } }
public bool guardarDB(ro_rubros_calculados_Info info) { try { using (EntityRoles_FJ Context = new EntityRoles_FJ()) { ro_rubros_calculados Entity = Context.ro_rubros_calculados.FirstOrDefault(q => q.IdEmpresa == info.IdEmpresa); if (Entity == null) { ro_rubros_calculados Entity_add = new ro_rubros_calculados { IdEmpresa = info.IdEmpresa, IdRubro_dias_trabajados = info.IdRubro_dias_trabajados, IdRubro_iess_perso = info.IdRubro_iess_perso, IdRubro_sueldo = info.IdRubro_sueldo, IdRubro_tot_egr = info.IdRubro_tot_egr, IdRubro_tot_ing = info.IdRubro_tot_ing, IdRubro_tot_pagar = info.IdRubro_tot_pagar, IdRubro_aporte_patronal = info.IdRubro_aporte_patronal, IdRubro_fondo_reserva = info.IdRubro_fondo_reserva, IdRubro_prov_vac = info.IdRubro_prov_vac, IdRubro_prov_DIII = info.IdRubro_prov_DIII, IdRubro_prov_DIV = info.IdRubro_prov_DIV, IdRubro_prov_FR = info.IdRubro_prov_FR, IdRubro_DIII = info.IdRubro_DIII, IdRubro_DIV = info.IdRubro_DIV, IdRubro_IR = info.IdRubro_IR, IdRubro_anticipo = info.IdRubro_anticipo, IdRubro_alimentacion = info.IdRubro_alimentacion, IdRubro_transporte = info.IdRubro_transporte, IdRubro_otros_ingresos = info.IdRubro_otros_ingresos, IdRubro_dias_efectivos = info.IdRubro_dias_efectivos, IdRubro_horas_extras = info.IdRubro_horas_extras, IdRubro_subtotal_variable = info.IdRubro_subtotal_variable, IdRubro_otros_descuentos = info.IdRubro_otros_descuentos, IdRubro_descuento_permiso = info.IdRubro_descuento_permiso, IdRubro_alm_car = info.IdRubro_alm_car, IdRubro_alm_ent = info.IdRubro_alm_ent, IdRubro_alm_vol = info.IdRubro_alm_vol, IdRubro_beb_car = info.IdRubro_beb_car, IdRubro_beb_ent = info.IdRubro_beb_ent, IdRubro_beb_vol = info.IdRubro_beb_vol, IdRubro_servicio = info.IdRubro_servicio }; Context.ro_rubros_calculados.Add(Entity_add); } else { Entity.IdRubro_dias_trabajados = info.IdRubro_dias_trabajados; Entity.IdRubro_iess_perso = info.IdRubro_iess_perso; Entity.IdRubro_sueldo = info.IdRubro_sueldo; Entity.IdRubro_tot_egr = info.IdRubro_tot_egr; Entity.IdRubro_tot_ing = info.IdRubro_tot_ing; Entity.IdRubro_tot_pagar = info.IdRubro_tot_pagar; Entity.IdRubro_aporte_patronal = info.IdRubro_aporte_patronal; Entity.IdRubro_fondo_reserva = info.IdRubro_fondo_reserva; Entity.IdRubro_prov_vac = info.IdRubro_prov_vac; Entity.IdRubro_prov_DIII = info.IdRubro_prov_DIII; Entity.IdRubro_prov_DIV = info.IdRubro_prov_DIV; Entity.IdRubro_prov_FR = info.IdRubro_prov_FR; Entity.IdRubro_DIII = info.IdRubro_DIII; Entity.IdRubro_DIV = info.IdRubro_DIV; Entity.IdRubro_IR = info.IdRubro_IR; Entity.IdRubro_anticipo = info.IdRubro_anticipo; Entity.IdRubro_alimentacion = info.IdRubro_alimentacion; Entity.IdRubro_transporte = info.IdRubro_transporte; Entity.IdRubro_otros_descuentos = info.IdRubro_otros_descuentos; Entity.IdRubro_horas_extras = info.IdRubro_horas_extras; Entity.IdRubro_dias_efectivos = info.IdRubro_dias_efectivos; Entity.IdRubro_subtotal_variable = info.IdRubro_subtotal_variable; Entity.IdRubro_descuento_permiso = info.IdRubro_descuento_permiso; Entity.IdRubro_alm_car = info.IdRubro_alm_car; Entity.IdRubro_alm_ent = info.IdRubro_alm_ent; Entity.IdRubro_alm_vol = info.IdRubro_alm_vol; Entity.IdRubro_beb_car = info.IdRubro_beb_car; Entity.IdRubro_beb_ent = info.IdRubro_beb_ent; Entity.IdRubro_beb_vol = info.IdRubro_beb_vol; Entity.IdRubro_servicio = info.IdRubro_servicio; } Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }