本文整理汇总了C#中BusinessObjects.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# BusinessObjects.ToString方法的具体用法?C# BusinessObjects.ToString怎么用?C# BusinessObjects.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusinessObjects
的用法示例。
在下文中一共展示了BusinessObjects.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUIControlResources
//Methods
public static UIControlResourceHolder GetUIControlResources(BusinessObjects.UIControlTypes controltype)
{
//Variables
string resourcePath = "BLL.UIControls." + controltype.ToString() + "." + controltype.ToString();
string controlTagElem = "", script = "", innerHtml = "", css = "";
string controlTagPath = "BLL.UIControls.ControlTag.htm";
//Get the innerHtml content and script
innerHtml = GetEmbeddedUIControlResource(resourcePath + ".htm");
css = GetEmbeddedUIControlResource(resourcePath + ".css");
script = GetEmbeddedUIControlResource(resourcePath + ".js");
//
UIControlResourceHolder holder = new UIControlResourceHolder(controltype, innerHtml, css, script);
return holder;
}
示例2: ExecuteFeed
public override System.Net.WebResponse ExecuteFeed(string feedURL, IProvider provider, BusinessObjects.Token connectionToken, BusinessObjects.TRANSPORT_METHOD transportMethod, byte[] content = null, Dictionary<string, string> headers = null)
{
string signature = "";
OAuthHelper oauthHelper = new OAuthHelper();
string timestamp = oauthHelper.GenerateTimeStamp();
QueryParameters oauthParams = new QueryParameters();
oauthParams.Add("oauth_consumer_key", provider.Consumerkey);
oauthParams.Add("oauth_nonce", oauthHelper.GenerateNonce());
oauthParams.Add("oauth_signature_method", provider.SignatureMethod.ToString());
oauthParams.Add("oauth_timestamp", timestamp);
oauthParams.Add("oauth_token", connectionToken.AccessToken);
oauthParams.Add("oauth_version", "1.0");
signature = oauthHelper.GenerateSignature(new Uri(feedURL), oauthParams, provider.Consumerkey, provider.Consumersecret, provider.SignatureMethod, TRANSPORT_METHOD.POST, connectionToken.TokenSecret);
oauthParams.Add("oauth_signature", signature);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(feedURL);
request.Method = transportMethod.ToString();
if (headers != null)
{
foreach (var header in headers)
{
switch (header.Key)
{
case "ContentLength":
{
request.ContentLength = long.Parse(header.Value);
break;
}
case "ContentType":
{
request.ContentType = header.Value;
break;
}
default:
{
request.Headers[header.Key] = header.Value;
break;
}
}
}
}
request.ContentLength = (content == null) ? 0 : content.Length;
request.Headers.Add("Authorization", oauthHelper.GetAuthorizationHeader(oauthParams));
request.GetRequestStream().Write(content, 0, content.Length);
WebResponse wr = null;
try
{
logger.Debug("Executing " + feedURL + " using " + transportMethod.ToString() + Environment.NewLine + "Request Parameters: " + oauthParams.ToString());
wr = (WebResponse)request.GetResponse();
logger.Info("Successfully executed " + feedURL + " using " + transportMethod.ToString());
}
catch (Exception ex)
{
logger.Error(ErrorMessages.CustomFeedExecutionError(feedURL, oauthParams), ex);
throw new OAuthException(ErrorMessages.CustomFeedExecutionError(feedURL, oauthParams), ex);
}
return wr;
}
示例3: RemoveAppointment
public static bool RemoveAppointment(int jobID, int jobInstanceNumber, string changeUser, bool informEngineer,
BusinessObjects.WorkManagement.eSchedulerAppointmentMissedReason missedReason )
{
DataAccess objADO = new DataAccess();
ArrayList colParameters = new ArrayList();
string strStoredProcedure = "updJobAppointment";
colParameters.Add(new SqlParameter("@WMSourceID", jobID));
colParameters.Add(new SqlParameter("@JobInstanceNumber", jobInstanceNumber));
colParameters.Add(new SqlParameter("@ChangeUser", changeUser));
if (informEngineer)
{
colParameters.Add(new SqlParameter("@DateChangeDetected", DateTime.Now));
}
colParameters.Add(new SqlParameter("@IsActive", false));
colParameters.Add(new SqlParameter("@MissedReason", missedReason.ToString()));
int intReturn = objADO.ExecuteSQL(strStoredProcedure, (SqlParameter[])colParameters.ToArray(typeof(SqlParameter)));
objADO = null;
return (intReturn > 0);
}