コード例 #1
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,Name,CategoryID")] SubCategoryMaster subCategoryMaster)
        {
            if (ModelState.IsValid)
            {
                db.Entry(subCategoryMaster).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(subCategoryMaster));
        }
コード例 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,Name,SupportTeam,LoginID,Password")] EmployeeMaster employeeMaster)
        {
            if (ModelState.IsValid)
            {
                db.Entry(employeeMaster).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(employeeMaster));
        }
コード例 #3
0
        public async Task <ActionResult> Edit([Bind(Include = "Name,Address,ImagePath")] ImageUploader imageUploader)
        {
            if (ModelState.IsValid)
            {
                db.Entry(imageUploader).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(imageUploader));
        }
コード例 #4
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,Name")] EmployeeType employeeType)
        {
            if (ModelState.IsValid)
            {
                db.Entry(employeeType).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(employeeType));
        }
コード例 #5
0
ファイル: DailyTasksController.cs プロジェクト: VikashIND/SMS
        public async Task <ActionResult> Edit([Bind(Include = "ID,EmployeeID,SupportTeam,ClientID,ClientName,CategoryID,Description,Notes,Date,AssignedDate,DeliveryDate,Status")] DailyTask dailyTask)
        {
            if (ModelState.IsValid)
            {
                _db.Entry(dailyTask).State = EntityState.Modified;
                await _db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(dailyTask));
        }
コード例 #6
0
ファイル: RepositoryBase.cs プロジェクト: thuyenuit/MEPAC
 public virtual void Update(T entity)
 {
     dbSet.Attach(entity);
     dataContext.Entry(entity).State = EntityState.Modified;
 }