//end protected void imgBtnAdd_Click(object sender, EventArgs e) { try { //Assigning values to properties objActionMaster.ActionSNo = 0; objActionMaster.ActionCode = txtActionCode.Text.Trim(); objActionMaster.ActionDesc = txtActionDesc.Text.Trim(); objActionMaster.EmpCode = Membership.GetUser().UserName.ToString(); objActionMaster.ActiveFlag = rdoStatus.SelectedValue.ToString(); //Calling SaveData to save Action details and pass type "INSERT_Action" it return "" if record //is not already exist otherwise exists string strMsg = objActionMaster.SaveData("INSERT_Action"); if (strMsg == "Exists") { lblMessage.Text = CommonClass.getErrorWarrning(enuErrorWarrning.DulplicateRecord, enuMessageType.UserMessage, false, ""); } else { lblMessage.Text = CommonClass.getErrorWarrning(enuErrorWarrning.AddRecord, enuMessageType.UserMessage, false, ""); } } catch (Exception ex) { //Writing Error message to File using CommonClass WriteErrorErrFile method taking arguments as URL of page // trace, error message CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } objCommonClass.BindDataGrid(gvComm, "uspActionMaster", true, sqlParamSrh); ClearControls(); }