public bool SaveData(object obj, string prameter) { try { string errMsg = ""; int result; result = pDataIO.CopyMCoef(Convert.ToInt32(SourceMCoefID), testMCoefSelfInfor.TBItemNameText.Trim(), testMCoefSelfInfor.TxtItemDescription.Trim(), Convert.ToInt32(moduleTypeID), logTracingString, out errMsg); if (result > 0) { Response.Redirect("~/WebFiles/MaintainInfo/MCoefGroup/GlobalMCoefList.aspx?uId=" + moduleTypeID.Trim()); } else { errMsg = errMsg.Replace("'", @"""").Replace("\r", "").Replace("\n", "\\n").Replace("\t", "\\t"); ScriptManager.RegisterStartupScript((System.Web.UI.Page)HttpContext.Current.CurrentHandler, typeof(System.Web.UI.Page), "aaa", "<script>alert('" + errMsg + "');</script>", false); testMCoefSelfInfor.TBItemNameText = ""; testMCoefSelfInfor.TxtItemDescription = ""; } return(true); } catch (System.Exception ex) { pDataIO.WriteErrorLogs(ex.ToString()); throw ex; } }