コード例 #1
0
 public Boolean GuardarBD(ro_Ing_Egre_x_Empleado_Info info, ref string msg)
 {
     try
     {
         return(oData.GuardarBD(info, ref msg));
     }
     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_Ing_Egre_x_Empleado_Bus)
               };
     }
 }
コード例 #2
0
        public List <ro_Ing_Egre_x_Empleado_Info> Get_List_Ing_Egre_x_Empleado(int IdEmpresa, int IdTipo_nomina, int IdProceso, int IdPeriodo)
        {
            List <ro_Ing_Egre_x_Empleado_Info> lM = new List <ro_Ing_Egre_x_Empleado_Info>();
            EntitiesRoles OERol_Empleado          = new EntitiesRoles();

            try
            {
                var select = from A in OERol_Empleado.ro_Ing_Egre_x_Empleado

                             where A.IdEmpresa == IdEmpresa && A.IdNomina_Tipo == IdTipo_nomina && A.IdNomina_TipoLiqui == IdProceso && A.IdPeriodo == IdPeriodo
                             select A;

                foreach (var item in select)
                {
                    ro_Ing_Egre_x_Empleado_Info info = new ro_Ing_Egre_x_Empleado_Info();


                    info.IdEmpresa          = item.IdEmpresa;
                    info.IdEmpleado         = item.IdEmpleado;
                    info.IdNomina_Tipo      = item.IdNomina_Tipo;
                    info.IdNomina_TipoLiqui = item.IdNomina_TipoLiqui;
                    info.IdPeriodo          = item.IdPeriodo;

                    info.IdRubro          = item.IdRubro;
                    info.IdNovedad        = item.IdNovedad;
                    info.SecuenciaNovedad = item.SecuenciaNovedad;
                    info.IdPrestamo       = item.IdPrestamo;
                    info.NunCouta         = item.NunCouta;

                    info.cerrado = item.cerrado;

                    lM.Add(info);
                }

                return(lM);
            }
            catch (Exception ex)
            {
                string array = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", array, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }
コード例 #3
0
//haac 29/11/2013
        public List <ro_Ing_Egre_x_Empleado_Info> Get_List_PagoBancoEmpleados(int IdEmpresa, int IdNomina_Tipo, int IdNomina_TipoLiqui, int IdPeriodo, decimal IdEmpleado)
        {
            List <ro_Ing_Egre_x_Empleado_Info> lista = new List <ro_Ing_Egre_x_Empleado_Info>();
            EntitiesRoles oEnt = new EntitiesRoles();

            try
            {
                var listado = from C in oEnt.vwRo_Pago_Banco_Empleado

                              where C.IdEmpresa == IdEmpresa && C.IdNomina_Tipo == IdNomina_Tipo && C.IdNomina_TipoLiqui == IdNomina_TipoLiqui && C.IdPeriodo == IdPeriodo

                              && C.IdEmpleado == IdEmpleado

                              select C;

                foreach (var item in listado)
                {
                    ro_Ing_Egre_x_Empleado_Info info = new ro_Ing_Egre_x_Empleado_Info();

                    info.IdEmpresa          = IdEmpresa;
                    info.IdEmpleado         = IdEmpleado;
                    info.IdNomina_Tipo      = IdNomina_Tipo;
                    info.IdNomina_TipoLiqui = IdNomina_TipoLiqui;
                    info.IdPeriodo          = IdPeriodo;

                    info.pe_cedulaRuc      = item.pe_cedulaRuc;
                    info.pe_nombreCompleto = item.pe_nombreCompleto;
                    info.neto_pagar        = Convert.ToDouble(item.neto_pagar);

                    lista.Add(info);
                }

                return(lista);
            }
            catch (Exception ex)
            {
                string array = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", array, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }
コード例 #4
0
        public Boolean GuardarBD(ro_Ing_Egre_x_Empleado_Info info, ref string msg)
        {
            try
            {
                using (EntitiesRoles db = new EntitiesRoles())
                {
                    ro_Ing_Egre_x_Empleado item = new ro_Ing_Egre_x_Empleado();
                    item.IdEmpresa          = info.IdEmpresa;
                    item.IdEmpleado         = info.IdEmpleado;
                    item.IdNomina_Tipo      = info.IdNomina_Tipo;
                    item.IdNomina_TipoLiqui = info.IdNomina_TipoLiqui;
                    item.IdPeriodo          = info.IdPeriodo;
                    item.IdRubro            = info.IdRubro;
                    item.IdNovedad          = info.IdNovedad;
                    item.SecuenciaNovedad   = info.SecuenciaNovedad;
                    item.IdPrestamo         = info.IdPrestamo;
                    item.NunCouta           = info.NunCouta;
                    item.IngEgr             = info.IngEgr;
                    item.Valor            = info.Valor;
                    item.iAnio            = info.iAnio;
                    item.iMes             = info.iMes;
                    item.cerrado          = info.cerrado;
                    item.observacionesSys = info.observacionesSys;
                    item.TipoRegistro     = info.TipoRegistro;
                    item.Unid_Medida      = info.Unid_Medida;


                    db.ro_Ing_Egre_x_Empleado.Add(item);
                    db.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            {
                string array = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", array, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }