Exemplo n.º 1
0
 public Branches InsertBranches(Branches branche)
 {
     ///TODO: branch code should be genarate
     branche.Code = prefixesService.GetPrefixes(Constants.Prefix.BranchCode).Prefix;
     branchRepository.Insert(branche);
     return(branchRepository.Get(branche.Id));
 }
Exemplo n.º 2
0
 // GET: List of user details
 public JsonResult GetUserId()
 {
     try
     {
         var result = prefixesService.GetPrefixes(Constants.Prefix.UserId).Prefix;
         return(Json(new { success = true, data = result }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, errorMessage = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }
 public Users Insert(Users user)
 {
     user.UserId   = prefixService.GetPrefixes(Constants.Prefix.UserId).Prefix;
     user.Password = Constants.GetSecurePassword(user.UserId);
     return(usersRepository.Insert(user));
 }