当前位置: 首页>>代码示例>>C#>>正文


C# acUI.acUI.WriteObjectDeleteLog方法代码示例

本文整理汇总了C#中acUI.acUI.WriteObjectDeleteLog方法的典型用法代码示例。如果您正苦于以下问题:C# acUI.acUI.WriteObjectDeleteLog方法的具体用法?C# acUI.acUI.WriteObjectDeleteLog怎么用?C# acUI.acUI.WriteObjectDeleteLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在acUI.acUI的用法示例。


在下文中一共展示了acUI.acUI.WriteObjectDeleteLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeleteDomains

        public static string DeleteDomains(string sDeleteArray)
        {
            acUI.acUI ui = new acUI.acUI();
            string sSql = null;
            string sErr = "";

            if (sDeleteArray.Length < 36)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            try
            {

                dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                //delete domains
                sSql = "delete from ldap_domain where ldap_domain in (" + sDeleteArray.ToString() + ")";
                oTrans.Command.CommandText = sSql;
                if (!oTrans.ExecUpdate(ref sErr))
                {
                    throw new Exception(sErr);
                }

                oTrans.Commit();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(Globals.acObjectTypes.Domain, sDeleteArray.ToString(), sDeleteArray.ToString(), "Domain(s) Deleted");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:36,代码来源:ldapEdit.aspx.cs

示例2: DeleteAccounts

        public static string DeleteAccounts(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSql = null;
            string sErr = "";

            if (sDeleteArray.Length < 36)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            DataTable dt = new DataTable();
            // get a list of ids that will be deleted for the log
            sSql = "select account_id, account_name, provider, login_id from cloud_account where account_id in (" + sDeleteArray + ")";
            if (!dc.sqlGetDataTable(ref dt, sSql, ref sErr))
                throw new Exception(sErr);

            try
            {

                dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                sSql = "delete from cloud_account where account_id in (" + sDeleteArray + ")";
                oTrans.Command.CommandText = sSql;
                if (!oTrans.ExecUpdate(ref sErr))
                    throw new Exception(sErr);

                //refresh the cloud account list in the session
                if (!ui.PutCloudAccountsInSession(ref sErr))
                    throw new Exception(sErr);

                oTrans.Commit();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            foreach (DataRow dr in dt.Rows)
            {
                ui.WriteObjectDeleteLog(Globals.acObjectTypes.CloudAccount, dr["account_id"].ToString(), dr["account_name"].ToString(), dr["provider"].ToString() + " Account for LoginID [" + dr["login_id"].ToString() + "] Deleted");
            }

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:47,代码来源:cloudAccountEdit.aspx.cs

示例3: wmDeleteTasks

        public string wmDeleteTasks(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();

            string sSql = null;
            string sErr = "";
            string sTaskNames = "";

            if (sDeleteArray.Length < 36)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            //NOTE: right now this plows ALL versions.  There is an enhancement to possibly 'retire' a task, or
            //only delete certain versions.

            try
            {

                // what about the instance tables?????
                // bugzilla 1290 Tasks that have history (task_instance table) can not be deleted
                // exclude them from the list and return a message noting the task(s) that could not be deleted

                // first we need a list of tasks that will not be deleted
                sSql = "select task_name from task t " +
                        "where t.original_task_id in (" + sDeleteArray.ToString() + ") " +
                        "and t.task_id in (select ti.task_id from tv_task_instance ti where ti.task_id = t.task_id)";

                if (!dc.csvGetList(ref sTaskNames, sSql, ref sErr, true))
                    throw new Exception(sErr);

                // list of tasks that will be deleted
                //we have an array of 'original_task_id'.
                //we need an array or task_id
                //build one.
                sSql = "select t.task_id from task t " +
                    "where t.original_task_id in (" + sDeleteArray.ToString() + ") " +
                    "and t.task_id not in (select ti.task_id from tv_task_instance ti where ti.task_id = t.task_id)";

                string sTaskIDs = "";
                if (!dc.csvGetList(ref sTaskIDs, sSql, ref sErr, true))
                    throw new Exception(sErr);

                // if any tasks can be deleted
                if (sTaskIDs.Length > 1)
                {
                    dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                    //oTrans.Command.CommandText = "delete from task_asset_attribute where task_id in (" + sTaskIDs + ")";
                    //if (!oTrans.ExecUpdate(ref sErr))
                    //    throw new Exception(sErr);

                    oTrans.Command.CommandText = "delete from task_step_user_settings" +
                        " where step_id in" +
                        " (select step_id from task_step where task_id in (" + sTaskIDs + "))";
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    oTrans.Command.CommandText = "delete from task_step where task_id in (" + sTaskIDs + ")";
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    oTrans.Command.CommandText = "delete from task_codeblock where task_id in (" + sTaskIDs + ")";
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    oTrans.Command.CommandText = "delete from task where task_id in (" + sTaskIDs + ")";
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    oTrans.Commit();

                    ui.WriteObjectDeleteLog(Globals.acObjectTypes.Task, "Multiple", "Original Task IDs", sDeleteArray.ToString());

                }

            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if the sTaskNames contains any names, then send back a message that these were not deleted because of history records.
            if (sTaskNames.Length > 0)
            {
                return "Task(s) (" + sTaskNames + ") have history rows and could not be deleted.";
            }
            else
            {
                return sErr;
            }
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:93,代码来源:taskMethods.asmx.cs

示例4: wmDeleteTaskParam

        public string wmDeleteTaskParam(string sType, string sID, string sParamID)
        {
            dataAccess dc = new dataAccess();

            acUI.acUI ui = new acUI.acUI();
            FunctionTemplates.HTMLTemplates ft = new FunctionTemplates.HTMLTemplates();

            string sErr = "";
            string sSQL = "";
            string sTable = "";

            if (sType == "ecosystem")
                sTable = "ecosystem";
            else if (sType == "task")
                sTable = "task";

            if (!string.IsNullOrEmpty(sParamID) && ui.IsGUID(sID))
            {
                // need the name and values for logging
                string sXML = "";

                sSQL = "select parameter_xml" +
                    " from " + sTable +
                    " where " + sType + "_id = '" + sID + "'";

                if (!dc.sqlGetSingleString(ref sXML, sSQL, ref sErr))
                    throw new Exception("Unable to get parameter_xml.  " + sErr);

                if (sXML != "")
                {
                    XDocument xd = XDocument.Parse(sXML);
                    if (xd == null) throw new Exception("XML parameter data is invalid.");

                    XElement xName = xd.XPathSelectElement("//parameter[@id = \"" + sParamID + "\"]/name");
                    string sName = (xName == null ? "" : xName.Value);
                    XElement xValues = xd.XPathSelectElement("//parameter[@id = \"" + sParamID + "\"]/values");
                    string sValues = (xValues == null ? "" : xValues.ToString());

                    // add security log
                    ui.WriteObjectDeleteLog(Globals.acObjectTypes.Parameter, "", sID, "");

                    if (sType == "task") { ui.WriteObjectChangeLog(Globals.acObjectTypes.Task, sID, "Deleted Parameter:[" + sName + "]", sValues); };
                    if (sType == "ecosystem") { ui.WriteObjectChangeLog(Globals.acObjectTypes.Ecosystem, sID, "Deleted Parameter:[" + sName + "]", sValues); };
                }

                //do the whack
                ft.RemoveNodeFromXMLColumn(sTable, "parameter_xml", sType + "_id = '" + sID + "'", "//parameter[@id = \"" + sParamID + "\"]");

                return "";
            }
            else
            {
                throw new Exception("Invalid or missing Task or Parameter ID.");
            }
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:55,代码来源:taskMethods.asmx.cs

示例5: wmDeleteStep

        public void wmDeleteStep(string sStepID)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();

            try
            {
                string sErr = "";
                string sSQL = "";

                dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                //you have to know which one we are removing
                string sDeletedStepOrder = "0";
                string sTaskID = "";
                string sCodeblock = "";
                string sFunction = "";
                string sFunctionXML = "";

                sSQL = "select task_id, codeblock_name, step_order, function_name, function_xml" +
                    " from task_step where step_id = '" + sStepID + "'";

                DataRow dr = null;
                if (!dc.sqlGetDataRow(ref dr, sSQL, ref sErr))
                    throw new Exception("Unable to get details for step." + sErr);

                if (dr != null)
                {
                    sDeletedStepOrder = dr["step_order"].ToString();
                    sTaskID = dr["task_id"].ToString();
                    sCodeblock = dr["codeblock_name"].ToString();
                    sFunction = dr["function_name"].ToString();
                    sFunctionXML = dr["function_xml"].ToString();

                    //for logging, we'll stick the whole command XML into the log
                    //so we have a complete record of the step that was just deleted.
                    ui.WriteObjectDeleteLog(Globals.acObjectTypes.Task, sTaskID, sFunction,
                        "Codeblock:" + sCodeblock +
                        " Step Order:" + sDeletedStepOrder +
                        " Command Type:" + sFunction +
                        " Details:" + sFunctionXML);
                }

                //"embedded" steps have a codeblock name referencing their "parent" step.
                //if we're deleting a parent, whack all the children
                sSQL = "delete from task_step where codeblock_name = '" + sStepID + "'";
                oTrans.Command.CommandText = sSQL;
                if (!oTrans.ExecUpdate(ref sErr))
                    throw new Exception("Unable to delete step." + sErr);

                //step might have user_settings
                sSQL = "delete from task_step_user_settings where step_id = '" + sStepID + "'";
                oTrans.Command.CommandText = sSQL;
                if (!oTrans.ExecUpdate(ref sErr))
                    throw new Exception("Unable to delete step user settings." + sErr);

                //now whack the parent
                sSQL = "delete from task_step where step_id = '" + sStepID + "'";
                oTrans.Command.CommandText = sSQL;
                if (!oTrans.ExecUpdate(ref sErr))
                    throw new Exception("Unable to delete step." + sErr);

                sSQL = "update task_step set step_order = step_order - 1" +
                    " where task_id = '" + sTaskID + "'" +
                    " and codeblock_name = '" + sCodeblock + "'" +
                    " and step_order > " + sDeletedStepOrder;
                oTrans.Command.CommandText = sSQL;
                if (!oTrans.ExecUpdate(ref sErr))
                    throw new Exception("Unable to reorder steps after deletion." + sErr);

                oTrans.Commit();

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:78,代码来源:taskMethods.asmx.cs

示例6: DeleteAssets

        public static string DeleteAssets(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSql = null;
            string sErr = "";

            ArrayList arrList = new ArrayList();
            arrList.AddRange(sDeleteArray.Split(','));

            if (sDeleteArray.Length < 36)
                return "";

            StringBuilder sbAssetIDString = new StringBuilder();
            StringBuilder sbAssetsCantDelete = new StringBuilder();
            foreach (string sAssetID in arrList)
            {
                if (sAssetID.Length == 36)
                {
                    // what about the instance tables?????
                    // bugzilla 1290 Assets that have history (task_instance table) can not be deleted
                    // exclude them from the list and return a message noting the asset(s) that could not be deleted
                    // check if this asset has any history rows.
                    sSql = "select count(*) from tv_task_instance where asset_id = '" + sAssetID + "'";
                    int iHistory = 0;
                    if (!dc.sqlGetSingleInteger(ref iHistory, sSql, ref sErr))
                        throw new Exception(sErr);
                    // if there is no history add this to the delete list,
                    // otherwise add the task id to the non delete list
                    if (iHistory == 0)
                    {
                        sbAssetIDString.Append("'" + sAssetID + "',");
                    }
                    else
                    {
                        sbAssetsCantDelete.Append("'" + sAssetID + "',");
                    };

                }
            }
            // trim the trailing ,
            if (sbAssetsCantDelete.ToString().Length > 2) { sbAssetsCantDelete.Remove(sbAssetsCantDelete.Length - 1, 1); };

            if (sbAssetIDString.ToString().Length > 2)
            {
                // delete from these tables:
                //   asset, asset_credential (if the credential is local).

                // trim the trailing ,
                sbAssetIDString.Remove(sbAssetIDString.Length - 1, 1);
                try
                {
                    dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                    // delete asset_credential
                    sSql = "delete from asset_credential" +
                        " where shared_or_local = 1" +
                        " and credential_id in (select credential_id from asset where asset_id in (" + sbAssetIDString.ToString() + "))";
                    oTrans.Command.CommandText = sSql;
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    // delete asset
                    sSql = "delete from asset where asset_id in (" + sbAssetIDString.ToString() + ")";
                    oTrans.Command.CommandText = sSql;
                    if (!oTrans.ExecUpdate(ref sErr))
                        throw new Exception(sErr);

                    oTrans.Commit();

                    // add security log
                    ui.WriteObjectDeleteLog(Globals.acObjectTypes.Asset, sbAssetIDString.ToString(), "Batch Asset Delete", "Deleted Assets in batch mode");
                }
                catch (Exception ex)
                {
                    throw new Exception(ex.Message);
                }
            };

            // if some did not get deleted return a message.
            if (sbAssetsCantDelete.Length > 2)
            {
                string sTaskNames = "";
                sSql = "select asset_name from asset where asset_id in (" + sbAssetsCantDelete.ToString() + ")";

                if (!dc.csvGetList(ref sTaskNames, sSql, ref sErr, true))
                    throw new Exception(sErr);

                return "Asset deletion completed. Asset(s) (" + sTaskNames + ") could not be deleted because history rows exist.";

            }
            else
            {
                return sErr;
            }
        }
开发者ID:you8,项目名称:cato,代码行数:96,代码来源:assetEdit.aspx.cs

示例7: SaveAsset


//.........这里部分代码省略.........
                else
                {
                    // updated password
                    // bugzilla 1352 priviledged password can be blank, so if it is, set it to null
                    if (sPrivilegedPassword.Length == 0)
                        sPriviledgedPasswordUpdate = ",privileged_password = null";
                    else
                        sPriviledgedPasswordUpdate = ",privileged_password = '" + dc.EnCrypt(sPrivilegedPassword) + "'";
                }

                sSql = "update asset_credential " +
                        "set username = '" + sCredUsername + "'" + sPasswordUpdate + sPriviledgedPasswordUpdate + ",domain = '" + sDomain + "'," +
                        "shared_or_local = '" + sShared + "',shared_cred_desc = '" + sCredentialDescr + "'" +
                        "where credential_id = " + sCredentialID;
                if (!dc.sqlExecuteUpdate(sSql, ref sErr))
                    throw new Exception(sErr);

                // add security log
                ui.WriteObjectChangeLog(Globals.acObjectTypes.Asset, sAssetID, sAssetName.Trim().Replace("'", "''") + "Changed credential", sOriginalUserName, sCredUsername);

            }
            else
            {
                // user selected a shared credential
                // remove the local credential if one exists

                if (sOriginalCredentialID.Length > 0)
                {
                    sSql = "delete from asset_credential where credential_id = '" + sOriginalCredentialID + "' and shared_or_local = '1'";
                    if (!dc.sqlExecuteUpdate(sSql, ref sErr))
                        throw new Exception(sErr);

                    // add security log
                    ui.WriteObjectDeleteLog(Globals.acObjectTypes.Asset, sAssetID, sAssetName.Trim().Replace("'", "''"), "Credential deleted" + sOriginalCredentialID + " " + sOriginalUserName);
                }

                sCredentialID = "'" + sCredentialID + "'";

            }

            // checks that cant be done on the client side
            // is the name unique?
            string sInuse = "";

            if (sMode == "edit")
                sSql = "select asset_id from asset where asset_name = '" + sAssetName.Trim() + "' and asset_id <> '" + sAssetID + "' limit 1";
            else
                sSql = "select asset_id from asset where asset_name = '" + sAssetName.Trim() + "' limit 1";

            if (!dc.sqlGetSingleString(ref sInuse, sSql, ref sErr))
                throw new Exception(sErr);
            else
                if (!string.IsNullOrEmpty(sInuse))
                    return "Asset Name '" + sAssetName + "' already in use, choose another." + sAssetID;

            try
            {
                dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                if (sMode == "edit")
                {
                    sSql = "update asset set asset_name = '" + sAssetName + "'," +
                        " asset_status = '" + sAssetStatus + "'," +
                        " address = '" + sAddress + "'" + "," +
                        " conn_string = '" + sConnString + "'" + "," +
                        " db_name = '" + sDbName + "'," +
开发者ID:you8,项目名称:cato,代码行数:67,代码来源:assetEdit.aspx.cs

示例8: DeleteCredentials

        public static string DeleteCredentials(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSql = null;
            string sErr = "";

            if (sDeleteArray.Length < 36)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            DataTable dt = new DataTable();
            // get a list of credential_ids that will be deleted for the log
            sSql = "select credential_name,credential_id from asset_credential where credential_id in (" + sDeleteArray.ToString() + ") " +
                    "and credential_id not in (select distinct credential_id from asset where credential_id is not null)";
            if (!dc.sqlGetDataTable(ref dt, sSql, ref sErr))
            {
                throw new Exception(sErr);
            }

            try
            {

                dataAccess.acTransaction oTrans = new dataAccess.acTransaction(ref sErr);

                //delete asset_credential
                sSql = "delete from asset_credential where credential_id in (" + sDeleteArray.ToString() + ") " +
                        "and credential_id not in (select distinct credential_id from asset where credential_id is not null)";
                oTrans.Command.CommandText = sSql;
                if (!oTrans.ExecUpdate(ref sErr))
                {
                    throw new Exception(sErr);
                }

                oTrans.Commit();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            foreach (DataRow dr in dt.Rows)
            {
                ui.WriteObjectDeleteLog(Globals.acObjectTypes.Credential, dr["credential_id"].ToString(), dr["credential_name"].ToString(), "Credential Deleted");
            }

            return sErr;
        }
开发者ID:you8,项目名称:cato,代码行数:50,代码来源:sharedCredentialEdit.aspx.cs

示例9: wmDeleteTags

        public string wmDeleteTags(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (sDeleteArray.Length == 0)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            try
            {
                sSQL = "delete from object_tags where tag_name in (" + sDeleteArray.ToString() + ")";

                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);

                sSQL = "delete from lu_tags where tag_name in (" + sDeleteArray.ToString() + ")";

                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.None, sDeleteArray.ToString(), sDeleteArray.ToString(), "Tag(s) Deleted");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:34,代码来源:uiMethods.asmx.cs

示例10: wmDeleteSchedule

        public string wmDeleteSchedule(string sScheduleID)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (string.IsNullOrEmpty(sScheduleID))
                throw new Exception("Missing Schedule ID.");

            try
            {
                sSQL = "delete from action_plan where schedule_id = '" + sScheduleID + "'";
                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);

                sSQL = "delete from action_schedule where schedule_id = '" + sScheduleID + "'";
                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.EcoTemplate, "", "", "Schedule [" + sScheduleID + "] deleted.");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:30,代码来源:uiMethods.asmx.cs

示例11: wmDeleteEcotemplates

        public string wmDeleteEcotemplates(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (sDeleteArray.Length == 0)
                return "";

            try
            {
                sDeleteArray = ui.QuoteUp(sDeleteArray);

                //can't delete templates that have references...
                int iResults = 0;
                sSQL = "select count(*) from ecosystem where ecotemplate_id in (" + sDeleteArray.ToString() + ")";
                if (!dc.sqlGetSingleInteger(ref iResults, sSQL, ref sErr))
                    throw new Exception(sErr);

                if (iResults == 0)
                {
                    sSQL = "delete from ecotemplate_action where ecotemplate_id in (" + sDeleteArray.ToString() + ")";
                    if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                        throw new Exception(sErr);

                    sSQL = "delete from ecotemplate where ecotemplate_id in (" + sDeleteArray.ToString() + ")";
                    if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                        throw new Exception(sErr);

                    // if we made it here, so save the logs
                    ui.WriteObjectDeleteLog(acObjectTypes.EcoTemplate, "", "", "Eco Templates(s) Deleted [" + sDeleteArray.ToString() + "]");
                }
                else
                    sErr = "Unable to delete Ecosystem Template - " + iResults.ToString() + " Ecosystems reference it.";
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:43,代码来源:uiMethods.asmx.cs

示例12: wmDeleteEcotemplateAction

        public string wmDeleteEcotemplateAction(string sActionID)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (sActionID.Length == 0)
                return "";

            try
            {
                sSQL = "delete from ecotemplate_action" +
                    " where action_id ='" + sActionID + "'";

                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.EcoTemplate, "", "", "Action [" + sActionID + "] removed from EcoTemplate.");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:28,代码来源:uiMethods.asmx.cs

示例13: wmDeleteEcosystems

        public string wmDeleteEcosystems(string sDeleteArray)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (sDeleteArray.Length == 0)
                return "";

            sDeleteArray = ui.QuoteUp(sDeleteArray);

            try
            {
                sSQL = "delete from ecosystem_object where ecosystem_id in (" + sDeleteArray.ToString() + ")";
                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);

                sSQL = "delete from ecosystem where ecosystem_id in (" + sDeleteArray.ToString() + ")";
                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.Ecosystem, "", "", "Ecosystems(s) Deleted [" + sDeleteArray.ToString() + "]");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:32,代码来源:uiMethods.asmx.cs

示例14: wmDeleteEcosystemObject

        public string wmDeleteEcosystemObject(string sEcosystemID, string sObjectType, string sObjectID)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (sObjectID.Length == 0)
                return "";

            try
            {
                sSQL = "delete from ecosystem_object" +
                    " where ecosystem_id ='" + sEcosystemID + "'" +
                    " and ecosystem_object_id ='" + sObjectID + "'" +
                    " and ecosystem_object_type ='" + sObjectType + "'";

                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.Ecosystem, "", "", "Object [" + sObjectID + "] removed from Ecosystem [" + sEcosystemID + "]");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:30,代码来源:uiMethods.asmx.cs

示例15: wmDeleteActionPlan

        public string wmDeleteActionPlan(int iPlanID)
        {
            dataAccess dc = new dataAccess();
            acUI.acUI ui = new acUI.acUI();
            string sSQL = null;
            string sErr = "";

            if (iPlanID < 1)
                throw new Exception("Missing Action Plan ID.");

            try
            {
                sSQL = "delete from action_plan where plan_id = " + iPlanID.ToString();

                if (!dc.sqlExecuteUpdate(sSQL, ref sErr))
                    throw new Exception(sErr);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            // if we made it here, so save the logs
            ui.WriteObjectDeleteLog(acObjectTypes.EcoTemplate, "", "", "Action Plan [" + iPlanID.ToString() + "] deleted.");

            return sErr;
        }
开发者ID:remotesyssupport,项目名称:cato,代码行数:27,代码来源:uiMethods.asmx.cs


注:本文中的acUI.acUI.WriteObjectDeleteLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。