Exemplo n.º 1
0
        public ActionResult EditProfile()
        {
            String empID = HttpContext.User.Identity.Name;
            var emp = new tbEmp();
            emp.EmpID = empID;
            ProfileService profileService=new ProfileService();
            emp.EmpName = profileService.getEmpName(empID) == null ? String.Empty : profileService.getEmpName(empID);
            emp.Phone = profileService.getPhone(empID) == null ? String.Empty : profileService.getPhone(empID);
            emp.Location = profileService.getLocation(empID) == null ? String.Empty : profileService.getLocation(empID);
            emp.Email = profileService.getEmail(empID) == null ? String.Empty : profileService.getEmail(empID);

            return View(emp);
        }
Exemplo n.º 2
0
        public ActionResult DreamSubmit(DreamGridDisplayModel dreamModel)
        {
            var _service = new DreamService();
             var dreamTable=new tbDream();
             ProfileService profileService = new ProfileService();
             dreamTable.EMPID = HttpContext.User.Identity.Name ?? string.Empty;
             dreamTable.EMPNAME = profileService.getEmpName(HttpContext.User.Identity.Name) == null ? String.Empty : profileService.getEmpName(HttpContext.User.Identity.Name);
             //dreamTable.LOCATION = profileService.getPhone(empID) == null ? String.Empty : profileService.getPhone(empID);
             dreamTable.LOCATION = profileService.getLocation(HttpContext.User.Identity.Name) == null ? String.Empty : profileService.getLocation(HttpContext.User.Identity.Name);

            dreamTable.DTITLE=dreamModel.DreamTitle ?? string.Empty;
            dreamTable.DDESCRIPTION = dreamModel.DreamDescription ?? string.Empty;

            dreamTable.SUBMITTEDDATE = DateTime.Now;
            dreamTable.STATUSID = 1;
            _service.DreamFormSubmit(dreamTable);

            return View();
        }
Exemplo n.º 3
0
 public ActionResult EditProfile(tbEmp emp)
 {
     ProfileService profileService = new ProfileService();
     if (profileService.setProfileAttributes(emp))
         return View(emp);
     else
         return
             View("Error");
 }