//public static IEnumerable<gestionalumnos.Entities.UsersToRoles> Buscar(gestionalumnos.Entities.UsersToRoles pUser) public static IEnumerable<gestionalumnos.Entities.Roles> Buscar(gestionalumnos.Entities.UsersToRoles pUser) { Database odb = DatabaseFactory.CreateDatabase("gestionAlumnos"); try { //return odb.ExecuteSprocAccessor("UsersToRoles_BuscarRoles", MapBuilder<gestionalumnos.Entities.UsersToRoles>.MapAllProperties().Build(),pUser.FKUserID); return odb.ExecuteSprocAccessor("UsersToRoles_BuscarRoles", MapBuilder<gestionalumnos.Entities.Roles>.MapAllProperties().DoNotMap(p => p.FechaBaja).DoNotMap(p => p.RoleName).Build(), pUser.FKUserID); } catch (Exception ex) { Logger.WriteXMLError("UserToRoles.cs", "UserToRoles.cs", "Buscar", ex.Message); //Console.WriteLine("Problemas Al Listar Los Clientes: " + ex.Message); throw; } }
public static IEnumerable<gestionalumnos.Entities.ControlsToRoles> Habilitar(gestionalumnos.Entities.ControlsToRoles pControls) { Database odb = DatabaseFactory.CreateDatabase("gestionAlumnos"); try { //return odb.ExecuteSprocAccessor("ControlsToRole_ListarPorPagina", MapBuilder<gestionalumnos.Entities.ControlsToRoles>.MapAllProperties().DoNotMap(p => p.FKPage).DoNotMap(p => p.FKRole).Build(), pPage); //return odb.ExecuteSprocAccessor("ControlsToRole_ListarPorPagina", MapBuilder<gestionalumnos.Entities.ControlsToRoles>.MapAllProperties().DoNotMap(p => p.FKPage).Build(), pPage); return odb.ExecuteSprocAccessor("ControlsToRoles_Habilitar", MapBuilder<gestionalumnos.Entities.ControlsToRoles>.MapAllProperties().Build(), pControls.FKPage, pControls.FKRole); } catch (Exception ex) { Logger.WriteXMLError("ControlsToRoles.cs", "ControlsToRoles.cs", "Habilitar", ex.Message); //Console.WriteLine("Problemas Al Listar Los Clientes: " + ex.Message); throw; } }
public static int Insertar(gestionalumnos.Entities.ControlsToRoles pControls) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); int clienteID = -1; try { clienteID=oDb.ExecuteNonQuery("spInsertNewControlToRole", pControls.FKRole, pControls.FKPage,pControls.FKControlID,pControls.Invisible,pControls.Disabled); //clienteID = int.Parse(oDb.ExecuteScalar("spInsertNewControlToRole", pControls.FKRole, pControls.FKPage,pControls.FKControlID,pControls.Invisible,pControls.Disabled).ToString()); } catch (Exception ex) { Logger.WriteXMLError("ControlsToRoles.cs", "ControlsToRoles.cs", "Insertar", ex.Message); //Console.WriteLine("Problemas Al Guardar El Tipo De Documento: " + ex.Message); //throw; } return clienteID; }
public static gestionalumnos.Entities.Users IniciarSesion(gestionalumnos.Entities.Users pUsers) { Database odb = DatabaseFactory.CreateDatabase("gestionAlumnos"); try { List<gestionalumnos.Entities.Users> lstUsuarios= odb.ExecuteSprocAccessor("Users_IniciarSesion", MapBuilder<gestionalumnos.Entities.Users>.MapAllProperties().Build(), pUsers.Name, pUsers.Password).ToList(); if (lstUsuarios != null && lstUsuarios.Count == 1) { return lstUsuarios[0]; } else return null; } catch (Exception ex) { Logger.WriteXMLError("Users.cs", "Users.cs", "IniciarSesion", ex.Message); //Logger.WriteXMLError("Users.cs", "Users.cs", "IniciarSesion", ex.Message); throw; } }
public static bool Existe(gestionalumnos.Entities.Controls pControls) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); try { List<gestionalumnos.Entities.Controls> lst = oDb.ExecuteSprocAccessor("Controls_Buscar", MapBuilder<gestionalumnos.Entities.Controls>.MapAllProperties().Build(), pControls.Page, pControls.ControlID).ToList(); if (lst != null && lst.Count > 0) { return true; } else { return false; } } catch (Exception ex) { Logger.WriteXMLError("Controls.cs", "Controls.cs", "Existe", ex.Message); //Console.WriteLine("Problemas Al Listar Los ALumnos: " + ex.Message); throw; } }
public static bool Eliminar(gestionalumnos.Entities.Roles pRoles) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); int result; try { result = oDb.ExecuteNonQuery("Roles_Eliminar", pRoles.FechaBaja, pRoles.RoleID); if (result > 0) { return true; } else { return false; } } catch (Exception ex) { Logger.WriteXMLError("Roles.cs", "Roles.cs", "Eliminar", ex.Message); //Console.WriteLine("Problema Al Eliminar El Tipo De Documento: " + ex.Message); throw; } }
public static bool Baja(gestionalumnos.Entities.Users pUsers) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); int result; try { result = oDb.ExecuteNonQuery("Users_Baja", pUsers.Name, pUsers.Password,pUsers.UserID, pUsers.FechaBaja); if (result > 0) { return true; } else { return false; } } catch (Exception ex) { Logger.WriteXMLError("Users.cs", "Users.cs", "Baja", ex.Message); //Console.WriteLine("Problema Al Eliminar El Tipo De Documento: " + ex.Message); throw; } }
public IEnumerable<gestionalumnos.Entities.Controls> ListarPorPagina(gestionalumnos.Entities.Controls pControls) { return gestionalumnos.DL.Controls.ListarPorPagina(pControls); }
public bool Existe(gestionalumnos.Entities.Controls pControls) { return gestionalumnos.DL.Controls.Existe(pControls); }
public bool Eliminar(gestionalumnos.Entities.Controls pControls) { return gestionalumnos.DL.Controls.Eliminar(pControls); }
public int Insertar(gestionalumnos.Entities.Roles pRoles) { return gestionalumnos.DL.Roles.Insertar(pRoles); }
public IEnumerable<gestionalumnos.Entities.ControlsToRoles> Habilitar(gestionalumnos.Entities.ControlsToRoles pControls) { return gestionalumnos.DL.ControlsToRoles.Habilitar(pControls); }
public int Insertar(gestionalumnos.Entities.Users pUsers) { return gestionalumnos.DL.Users.Insertar(pUsers); }
public gestionalumnos.Entities.Users IniciarSesion(gestionalumnos.Entities.Users pUsers) { return gestionalumnos.DL.Users.IniciarSesion(pUsers); }
public bool Baja(gestionalumnos.Entities.Users pUsers) { return gestionalumnos.DL.Users.Baja(pUsers); }
public bool Modificar(gestionalumnos.Entities.Roles pRoles) { return gestionalumnos.DL.Roles.Actualizar(pRoles); }
public static bool Modificar(gestionalumnos.Entities.Users pUsers) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); int result; try { result = oDb.ExecuteNonQuery("Users_Modificar", pUsers.Name, pUsers.Email, pUsers.UserID); if (result > 0) { return true; } else { return false; } } catch (Exception ex) { Logger.WriteXMLError("Users.cs", "Users.cs", "Modificar", ex.Message); //Console.WriteLine("Problemas Al Modificar El Tipo De Documento: " + ex.Message); throw; } }
public bool Modificar(gestionalumnos.Entities.Users pUsers) { return gestionalumnos.DL.Users.Modificar(pUsers); }
public bool ReestablecerPassword(gestionalumnos.Entities.Users pUsers) { return gestionalumnos.DL.Users.ReestablecerPassword(pUsers); }
//public IEnumerable<gestionalumnos.Entities.UsersToRoles> Buscar(gestionalumnos.Entities.UsersToRoles pUser) public IEnumerable<gestionalumnos.Entities.Roles> Buscar(gestionalumnos.Entities.UsersToRoles pUser) { return gestionalumnos.DL.UserToRoles.Buscar(pUser); }
public static int Insertar(gestionalumnos.Entities.Roles pRoles) { Database oDb = DatabaseFactory.CreateDatabase("gestionAlumnos"); int clienteID = -1; try { clienteID = int.Parse(oDb.ExecuteScalar("Roles_Insertar", pRoles.RoleName).ToString()); } catch (Exception ex) { Logger.WriteXMLError("Roles.cs", "Roles.cs", "Insertar", ex.Message); //Console.WriteLine("Problemas Al Guardar El Tipo De Documento: " + ex.Message); throw; } return clienteID; }
public gestionalumnos.Entities.Controls Buscar(gestionalumnos.Entities.Controls pControls) { return gestionalumnos.DL.Controls.Buscar(pControls); }
public int Insertar(gestionalumnos.Entities.ControlsToRoles pControls) { return gestionalumnos.DL.ControlsToRoles.Insertar(pControls); }
public bool Eliminar(gestionalumnos.Entities.Roles pRoles) { return gestionalumnos.DL.Roles.Eliminar(pRoles); }