本文整理汇总了C#中acUI.acUI.SetCloudProviders方法的典型用法代码示例。如果您正苦于以下问题:C# acUI.acUI.SetCloudProviders方法的具体用法?C# acUI.acUI.SetCloudProviders怎么用?C# acUI.acUI.SetCloudProviders使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acUI.acUI
的用法示例。
在下文中一共展示了acUI.acUI.SetCloudProviders方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteClouds
public static string DeleteClouds(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 cloud_id, cloud_name, provider from clouds where cloud_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 clouds where cloud_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);
}
//reget the cloud providers class in the session
ui.SetCloudProviders(ref sErr);
if (!string.IsNullOrEmpty(sErr))
throw new Exception("Error: Unable to load Cloud Providers XML." + sErr);
// if we made it here, so save the logs
foreach (DataRow dr in dt.Rows)
{
ui.WriteObjectDeleteLog(Globals.acObjectTypes.Cloud, dr["cloud_id"].ToString(), dr["cloud_name"].ToString(), dr["provider"].ToString() + " Cloud Deleted.");
}
return sErr;
}