예제 #1
0
 public ActionResult Configuration(Configuration Data)
 {
     if (ModelState.IsValid)
     {
         Data.Image = Image.Save(Data.Image, Data.Username);
         Services.Update(Data);
         return(RedirectToAction("LogIn", "Authentication"));
     }
     return(RedirectToAction("LogIn", "Authentication"));
 }
예제 #2
0
 public ActionResult Create(Employee employee)
 {
     if (ModelState.IsValid)
     {
         employee.Image = images.Save(employee.Image, employee.Code_Employee, true);
         if (Services.Add(employee))
         {
             Mail.TemplateMail(employee.Mail, employee);
             return(RedirectToAction("Create", new { State = true }));
         }
     }
     return(RedirectToAction("Create", new { State = false }));
 }