• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Sites类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Sites的典型用法代码示例。如果您正苦于以下问题:C# Sites类的具体用法?C# Sites怎么用?C# Sites使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Sites类属于命名空间,在下文中一共展示了Sites类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LoginSubmit

    public int LoginSubmit(Page page, Sites site, string ID, string Password, string InputCheckCode, Shove.Web.UI.ShoveCheckCode sccCheckCode, ref string ReturnDescription)
    {
        ReturnDescription = "";

        bool Opt_isUseCheckCode = site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);

        ID = ID.Trim();
        Password = Password.Trim();

        if ((ID == "") || (Password == ""))
        {
            ReturnDescription = "用户名和密码都不能为空";

            return -1;
        }

        if ((Opt_isUseCheckCode) && (!sccCheckCode.Valid(InputCheckCode)))
        {
            ReturnDescription = "验证码输入错误";

            return -2;
        }

        System.Threading.Thread.Sleep(500);

        ElectronTicketAgents electronTicketAgents = new ElectronTicketAgents();
        electronTicketAgents.ID = Shove._Convert.StrToInt(ID, 0);
        electronTicketAgents.Password = Password;

        return electronTicketAgents.Login(ref ReturnDescription);
    }
开发者ID:ichari,项目名称:ichari,代码行数:31,代码来源:Login.aspx.cs


示例2: InitializeRedirectUrls

 private void InitializeRedirectUrls()
 {
     XmlSerializer deserializer = new XmlSerializer(typeof(Sites));
     TextReader reader = new StreamReader(@"redirect-URLs.xml");
     this.sites = (Sites)deserializer.Deserialize(reader);
     reader.Close();
 }
开发者ID:kennedykinyanjui,项目名称:Projects,代码行数:7,代码来源:RedirectService.cs


示例3: SendEmail

    public static int SendEmail(Sites Site, string MailTo, string Subject, string Body)
    {
        SendEmailTask sendemailtask = new SendEmailTask(Site, MailTo, Subject, Body);
        sendemailtask.Run();

        return 0;
    }
开发者ID:ichari,项目名称:ichari,代码行数:7,代码来源:PublicFunction.cs


示例4: SendSMS

    public static int SendSMS(Sites Site, long UserID, string Mobile, string Content)  // UserID 付费用户, < 0 则系统付费
    {
        if ((Site == null) || (Site.ID < 0))
        {
            return -1;
        }

        DAL.Tables.T_SMS sms = new DAL.Tables.T_SMS();

        sms.SiteID.Value = Site.ID;
        sms.SMSID.Value = -1;
        sms.From.Value = "";
        sms.To.Value = Mobile;
        sms.Content.Value = Content;
        sms.IsSent.Value = false;

        sms.Insert();

        return 0;

        //SendSMSTask sendsmstask = new SendSMSTask(Site, UserID, Mobile, Content);
        //sendsmstask.Run();

        //return 0;
    }
开发者ID:ichari,项目名称:ichari,代码行数:25,代码来源:PublicFunction.cs


示例5: GetFilterUrl

        /// <summary>
        /// Gets an Url for the MediaPortal IPTV filter with user settings of the site applied.
        /// </summary>
        /// <param name="siteUtil">The <see cref="Sites.SiteUtilBase"/> instance with url settings.</param>
        /// <param name="url">A string containing the base64 encoded binary serialized data of a supported <see cref="SimpleUrl"/> inheriting class.</param>
        /// <returns></returns>
        public static String GetFilterUrl(Sites.SiteUtilBase siteUtil, String url)
        {
            int index = url.IndexOf(SimpleUrl.ParameterSeparator);
            SimpleUrl simpleUrl = null;
            
            if (index != -1)
            {
                String encodedContent = url.Substring(index + SimpleUrl.ParameterSeparator.Length);
                simpleUrl = SimpleUrl.FromString(encodedContent);
                if (simpleUrl == null)
                    throw new OnlineVideosException(Translation.Instance.UnableToPlayVideo);
            }
            else
            {
                simpleUrl = UrlFactory.CreateUrl(url);
                if (simpleUrl == null)
                    return url;
            }

            //simpleUrl.CacheFolder =; simpleUrl.MaximumLogSize =; simpleUrl.MaximumPlugins =; simpleUrl.Verbosity =;

            if (siteUtil != null)
                simpleUrl.ApplySettings(siteUtil);

            return simpleUrl.ToFilterString();
        }
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:32,代码来源:UrlBuilder.cs


