public async Task <IActionResult> Edit(string id, T2 studentModel) { if (id != studentModel.ID) { return(NotFound()); } if (ModelState.IsValid) { await _context.Update(studentModel); return(RedirectToAction(nameof(Index))); } return(View(studentModel)); }
public async Task <IActionResult> Put(MarksModel marksModel) //edit { if (string.IsNullOrEmpty(marksModel.ID)) { return(BadRequest()); } if (ModelState.IsValid) { await _context.Update(marksModel); return(Ok(marksModel)); } return(BadRequest()); }
private void simpleButtonSave_Click(object sender, EventArgs e) { ProcessTabKey(true); if (Validation() == false) { return; } if (_item.Id == 0) { _item = _repo.Add(_item); } else { _repo.Update(_item); } DialogResult = DialogResult.OK; }
public virtual MessageObject <T> Update(T entity) { MessageObject <T> validationResult = ValidateUpdate(entity); try { BasePreProcessing(ref entity, OperationType.Update); if (validationResult.ProcessingStatus) { repo.Update(entity); //validationResult.Data = repo.GetById(entity.Id); //refresh repo.Commit(); BasePostProcessing(ref entity, OperationType.Add); } } catch (Exception ex) { Utils.Logger.Log(ex, logSource); validationResult.AddException(ex); } return(validationResult); }
public int Update(OrganizationInfo entity) { return(_organizationInfoRepo.Update(entity)); }
public int Update(Designation entity) { return(_designationRepo.Update(entity)); }
public int Update(Product entity) { entity.UpdatedBy = Convert.ToInt32(HttpContext.Current.Session["UserId"]); entity.UpdatedDate = DateTime.Now; return(_productRepo.Update(entity)); }
public int UpdateProductImage(ProductImage entity, IDbTransaction transaction, SqlConnection con) { return(_productImageRepo.Update(entity, transaction, con)); }
public int UpdatePrice(ProductPrice entity) { return(_productPriceRepo.Update(entity)); }
public int Update(FiscalYear entity, IDbTransaction transaction, SqlConnection con) { entity.UpdatedBy = Convert.ToInt32(HttpContext.Current.Session["UserId"]); entity.UpdatedDate = DateTime.Now; return(_fiscalYearRepo.Update(entity, transaction, con)); }
public int Update(Role entity) { return(_roleRepo.Update(entity)); }
public int Update(AccountHead entity) { return(_accountHeadRepo.Update(entity)); }
/// <summary> /// 更新实体数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public async Task <bool> Update(T entity) { return(await BaseDal.Update(entity)); }
public int Update(Department entity) { return(_departmentRepo.Update(entity)); }