public IActionResult Create(JobsDTO jobs) { if (ModelState.IsValid) { _jobs.AddJob(_mapper.Map <Jobs>(jobs)); return(RedirectToAction(nameof(Index))); } return(View(jobs)); }
public string JobsAdd(QueryCommon <JobsAddQuery> query) { DateTime now = DateTime.Now; query.ParamInfo.UserId = base.CurrentUser.Id; query.ParamInfo.UserType = base.CurrentUser.UserType; query.ParamInfo.ApprovalStatus = 1; query.ParamInfo.CreateDate = now; query.ParamInfo.UpdateDate = now; IJobsService jobsService = ServiceHelper.Create <IJobsService>(); Result_Msg res = jobsService.AddJob(query); return(Newtonsoft.Json.JsonConvert.SerializeObject(res)); }