protected void btnSave_Click(object sender, EventArgs e) { Issue oIssue = (Issue)Session[Constants.SES_CURRENT_ISSUE]; if (oIssue != null) { if (!string.IsNullOrEmpty(txtNewIssueName.Text)) { oIssue.IssueName = txtNewIssueName.Text.ToUpper(); } else { oIssue.IssueName = txtOldIssueName.Text.ToUpper(); } if (!string.IsNullOrEmpty(txtNewIssueDate.Text)) { oIssue.VersionIssueDate = Util.GetDateTimeByString(txtNewIssueDate.Text); } oIssue.IssueUpdateRemarks = txtRemarks.Text.ToUpper(); string sDtForPolicy = txtNewIssueDate.Text; if (string.IsNullOrEmpty(sDtForPolicy)) { sDtForPolicy = txtOldIssueDate.Text; } SPPolicyDAL oSPPolicyDAL = new SPPolicyDAL(); Result oResult1 = (Result)oSPPolicyDAL.LatestPolicy(oIssue.SPType.SPTypeID, Constants.ACTIVITY_TYPE.ISSUE, Util.GetDateTimeByString(sDtForPolicy)); if (oResult1.Status) { oIssue.VersionSPPolicy = oResult1.Return as SPPolicy; } oIssue.UserDetails = ucUserDet.UserDetail; IssueDAL oIssueDAL = new IssueDAL(); Result oResult = (Result)oIssueDAL.SaveIssueUpdate(oIssue); if (oResult.Status) { TotalClear(); LoadUnapprovedList(); ucMessage.OpenMessage(Constants.MSG_SUCCESS_SAVE, Constants.MSG_TYPE_SUCCESS); } else { ucMessage.OpenMessage(Constants.MSG_ERROR_SAVE, Constants.MSG_TYPE_ERROR); } } else { ucMessage.OpenMessage("Problem in Data. Please check", Constants.MSG_TYPE_ERROR); } }