protected void ButtonEdit_Click(object sender, EventArgs e) { var model = new JobTitle(); TryUpdateModel(model, new FormValueProvider(this.ModelBindingExecutionContext)); if (this.ModelState.IsValid) { this.Edit(model); NotyJobTitle.Update(this); this.ReBindGrid(); } }
protected void BtnDelete_Click(object sender, EventArgs e) { int jobTitleId = int.Parse(this.Request.Form["Deleteid"]); if (this.CheckBoxShowDeleted.Checked) { this.UnDelete(jobTitleId); NotyJobTitle.Update(this); this.ReBindGrid(); } else { this.Delete(jobTitleId); NotyJobTitle.Update(this); this.ReBindGrid(); } }