public ActionResult Edit(CredentialItem model) { // int Empid = Convert.ToInt32(Url.RequestContext.RouteData.Values["id"].ToString()); //model.EmpID = Empid; CredentialService objAppoint = new CredentialService(); objAppoint.Update(model); return(RedirectToAction("Create", new { @menuId = model.Viewbagidformenu })); }
private void dgvShed_CellEndEdit(object sender, DataGridViewCellEventArgs e) { if (dgvShed.CurrentCell.Value != null) { CredentialService.Update((int)dgvShed.CurrentCell.Tag, dgvShed.CurrentCell.Value.ToString()); } else { CredentialService.Update((int)dgvShed.CurrentCell.Tag, ""); } }