예제 #1
0
    public static string SaveRQMTDescription(int RQMTSet_RQMTSystemID, int RQMTSystemRQMTDescriptionID, string RQMTDescription, int RQMTDescriptionTypeID, bool editMode)
    {
        var result = WTSPage.CreateDefaultResult();

        try
        {
            int RQMTDescriptionID = RQMT.RQMTSystem_SaveDescription(0, RQMTSet_RQMTSystemID, RQMTSystemRQMTDescriptionID, RQMTDescription, RQMTDescriptionTypeID, editMode, "all");

            result["success"]           = "true";
            result["rqmtdescriptionid"] = RQMTDescriptionID.ToString();
        }
        catch (Exception e)
        {
            if (e.Message.IndexOf("UNIQUE KEY") != -1)
            {
                result["error"] = "This description/type combination already exists in this RQMT.";
            }
            else
            {
                result["error"] = e.Message;
            }
        }

        return(WTSPage.SerializeResult(result));
    }