public ActionResult Display(OnlineInterviewQuestionAskModel model)
        {
            if (ModelState.IsValid)
            {
                OnlineInterviewQuestionAsk info = service.GetById(model.Id);



                info.Name    = model.Name;
                info.Address = model.Address;

                info.Phone = model.Phone;

                //是否显示到前端页面
                info.Question = model.Question;

                info.Ask = model.Ask;

                info.UpdateDate = DateTime.Now;

                service.Update(info);
                return(Json(new AjaxResult()
                {
                    Result = Result.Success
                }));
            }
            return(View(PluginHelper.GetViewPath(this.GetType(), "Display"), model));
        }
        public ActionResult Edit(OnlineInterviewQuestionAskModel model)
        {
            if (ModelState.IsValid)
            {
                OnlineInterviewQuestionAsk info = service.GetById(model.Id);

                info.Address = model.Address;

                info.Name     = model.Name;
                info.Phone    = model.Phone;
                info.Question = model.Question;
                service.Update(info);
                return(Json(new AjaxResult()
                {
                    Result = Result.Success
                }));
            }
            return(View(PluginHelper.GetViewPath(this.GetType(), "Edit"), model));
        }
        public ActionResult Create(OnlineInterviewQuestionAskModel model)
        {
            if (ModelState.IsValid)
            {
                OnlineInterviewQuestionAsk info = new OnlineInterviewQuestionAsk();
                info.Id                = Guid.NewGuid();
                info.Address           = model.Address;
                info.OnlineInterviewId = model.OnlineInterviewId;
                info.Name              = model.Name;
                info.Question          = model.Question;

                service.Add(info);
                return(Json(new AjaxResult()
                {
                    Result = Result.Success
                }));
            }
            return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
        }
 public void Delete(OnlineInterviewQuestionAsk info)
 {
     repository.Delete(info);
 }
        public void Update(OnlineInterviewQuestionAsk info)
        {
            var query = repository.Table;

            repository.Update(info);
        }
        public void Add(OnlineInterviewQuestionAsk info)
        {
            var query = repository.Table;

            repository.Insert(info);
        }