Пример #1
0
        public ActionResult SaveStyleOfWork(int?id, int?Score)
        {
            if (Score == null)
            {
                return(Redirect("StyleOfWork?id=" + this.styleOfWorkService.GetOne(id.Value).BeMeasuredUserInfoID));
            }
            StyleOfWorkDataObject styleOfWork = this.styleOfWorkService.Update(id.Value, Score.Value);

            return(Redirect("StyleOfWork?id=" + styleOfWork.BeMeasuredUserInfoID));
        }
Пример #2
0
        public ActionResult StyleOfWork(int?id)
        {
            UserInfoDataObject userInfo = Session["UserInfo"] as UserInfoDataObject;
            int year = this.timeOverService.GetFirst().Year;
            StyleOfWorkDataObject styleOfWork = this.styleOfWorkService.GetOne(id.Value, userInfo.ID, year);

            if (styleOfWork == null)
            {
                styleOfWork = this.styleOfWorkService.Add(id.Value, userInfo.ID);
            }
            ViewData["StyleOfWork"] = styleOfWork;
            return(View());
        }