public static int UpdateUser(Dto.user u) { try { return(Dal.UserDal.UpdateUsers(converterEF.UsersConverters.ToDalUsers(u))); } catch (Exception e) { throw; } }
public static int adduser(Dto.user u) { try { return(Dal.UserDal.AddUser(converterEF.UsersConverters.ToDalUsers(u))); } catch { throw; } }
public static Dto.user ToDtoUsers(Dal.Users e) { Dto.user en = new Dto.user(); en.UserId = e.UserId; en.RoleId = e.RoleId; en.FirstName = e.FirstName; en.LastName = e.LastName; en.Password = e.Password; en.Email = e.Email; en.Phone = e.Phone; en.Address = e.Address; en.NumOfHouse = e.NumOfHouse; en.Locality = e.Locality; en.BirthDate = e.BirthDate; en.Active = e.Active; return(en); }
public IHttpActionResult PostUser(Dto.user u) { try { int x = Bll.users.adduser(u); if (x == 0) { return(NotFound()); } else { return(Ok(x)); } } catch (Exception e) { return(BadRequest(e.Message)); } }
public static int AddVolunteer(Dto.user volunteerDto) { var user = converterEF.UsersConverters.ToDalUsers(volunteerDto); return(Dal.VolunteerDal.AddVolunteer(user)); }