protected void BtnEdit_Click(object sender, EventArgs e) { int lintCnt = 0; try { EntityOccupation entOccupation = new EntityOccupation(); int OccupationCode = Convert.ToInt32(Session["PKId"].ToString()); entOccupation.PKId = OccupationCode; entOccupation.OccupationDesc = txtEditOccupationDesc.Text; entOccupation.ChangeBy = SessionWrapper.UserName; lintCnt = mobjOccupationBLL.UpdateOccupation(entOccupation); if (lintCnt > 0) { GetOccupation(); Commons.ShowMessage("Record Updated Successfully", this.Page); //this.programmaticModalPopup.Hide(); } else { Commons.ShowMessage("Record Not Updated", this.Page); } } catch (Exception ex) { Commons.FileLog("frmOccupationMaster - BtnEdit_Click(object sender, EventArgs e)", ex); } }