Exemplo n.º 1
0
        public Boolean GuardarBD(ro_Rol_Detalle_Info info, ref string msg)
        {
            try
            {
                Boolean valorRetornar = false;

                //MODIFICA DETALLE
                if (oData.GetExiste(info, ref mensaje))
                {
                    valorRetornar = oData.ModificarBD(info, ref mensaje);
                }
                else
                {//ACTUALIZA DETALLE
                    valorRetornar = oData.GuardarBD(info, ref mensaje);
                }
                return(valorRetornar);
            }
            catch (Exception ex)
            {
                Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
                throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GuardarBD", ex.Message), ex)
                      {
                          EntityType = typeof(ro_Rol_Detalle_Bus)
                      };
            }
        }
Exemplo n.º 2
0
 public Boolean GetExiste(ro_Rol_Detalle_Info info, ref string msg)
 {
     try
     {
         return(oData.GetExiste(info, ref mensaje));
     }catch (Exception ex) {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GetExiste", ex.Message), ex)
               {
                   EntityType = typeof(ro_Rol_Detalle_Bus)
               };
     }
 }
 private void gridViewEgr_Click(object sender, EventArgs e)
 {
     try
     {
         Info_IngEgrEmpleado = new ro_Rol_Detalle_Info();
         Info_IngEgrEmpleado = gridViewEgr.GetFocusedRow() as ro_Rol_Detalle_Info;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
         Log_Error_bus.Log_Error(ex.ToString());
     }
 }
Exemplo n.º 4
0
        public Boolean GrabarBD(ro_Rol_Detalle_Info info, ref string msg)
        {
            try
            {
                Boolean valorRetornar = false;

                valorRetornar = oData.GuardarBD(info, ref mensaje);

                return(valorRetornar);
            }
            catch (Exception ex)
            {
                Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
                throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GrabarBD", ex.Message), ex)
                      {
                          EntityType = typeof(ro_Rol_Detalle_Bus)
                      };
            }
        }
        public void Set_Valor_Archivo_transferencia(ro_Participacion_Utilidad_Info info)
        {
            try
            {
                decimal idArchivo = 0; string msg = "";
                rol_info.IdEmpresa         = param.IdEmpresa;
                rol_info.IdNominaTipo      = 3;
                rol_info.IdNominaTipoLiqui = 1;
                rol_info.IdPeriodo         = (int)cmbPeriodos.EditValue;
                rol_info.Descripcion       = "";
                rol_info.FechaIngresa      = DateTime.Now;
                rol_info.UsuarioIngresa    = param.IdUsuario;


                if (rol_bus.GuardarBD(rol_info, ref msg))
                {// elimina el detalle
                    rol_rol_detalle_bus.EliminarBD(param.IdEmpresa, 3, 1, Convert.ToInt32(cmbPeriodos.EditValue));
                    foreach (var item in info.oListRo_Participacion_Utilidad_Empleado_Info)
                    {
                        ro_Rol_Detalle_Info info_detalle_rol = new ro_Rol_Detalle_Info();
                        info_detalle_rol.IdEmpresa         = param.IdEmpresa;
                        info_detalle_rol.IdNominaTipo      = 3;
                        info_detalle_rol.IdNominaTipoLiqui = 1;
                        info_detalle_rol.IdPeriodo         = (int)cmbPeriodos.EditValue;
                        info_detalle_rol.IdEmpleado        = item.IdEmpleado;

                        info_detalle_rol.IdRubro             = "550";
                        info_detalle_rol.Orden               = 1;
                        info_detalle_rol.rub_visible_reporte = true;
                        info_detalle_rol.Observacion         = "pago utilidad";
                        info_detalle_rol.Valor               = item.ValorTotal;
                        rol_rol_detalle_bus.GrabarBD(info_detalle_rol, ref msg);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }