예제 #1
0
        public ActionResult EditClient(UserProfile model)
        {
            Generate();
            if (_manager.ConfirmEmailForEdit(model.UserId, model.Email) != 0)
            {
                TempData["status"] = "Error";
                return View(model);
            }

            var client = _manager.UpdateClient(model);
            TempData["status"] = (client > 0) ? "Success" : "Error";
            return View(model);
        }
예제 #2
0
파일: FCLManager.cs 프로젝트: kpaggry/fcl
        public int UpdateClient(UserProfile model)
        {
            var x = _db.UserProfiles.Find(model.UserId);
            x.EmployerName = model.EmployerName;
            x.FirstName = model.FirstName;
            x.LastName = model.LastName;
            x.Email = model.Email;
            x.Phone = model.Phone;
            x.DateModified = DateTime.Today;
            x.ClientId = model.ClientId;
            x.DseId = model.DseId;
            x.CompanyId = model.CompanyId;

            return _db.SaveChanges();
        }
예제 #3
0
 public static string FormatBody(ChequeTransaction cheque, UserProfile user)
 {
     return String.Format(
                     File.ReadAllText(System.Web.Hosting.HostingEnvironment.MapPath(ConfigurationManager.AppSettings["ClientReminder"]))
                     , user.FirstName, String.Format(new System.Globalization.CultureInfo("yo-NG"), "{0:C}", @Math.Round((decimal)cheque.Amount, 2)), cheque.DateDue.Value.Date.ToShortDateString());
 }