示例#1
0
 public bool DreamFormUpdate(DreamGridDisplayModel dreamModel)
 {
     var _dataContext = new CSCPortalDataContext();
     try
     {
         var dreamModelData = (from data in _dataContext.tbDreams
                               where data.DID == dreamModel.DreamId
                               select data).FirstOrDefault();
         dreamModelData.CONTACTPERSON = dreamModel.ContactPerson;
         dreamModelData.STATUSID = int.Parse(dreamModel.Status);
         _dataContext.SubmitChanges();
     }
     catch (Exception e)
     {
         return false;
     }
     return true;
 }
示例#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();
        }
示例#3
0
 public ActionResult DreamView()
 {
     //Priyank TODO
     var model = new DreamGridDisplayModel();
     model.DreamTitle = "";
     model.DreamDescription = "";
     model.ContactPerson = "";
     return View(model);
 }
示例#4
0
 public ActionResult DreamView(DreamGridDisplayModel dreamModel)
 {
     var _service = new DreamService();
     _service.DreamFormUpdate(dreamModel);
     return View(dreamModel);
 }
示例#5
0
        public bool DreamFormUpdate(DreamGridDisplayModel dreamModel)
        {
            var _repository=new DreamRepository();

               return _repository.DreamFormUpdate(dreamModel);
        }