예제 #1
0
        public async Task <IActionResult> Edit(string id, [Bind("EmpId,SeqNo,ChaDt,NotDr,BltNm,BltDt,LstNm,LstDt,DonAp,ReaDr,Lcb")] Tblsalary tblsalary)
        {
            if (id != tblsalary.EmpId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblsalary);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblsalaryExists(tblsalary.EmpId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tblsalary));
        }
        public async Task <IActionResult> Edit(string id, [Bind("DepId,DepNm,DepN1,DepHg,ColNo,PeoTt,SegHr,RouMn,RemDr,SeqNo,DirDp")] Tbldeparment tbldeparment)
        {
            if (id != tbldeparment.DepId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tbldeparment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TbldeparmentExists(tbldeparment.DepId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tbldeparment));
        }
        public async Task <IActionResult> Edit(string id, [Bind("ShiId,SeqN1,SeqNo,OnnTm,OnnRd,OnnBt,OffTm,OffRd,OffBt,TypId,MinSt,WrkHr,LatBt,BltNm,BltDt,LstNm,LstDt,ManIn,ManOu")] Tbldetailsroster tbldetailsroster)
        {
            if (id != tbldetailsroster.ShiId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tbldetailsroster);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TbldetailsrosterExists(tbldetailsroster.ShiId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tbldetailsroster));
        }
예제 #4
0
        public async Task <IActionResult> Edit(string id, [Bind("ShiId,ShiNm,MaxHr,MinHr,ConH1,AddH1,ConH2,AddH2,BltNm,BltDt,LstNm,LstDt,Tim02,OnnTm,OffTm,NigSh,OnnOt")] Tblroster tblroster)
        {
            if (id != tblroster.ShiId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblroster);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException dbex)
                {
                    if (!TblrosterExists(tblroster.ShiId))
                    {
                        //return NotFound();
                        Danger(string.Format("<b>Lỗi {0}</b>", "Not Found"), true);
                    }
                    else
                    {
                        Danger(string.Format("<b>Lỗi {0}</b>", dbex.Message + dbex.InnerException), true);
                    }
                    return(View(tblroster));
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tblroster));
        }
        public async Task <IActionResult> Edit(int id, [Bind("SeqNo,EmpId,StrDt,EndDt,HouDy,StrTm,EndTm,HouTt,LeaId,DayTt,DayBt,NotDr,BltNm,BltDt,LstNm,LstDt")] Tblleave tblleave)
        {
            if (id != tblleave.SeqNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblleave);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblleaveExists(tblleave.SeqNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tblleave));
        }
        public async Task <IActionResult> Edit(int id, [Bind("FodId,FodName,Description,Price,FodcaId,Pic,Rate,Del,FodAvailable")] Tblfood tblfood)
        {
            if (id != tblfood.FodId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblfood);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblfoodExists(tblfood.FodId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FodcaId"] = new SelectList(_context.Tblfoodcategory, "FodcaId", "FodcaId", tblfood.FodcaId);
            return(View(tblfood));
        }
예제 #7
0
        public async Task <IActionResult> Edit(string id, [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 (id != tblemployee.EmpId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblemployee);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblemployeeExists(tblemployee.EmpId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tblemployee));
        }
예제 #8
0
        public async Task <IActionResult> Edit(int id, [Bind("TabcaId,TabcaName,Pic,Del,Description")] Tbltablecategory tbltablecategory)
        {
            if (id != tbltablecategory.TabcaId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tbltablecategory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TbltablecategoryExists(tbltablecategory.TabcaId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tbltablecategory));
        }