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


C# BusinessObjects.ToString方法代码示例

本文整理汇总了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;
        }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:17,代码来源:UIControlsService.cs

示例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;
        }
开发者ID:tamilstreetboy,项目名称:socialauth-net,代码行数:64,代码来源:OAuth1_0Hybrid.cs

示例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);
        }
开发者ID:bedford603067,项目名称:Augment,代码行数:22,代码来源:DataAccessCallStatics.cs


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