public async Task <ResponseDto <List <Models.Work> > > SearchAsync(WorkSearchRequestDto request) { const string methodName = ClassName + "." + nameof(SearchAsync); var response = new ResponseDto <List <Models.Work> >() { Result = new List <Models.Work>() }; try { // TODO Make entity action here var testResult = new Models.Work() { WorkId = 1, WorkName = "TestWorkLoad", IsCompleted = true, IsActive = true, }; response.Result.Add(testResult); response.SetSuccess(); } catch (Exception ex) { response.SetError(0, ex.Message, methodName, ResponseType.Error); } return(response); }
public ActionResult Index() { DateTime date = DateTime.Now; Models.Human HR = new Models.Human(); HR.FIO = ("Иванов Иван Иванович"); Models.Work FirstWork = new Models.Work(); FirstWork.Name = "Чебуречная"; int year = date.Year; int month = date.Month; ViewBag.Exp = date; ViewBag.Ex = year; ViewBag.E = month; return(View()); }
public async Task <ResponseDto> CreateAsync(Models.Work model) { const string methodName = ClassName + "." + nameof(CreateAsync); var response = new ResponseDto(); try { // TODO Make entity action here response.SetSuccess(); } catch (Exception ex) { response.SetError(0, ex.Message, methodName, ResponseType.Error); } return(response); }
public void OnGet(long id) { WorkViewModel = DbHelper.GetFirst <Models.Work>(w => w.Id == id); }