public async Task <IActionResult> Create([Bind("DepId,DepNm,DepN1,DepHg,ColNo,PeoTt,SegHr,RouMn,RemDr,SeqNo,DirDp")] Tbldeparment tbldeparment) { if (ModelState.IsValid) { _context.Add(tbldeparment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tbldeparment)); }
public async Task <IActionResult> Create([Bind("ShiId,SeqN1,SeqNo,OnnTm,OnnRd,OnnBt,OffTm,OffRd,OffBt,TypId,MinSt,WrkHr,LatBt,BltNm,BltDt,LstNm,LstDt,ManIn,ManOu")] Tbldetailsroster tbldetailsroster) { if (ModelState.IsValid) { _context.Add(tbldetailsroster); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tbldetailsroster)); }
public async Task <IActionResult> Create([Bind("EmpId,SeqNo,ChaDt,Lcb")] Tblsalary tblsalary) { if (ModelState.IsValid) { _context.Add(tblsalary); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblsalary)); }
public async Task <IActionResult> Create([Bind("SeqNo,EmpId,StrDt,EndDt,HouDy,StrTm,EndTm,HouTt,LeaId,DayTt,DayBt,NotDr,BltNm,BltDt,LstNm,LstDt")] Tblleave tblleave) { if (ModelState.IsValid) { _context.Add(tblleave); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblleave)); }
public async Task <IActionResult> Create([Bind("EmpId,EmpI1,EmpNm,EmpN1,MstDr,BirDt,SexBt,MarBt,DepId,CouId,CrdNo,PosId,AddDr,AddD1,InhDt,CrdId,CrdDt,CrdLc,CitId,RacNm,NatCo,EduId,ProId,GraId,TelNo,TypId,AccNo,AccNm,BnkNm,RelDr,NewBt,MeaBt,RemDr,AttBt,SalBt,VacBt,DelBt,GrtId,GrpId,LevId,LckBt,BhxBt,DirBt,BltNm,BltDt,LstNm,LstDt,SenDt,RemD2,FirDt")] Tblemployee tblemployee) { if (ModelState.IsValid) { _context.Add(tblemployee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblemployee)); }
public async Task <IActionResult> Create([Bind("TabcaId,TabcaName,Pic,Del,Description")] Tbltablecategory tbltablecategory) { if (ModelState.IsValid) { _context.Add(tbltablecategory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tbltablecategory)); }
public async Task <IActionResult> Create([Bind("FodId,FodName,Description,Price,FodcaId,Pic,Rate,Del,FodAvailable")] Tblfood tblfood) { if (ModelState.IsValid) { _context.Add(tblfood); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["FodcaId"] = new SelectList(_context.Tblfoodcategory, "FodcaId", "FodcaId", tblfood.FodcaId); return(View(tblfood)); }
public async Task <IActionResult> Create([Bind("ShiId,ShiNm,MaxHr,MinHr,ConH1,AddH1,ConH2,AddH2,BltNm,BltDt,LstNm,LstDt,Tim02,OnnTm,OffTm,NigSh,OnnOt")] Tblroster tblroster) { if (ModelState.IsValid) { try { _context.Add(tblroster); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } catch (Exception ex) { Danger(string.Format("<b>Lỗi {0}</b>", ex.Message + ex.InnerException), true); } } return(View(tblroster)); }