Beispiel #1
0
 public Rec_QuestionModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Rec_QuestionModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Rec_QuestionEntity>(id, ConstantSql.hrm_rec_sp_get_QuestionById, ref status);//note
     if (entity != null)
     {
         model = entity.CopyData<Rec_QuestionModel>();
     }
     model.ActionStatus = status;
     return model;
 }
        public ActionResult CreateQuestion(Guid? QuestionaireID, Guid? QuestionBankID, double Rate)

        {
            Rec_QuestionModel model = new Rec_QuestionModel();
            model.QuestionaireID = QuestionaireID;
            model.QuestionBankID = QuestionBankID;
            model.Rate = Rate;
            model.Position = 0;
            var service = new RestServiceClient<Rec_QuestionModel>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Rec_Question/", model);
            ViewBag.MsgInsert = "Insert success";
            return Json(result, JsonRequestBehavior.AllowGet);
        }