示例#1
0
 public IActionResult Create(JobsDTO jobs)
 {
     if (ModelState.IsValid)
     {
         _jobs.AddJob(_mapper.Map <Jobs>(jobs));
         return(RedirectToAction(nameof(Index)));
     }
     return(View(jobs));
 }
示例#2
0
        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));
        }