コード例 #1
0
    public bool SaveData(object obj, string prameter)
    {
        try
        {
            string errMsg = "";
            int    result;

            result = pDataIO.CopyFlowCtrl(Convert.ToInt32(SourceFlowControlID), testFlowControlSelfInfor.TBItemNameText.Trim(), Convert.ToInt32(moduleTypeID), logTracingString, out errMsg);

            if (result > 0)
            {
                Response.Redirect("~/WebFiles/Production_ATS/TestPlan/FlowControlList.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);
                testFlowControlSelfInfor.TBItemNameText = "";
            }

            return(true);
        }
        catch (System.Exception ex)
        {
            pDataIO.WriteErrorLogs(ex.ToString());
            throw ex;
        }
    }