//_________________________________________________________________________________________________________ //_________________________________________________________________________________________________________ public static ResultProfile RunProfile(string sAlias, string sProfile) { ResultProfile r = new ResultProfile(); r.r = "Servers not available or " + sAlias + " not found"; if (!FIMServers.Loaded || !Config.dProfiles.ContainsKey(sAlias)) { return(r); } foreach (string s in FIMServers.Keys) { if (FIMServers.Item(s).label == Config.dProfiles[sAlias]["AliasSrv"].ToString()) { for (int i = 0; i < FIMServers.Item(s).MAs.Count; i++) { if (FIMServers.Item(s).MAs[i].profileKey == sAlias && Config.dProfiles[sAlias].Table.Columns.Contains(sProfile)) { ConnectServer(FIMServers.Item(s)); return(RunProfile(FIMServers.Item(s), i, Config.dProfiles[sAlias][sProfile].ToString())); } } } } r.r = "Profile " + sProfile + " not found"; return(r); }
//_________________________________________________________________________________________________________ public List <string> RunMAProfile(string sAlias, string sProfile) { if (MacroHelper.Running || !f.mRunMAProfiles.Enabled) { LogError(string.Format("RunMAProfile({0},{1})", sAlias, sProfile)); return(null); } ResultProfile r = WmiHelper.RunProfile(sAlias, sProfile); List <string> result = new List <string>(); result.Add(r.r); result.Add("changes: " + r.changes); result.Add(r.file); result.Add(r.desc); return(result); }
//_________________________________________________________________________________________________________ //_________________________________________________________________________________________________________ public static ResultProfile RunProfile(FIMServer oSrv, int iMA, string sProfile) { ResultProfile r = new ResultProfile(); if (oSrv.resultConn != "OK") { r.r = "No Connected"; return(r); } oSrv.MAs[iMA].mbo["RunProfileName"] = sProfile; oSrv.MAs[iMA].mbor = oSrv.MAs[iMA].mo.InvokeMethod("Execute", oSrv.MAs[iMA].mbo, null); oSrv.lastRun = oSrv.MAs[iMA].label + " - " + sProfile; r.r = oSrv.MAs[iMA].mbor.GetPropertyValue("returnValue").ToString(); r.file = oSrv.label + "_" + oSrv.MAs[iMA].name + "_" + sProfile + ".xml"; oSrv.MAs[iMA].mbor = oSrv.MAs[iMA].mo.InvokeMethod("RunDetails", oSrv.MAs[iMA].mbo, null); r.Xml = oSrv.MAs[iMA].mbor.GetPropertyValue("returnValue").ToString(); return(r); }
public ResultProfile updateProfile([FromBody] MODEL.ResultProfile req) { ResultProfile result = new ResultProfile(); result.ResultOk = "false"; RestaurantBLL sv = new RestaurantBLL(); try { result = sv.updateProfile(req); } catch (Exception e) { result.ErrorMessage = e.Message; result.ResultOk = "false"; } return(result); }
public static ResultProfile GetSecondProfile() { var source = GetSecond(); var result = new ResultProfile() { Id = source.Id, Name = source.Name, TenantId = source.TenantId, TenantName = source.TenantName, AuthorId = source.AuthorId, AuthorName = source.AuthorName, ProfileThumbUrl = source.ProfileThumbUrl, RegionKey = source.RegionKey, IsActive = source.IsActive, DateCreated = source.DateCreated, DateModified = source.DateModified }; return(result); }