示例6: SendEmailTask

 public SendEmailTask(Sites site, string mailto, string subject, string body)
 {
     this.Site = site;
     this.MailTo = mailto;
     this.Subject = subject;
     this.Body = body;
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:SendEmailTask.cs


示例7: SetCheckCode

    public void SetCheckCode(Sites site, Shove.Web.UI.ShoveCheckCode sccCheckCode)
    {
        switch (site.SiteOptions["Opt_CheckCodeCharset"].ToShort(0))
        {
            case 0:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.All;
                break;

            case 1:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetter;
                break;

            case 2:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetterLower;
                break;

            case 3:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetterUpper;
                break;

            case 4:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyNumeric;
                break;

            default:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.All;
                break;
        }
    }
开发者ID:ichari,项目名称:ichari,代码行数:29,代码来源:Login.cs


示例8: OnLoad

    protected override void OnLoad(EventArgs e)
    {
        #region 获取站点

        //_Site = new Sites()[Shove._Web.Utility.GetUrlWithoutHttp()];
        _Site = new Sites()[1];

        if (_Site == null)
        {
            PF.GoError(ErrorNumber.Unknow, "域名无效,限制访问", this.GetType().FullName);

            return;
        }

        #endregion

        #region 获取用户

        _ElectronTicketAgents = ElectronTicketAgents.GetCurrentUser();

        if (isRequestLogin && (_ElectronTicketAgents == null))
        {
            Response.Redirect("Login.aspx");

            return;
        }

        #endregion

        HtmlMeta hm = new HtmlMeta();
        hm.HttpEquiv = "X-UA-Compatible";
        hm.Content = "IE=EmulateIE7";

        base.OnLoad(e);
    }
开发者ID:ichari,项目名称:ichari,代码行数:35,代码来源:ElectronTicketAgentsPageBase.cs


示例9: LoginSubmit

 public int LoginSubmit(Page page, Sites site, string Name, string Password, string InputCheckCode, ShoveCheckCode sccCheckCode, ref string ReturnDescription)
 {
     ReturnDescription = "";
     bool flag = site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);
     Name = Name.Trim();
     Password = Password.Trim();
     if ((Name == "") || (Password == ""))
     {
         ReturnDescription = "用户名和密码都不能为空";
         return -1;
     }
     if (flag)
     {
         if (sccCheckCode == null)
         {
             ReturnDescription = "验证码内部错误";
             return -2;
         }
         if (!sccCheckCode.Valid(InputCheckCode))
         {
             ReturnDescription = "验证码输入错误";
             return -3;
         }
     }
     Thread.Sleep(500);
     return new Users(site.ID) { Name = Name, Password = Password }.Login(ref ReturnDescription);
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:27,代码来源:Login.cs


示例10: Submit

        public System.Web.Mvc.ActionResult Submit(Sites.Models.Site site, System.Web.Mvc.ControllerContext controllerContext, Sites.Models.SubmissionSetting submissionSetting)
        {
            var request = controllerContext.HttpContext.Request;
            var action = request["action"];

            var jsonResultData = new JsonResultData();
            object result = null;

            try
            {
                if (action == "get-addresses")
                {
                    result = GetAddresses(site, controllerContext);
                }

                jsonResultData.Success = true;
                jsonResultData.Model = result;
            }
            catch (Exception ex)
            {
                jsonResultData.Success = false;
                jsonResultData.AddException(ex);
            }

            return new JsonResult { Data = jsonResultData, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
        }
开发者ID:Wipcore,项目名称:Ecommerce,代码行数:26,代码来源:ShippingPlugin.cs


示例11: OnLoad

    protected override void OnLoad(EventArgs e)
    {
        #region 获取站点

        _Site = new Sites()[1];

        if (_Site == null)
        {
            PF.GoError(ErrorNumber.Unknow, "域名无效,限制访问", this.GetType().FullName);

            return;
        }

        #endregion

        #region 获取用户

        Users users = Users.GetCurrentUser(1);

        if (users == null)
        {
            PF.GoLogin(RequestLoginPage, false);

            return;
        }

        if (_User == null)
        {
            _User = Session["CpsAdminPageBase_Users"] as Users;
        }

        if (_User == null)
        {
            PF.GoLogin(RequestLoginPage, false);

            return;
        }

        #endregion

        #region 判断权限

        if (!users.Competences.IsOwnedCompetences(RequestCompetences))
        {
            PF.GoError(ErrorNumber.NotEnoughCompetence, "对不起,您没有足够的权限访问此页面", this.GetType().FullName);

            return;
        }

        #endregion

        HtmlMeta hm = new HtmlMeta();
        hm.HttpEquiv = "X-UA-Compatible";
        hm.Content = "IE=EmulateIE7";

        PageUrl = this.Request.Url.AbsoluteUri;

        base.OnLoad(e);
    }
开发者ID:ichari,项目名称:ichari,代码行数:59,代码来源:CpsAdminPageBase.cs


示例12: SendEmailTask

    public SendEmailTask(Sites site, string mailto, string subject, string body)
    {
        Site = site;

        MailTo = mailto;
        Subject = subject;
        Body = body;
    }
开发者ID:ichari,项目名称:ichari,代码行数:8,代码来源:SendEmailTask.cs


示例13: Create

 public static DownloadInfo Create(VideoInfo video, Category category, Sites.SiteUtilBase site)
 {
     DownloadInfo di = (DownloadInfo)CrossDomain.OnlineVideosAppDomain.Domain.CreateInstanceAndUnwrap(typeof(DownloadInfo).Assembly.FullName, typeof(DownloadInfo).FullName, false, System.Reflection.BindingFlags.CreateInstance | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic, null, null, null, null);
     di.VideoInfo = video;
     di.Category = category;
     di.Util = site;
     return di;
 }
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:8,代码来源:DownloadInfo.cs


示例14: GetSites

 protected override Sites GetSites()
 {
     List<Site> sites = SiteConfiguration.GetSites();
     Sites clonedSites = new Sites();
     foreach (Site site in sites)
         clonedSites.Add(new Site() { ID = site.ID, Name = site.Name, Url = site.Url, 
             ProductVersion = site.ProductVersion });
     return clonedSites;
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:9,代码来源:GetSitesHandler.cs


示例15: OnLoad

    protected override void OnLoad(EventArgs e)
    {
        string ReturnDescription = "";

        #region 获取站点

        _Site = new Sites()[1];

        if (_Site == null)
        {
            PF.GoError(ErrorNumber.Unknow, "域名无效,限制访问", this.GetType().BaseType.FullName);

            return;
        }

        #endregion

        #region 获取用户

        _User = Users.GetCurrentUser(_Site.ID);

        if (isRequestLogin && (_User == null))
        {
            GoLogin(RequestLoginPage);

            return;
        }

        if (isCpsRequestLogin && (_User.cps.ID < 0))
        {
            _User.Logout(ref ReturnDescription);

            PF.GoError(ErrorNumber.Unknow, "您不是 CPS 用户", this.GetType().BaseType.FullName);

            return;
        }

        if (isCpsRequestLogin && !_User.cps.ON)
        {
            _User.Logout(ref ReturnDescription);

            PF.GoError(ErrorNumber.Unknow, "用户被冻结", this.GetType().BaseType.FullName);

            return;
        }

        #endregion

        HtmlMeta hm = new HtmlMeta();
        hm.HttpEquiv = "X-UA-Compatible";
        hm.Content = "IE=EmulateIE7";

        PageUrl = this.Request.Url.AbsoluteUri;

        base.OnLoad(e);
    }
开发者ID:ichari,项目名称:ichari,代码行数:56,代码来源:CpsPageBase.cs


示例16: SiteViewModel

        public SiteViewModel(Sites.SiteUtilBase site)
            : base(Consts.KEY_NAME, site.Settings.Name)
        {
            _site = site;

            _nameProperty = new WProperty(typeof(string), site.Settings.Name);
            _languageProperty = new WProperty(typeof(string), site.Settings.Language);
            _descriptionProperty = new WProperty(typeof(string), site.Settings.Description);
            _contextMenuEntriesProperty = new WProperty(typeof(ItemsList), null);
            _settingsListProperty = new WProperty(typeof(ItemsList), null);
        }
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:11,代码来源:SiteViewModel.cs


示例17: AddSite

        public static void AddSite(string subscriptionId, Site site)
        {
            Sites sites = GetSites(subscriptionId);
            if (sites == null)
            {
                sites = new Sites();
            }

            sites.Add(site);
            SaveSites(subscriptionId, sites);
        }
开发者ID:takekazuomi,项目名称:azure-sdk-tools,代码行数:11,代码来源:Cache.cs


示例18: GetSetSitesTest

        public void GetSetSitesTest()
        {
            Assert.IsNull(Cache.GetSites(SubscriptionName));

            Sites sites = new Sites(new List<Site> { new Site { Name = "site1" }, new Site { Name = "site2" }});
            Cache.SaveSites(SubscriptionName, sites);

            Sites getSites = Cache.GetSites(SubscriptionName);
            Assert.IsNotNull(getSites.Find(s => s.Name.Equals("site1")));
            Assert.IsNotNull(getSites.Find(s => s.Name.Equals("site2")));
        }
开发者ID:nicopeelen,项目名称:azure-sdk-tools,代码行数:11,代码来源:CacheTests.cs


示例19: SendStationSMS

    public static int SendStationSMS(Sites Site, long SourceUserID, long AimUserID, short StationSMSType, string Content)  // UserID 付费用户, < 0 则系统付费
    {
        DAL.Tables.T_StationSMS T_StationSMS = new DAL.Tables.T_StationSMS(); 
        T_StationSMS.SiteID.Value = Site.ID;
        T_StationSMS.SourceID.Value = SourceUserID;
        T_StationSMS.AimID.Value = AimUserID;
        T_StationSMS.Type.Value = StationSMSType;
        T_StationSMS.Content.Value = Content;
        T_StationSMS.isRead.Value = false;
        T_StationSMS.Insert();

        return 0;
    }
开发者ID:ichari,项目名称:ichari,代码行数:13,代码来源:PublicFunction.cs


示例20: OnLoad

 protected override void OnLoad(EventArgs e)
 {
     this.AlipayLoginSrcUrl = base.ResolveUrl("~/Home/Room/images/zfb_button2.jpg");
     this.LoginTopSrcUrl = base.ResolveUrl("~/Home/Room/images/login_top.jpg");
     this.LoginBackSrcUrl = base.ResolveUrl("~/Home/Room/images/login_back.jpg");
     this.RegisterUrl = base.ResolveUrl("~/UserReg.aspx");
     this.ForgetPwdUrl = base.ResolveUrl("~/Home/Room/ForgetPassword.aspx");
     this.AlipayLoginUrl = base.ResolveUrl("~/Home/Room/Login.aspx");
     this.LoginIframeUrl = base.ResolveUrl("~/Home/Room/UserLoginDialog.aspx");
     this._Site = new Sites()[1L];
     this._User = Users.GetCurrentUser(this._Site.ID);
     base.OnLoad(e);
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:13,代码来源:UserControlBase.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Situation类代码示例发布时间:2022-05-24
下一篇:
C# SitecoreService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap