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

C# BLL.siteconfig类代码示例

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

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



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

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            //读取站点配置信息
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
            Config xmlConfig = new Config(); //读取配置

            v_oid = DTRequest.GetString("v_oid").ToUpper();
            v_pstatus = DTRequest.GetString("v_pstatus");
            v_pstring =DTRequest.GetString("v_pstring");
            v_pmode = DTRequest.GetString("v_pmode");
            v_md5str =DTRequest.GetString("v_md5str");
            v_amount = DTRequest.GetString("v_amount");
            v_moneytype = DTRequest.GetString("v_moneytype");
            remark1 = DTRequest.GetString("remark1");
            remark2 = DTRequest.GetString("remark2");

            // 拼凑加密串
            string signtext = v_oid + v_pstatus + v_amount + v_moneytype + xmlConfig.Key;
            signtext = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(signtext, "md5").ToUpper();
            if (signtext == v_md5str)
            {
                if (v_pstatus.Equals("20"))
                {
                    //成功状态
                    Response.Redirect(new Web.UI.BasePage().linkurl("payment", "?action=succeed&order_no=" + v_oid));
                    return;
                }
            }

            //失败状态
            Response.Redirect(new Web.UI.BasePage().linkurl("payment", "?action=error"));
            return;
        }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:33,代码来源:return_url.aspx.cs


示例2: OutPutHtml

        /// <summary>
        /// 输出最终的html
        /// </summary>
        /// <param name="templateFileName"></param>
        /// <param name="tPath"></param>
        /// <param name="wid"></param>
        public void OutPutHtml(string templateFileName)
        {
            ////注册一个自定义函数
            //this.Document.RegisterGlobalFunction(this.GetNewsUrl);

            //对VT模板里的config变量赋值 
            Model.siteconfig config = new BLL.siteconfig().loadConfig();
            string dd = Utils.ObjectToStr(config.webkeyword);
            this.Document.Variables.SetValue("config", config);

            this.Document.SetValue("ccright", ccRight);
            this.Document.SetValue("thisurl", MyCommFun.getTotalUrl());
            this.Document.SetValue("yuming", MyCommFun.getWebSite());
            string openid = MyCommFun.RequestOpenid();
            this.Document.SetValue("openid", openid);
            this.Document.Variables.SetValue("this", this);
            if (tType == TemplateType.Class)
            { //如果为列表页面
                ArticleClassPage();
            }
            if (tType == TemplateType.News)
            {
                ArticleDetailPage();
            }
            if (tType == TemplateType.Channel)
            {
                ArticleChannelPage();
            }

            //输出最终呈现的数据 
            this.Document.Render(HttpContext.Current.Response.Output);

        }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:39,代码来源:PortalTemplate.cs


示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            //读取站点配置信息
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(DTKeys.FILE_SITE_XML_CONFING);

            string order_type = DTRequest.GetFormString("pay_order_type"); //订单类型
            string order_no = DTRequest.GetFormString("pay_order_no");
            decimal order_amount = DTRequest.GetFormDecimal("pay_order_amount", 0);
            string subject = DTRequest.GetFormString("pay_subject");
            if (order_no == "" || order_amount == 0 )
            {
                Response.Redirect(siteConfig.webpath + "error.aspx?msg=" + Utils.UrlEncode("对不起,您提交的参数有误!"));
                return;
            }
            //检查是否已登录
            Model.users userModel = new Web.UI.BasePage().GetUserInfo();
            if (userModel == null)
            {
                Response.Redirect(new Web.UI.BasePage().linkurl("payment", "login")); //尚未登录
                return;
            }
            if (userModel.amount < order_amount)
            {
                Response.Redirect(new Web.UI.BasePage().linkurl("payment", "recharge")); //账户的余额不足
                return;
            }

            if (order_type.ToLower() == DTEnums.AmountTypeEnum.BuyGoods.ToString().ToLower()) //购买商品
            {
                BLL.orders bll = new BLL.orders();
                Model.orders model = bll.GetModel(order_no);
                if (model == null)
                {
                    Response.Redirect(siteConfig.webpath + "error.aspx?msg=" + Utils.UrlEncode("对不起,商品订单号不存在!"));
                    return;
                }
                //执行扣取账户金额
                int result = new BLL.amount_log().Add(userModel.id, userModel.user_name, DTEnums.AmountTypeEnum.BuyGoods.ToString(), order_no, model.payment_id, -1 * order_amount, subject, 1);
                if (result > 0)
                {
                    //更改订单状态
                    bool result1 = bll.UpdateField(order_no, "payment_status=2,payment_time='" + DateTime.Now + "'");
                    if (!result1)
                    {
                        Response.Redirect(new Web.UI.BasePage().linkurl("payment", "error"));
                        return;
                    }
                    //扣除积分
                    if (model.point < 0)
                    {
                        new BLL.point_log().Add(model.user_id, model.user_name, model.point, "换购扣除积分,订单号:" + model.order_no);
                    }
                    //支付成功
                    Response.Redirect(new Web.UI.BasePage().linkurl("payment1", "succeed", order_type, order_no));
                    return;
                }
            }
            Response.Redirect(siteConfig.webpath + "error.aspx?msg=" + Utils.UrlEncode("对不起,找不到需要支付的订单类型!"));
            return;
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:60,代码来源:index.aspx.cs


示例4: ReUrl_BeginRequest

        /// <summary>
        /// 页面请求事件处理
        /// </summary>
        /// <param name="sender">事件的源</param>
        /// <param name="e">包含事件数据的 EventArgs</param>
        private void ReUrl_BeginRequest(object sender, EventArgs e)
        {
            HttpContext context = ((HttpApplication)sender).Context;
            string requestPath = context.Request.Path; //获得当前页面,包含目录
            string requestPage = requestPath.Substring(requestPath.LastIndexOf("/")); //获得当前页面,不包含目录
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING)); //获得站点配置信息

            bool isRewritePath = IsUrlRewrite(siteConfig.webpath, requestPath); //排除不需要URL重写的目录
            switch (siteConfig.staticstatus)
            {
                case 0:
                    //关闭重写
                    if (isRewritePath && IsAspxFile(requestPath))
                    {
                        context.RewritePath(siteConfig.webpath + DTKeys.DIRECTORY_REWRITE_ASPX + "/" + requestPage);
                    }
                    break;
                case 1:
                    //伪URL重写
                    if (isRewritePath)
                    {
                        RewriteUrl(context, siteConfig.webpath, requestPath, requestPage);
                    }
                    break;
                case 2:
                    //全静态
                    if (requestPath.ToLower().Equals("/index.aspx"))
                    {
                        context.RewritePath(siteConfig.webpath + DTKeys.DIRECTORY_REWRITE_HTML + "/index." + siteConfig.staticextension);
                    }
                    break;
            }
        }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:38,代码来源:HttpModule.cs


示例5: Config

        static Config()
        {
            //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

            //读取XML配置信息
            string fullPath = Utils.GetMapPath("~/xmlconfig/alipay.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode _partner = doc.SelectSingleNode(@"Root/partner");
            XmlNode _key = doc.SelectSingleNode(@"Root/key");
            XmlNode _email = doc.SelectSingleNode(@"Root/email");
            XmlNode _return_url = doc.SelectSingleNode(@"Root/return_url");
            XmlNode _notify_url = doc.SelectSingleNode(@"Root/notify_url");
            //读取站点配置信息
            Model.siteconfig model = new BLL.siteconfig().loadConfig();

            //合作身份者ID,以2088开头由16位纯数字组成的字符串
            partner = _partner.InnerText;
            //交易安全检验码,由数字和字母组成的32位字符串
            key = _key.InnerText;
            //签约支付宝账号或卖家支付宝帐户
            email = _email.InnerText;
            //页面跳转同步返回页面文件路径 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
            return_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _return_url.InnerText;
            //服务器通知的页面文件路径 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
            notify_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _notify_url.InnerText;

            //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

            //字符编码格式 目前支持 gbk 或 utf-8
            input_charset = "utf-8";

            //签名方式 不需修改
            sign_type = "MD5";
        }
开发者ID:LutherW,项目名称:MTMS,代码行数:35,代码来源:AlipayConfig.cs


示例6: UpLoadFile

        private void UpLoadFile(HttpContext context)
        {
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
            string _delfile = DTRequest.GetString("DelFilePath");
            HttpPostedFile _upfile = context.Request.Files["Filedata"];
            bool _iswater = false; //默认不打水印
            bool _isthumbnail = false; //默认不生成缩略图

            if (DTRequest.GetQueryString("IsWater") == "1")
                _iswater = true;
            if (DTRequest.GetQueryString("IsThumbnail") == "1")
                _isthumbnail = true;
            if (_upfile == null)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"请选择要上传文件!\"}");
                return;
            }
            UpLoad upFiles = new UpLoad();
            string msg = upFiles.fileSaveAs(_upfile, _isthumbnail, _iswater);
            //删除已存在的旧文件,旧文件不为空且应是上传文件,防止跨目录删除
            if (!string.IsNullOrEmpty(_delfile) && _delfile.IndexOf("../") == -1 
                && _delfile.ToLower().StartsWith(siteConfig.webpath.ToLower() + siteConfig.filepath.ToLower()))
            {
                Utils.DeleteUpFile(_delfile);
            }
            //返回成功信息
            context.Response.Write(msg);
            context.Response.End();
        }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:29,代码来源:upload_ajax.ashx.cs


示例7: lbtnStart_Click

 //启用模板
 protected void lbtnStart_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("sys_templet", ActionEnum.Add.ToString()); //检查权限
     BLL.siteconfig bll = new BLL.siteconfig();
     Model.siteconfig model = siteConfig;
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         string skinName = ((HiddenField)rptList.Items[i].FindControl("hideSkinName")).Value;
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             //判是否当前模板
             if (skinName.ToLower() == siteConfig.templateskin)
             {
                 JscriptMsg("该模板已是当前模板啦!", "back", "Warning");
                 return;
             }
             model.templateskin = skinName.ToLower();
             //修改配置文件
             bll.saveConifg(model, Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));
             //重新生成模板
             MarkTemplates(skinName);
             JscriptMsg("模板启用并全部生成成功啦!", "templet_list.aspx", "Success");
             return;
         }
     }
 }
开发者ID:sichina,项目名称:DTcms_103_sql_src,代码行数:28,代码来源:templet_list.aspx.cs


示例8: Config

        static Config()
        {
            //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

            //读取XML配置信息
            string fullPath = Utils.GetMapPath("~/xmlconfig/alipay.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode _partner = doc.SelectSingleNode(@"Root/partner");
            XmlNode _key = doc.SelectSingleNode(@"Root/key");
            XmlNode _seller_email = doc.SelectSingleNode(@"Root/seller_email");
            XmlNode _return_url = doc.SelectSingleNode(@"Root/return_url");
            XmlNode _notify_url = doc.SelectSingleNode(@"Root/notify_url");
            //读取站点配置信息
            Model.siteconfig model = new BLL.siteconfig().loadConfig(DTKeys.FILE_SITE_XML_CONFING);

            //合作身份者ID,以2088开头由16位纯数字组成的字符串
            partner = _partner.InnerText;
            //交易安全检验码,由数字和字母组成的32位字符串
            key = _key.InnerText;
            //签约支付宝账号或卖家支付宝帐户
            seller_email = _seller_email.InnerText;
            //页面跳转同步返回页面文件路径 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
            return_url = Utils.DelLastChar(model.weburl, "/") + _return_url.InnerText;
            //服务器通知的页面文件路径 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
            notify_url = Utils.DelLastChar(model.weburl, "/") + _notify_url.InnerText;

            //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

            //字符编码格式 目前支持 gbk 或 utf-8
            input_charset = "utf-8";

            //签名方式 不需修改
            sign_type = "MD5";
        }
开发者ID:egojit,项目名称:B2C,代码行数:35,代码来源:AlipayConfig.cs


示例9: comment_add

        private void comment_add(HttpContext context)
        {
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));
            StringBuilder strTxt = new StringBuilder();
            BLL.comment bll = new BLL.comment();
            Model.comment model = new Model.comment();

            string _code = DTRequest.GetFormString("txtCode");
            int _channel_id = DTRequest.GetQueryInt("channel_id");
            int _content_id = DTRequest.GetQueryInt("content_id");
            string _title = DTRequest.GetFormString("txtTitle");
            string _content = DTRequest.GetFormString("txtContent");

            //校检验证码
            if (string.IsNullOrEmpty(_code))
            {
                context.Response.Write("{msg:0, msgbox:\"对不起,请输入验证码!\"}");
                return;
            }
            if (context.Session[DTKeys.SESSION_CODE] == null)
            {
                context.Response.Write("{msg:0, msgbox:\"对不起,系统找不到生成的验证码!\"}");
                return;
            }
            if (_code.ToLower() != (context.Session[DTKeys.SESSION_CODE].ToString()).ToLower())
            {
                context.Response.Write("{msg:0, msgbox:\"您输入的验证码与系统的不一致!\"}");
                return;
            }
            if (_channel_id == 0 || _content_id == 0)
            {
                context.Response.Write("{msg: 0, msgbox: \"对不起,参数传输有误!\"}");
                return;
            }
            if (string.IsNullOrEmpty(_content))
            {
                context.Response.Write("{msg: 0, msgbox: \"对不起,请输入评论的内容!\"}");
                return;
            }

            model.channel_id = _channel_id;
            model.content_id = _content_id;
            model.title = _title;
            model.content = Utils.ToHtml(_content);
            model.user_name = "游客";
            model.user_ip = DTRequest.GetIP();
            model.is_lock = siteConfig.commentstatus; //审核开关
            model.add_time = DateTime.Now;
            model.is_reply = 0;
            if (bll.Add(model) > 0)
            {
                context.Response.Write("{msg: 1, msgbox: \"恭喜您,留言提交成功啦!\"}");
                return;
            }
            context.Response.Write("{msg: 0, msgbox: \"对不起,保存过程中发生错误!\"}");
            return;
        }
开发者ID:SihengWang,项目名称:CorporateWebsite,代码行数:57,代码来源:submit_ajax.ashx.cs


示例10: ShowInfo

        private void ShowInfo()
        {
            BLL.siteconfig bll = new BLL.siteconfig();
            Model.siteconfig model = bll.loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));
            webname.Text = model.webname;
            webcompany.Text = model.webcompany;
            weburl.Text = model.weburl;
            webtel.Text = model.webtel;
            webfax.Text = model.webfax;
            webmail.Text = model.webmail;
            webcrod.Text = model.webcrod;
            webtitle.Text = model.webtitle;
            webkeyword.Text = model.webkeyword;
            webdescription.Text = model.webdescription;
            webcopyright.Text = model.webcopyright;
            webpath.Text = model.webpath;
            webmanagepath.Text = model.webmanagepath;
            webstatus.Text = model.webstatus.ToString();
            webclosereason.Text = model.webclosereason;
            webcountcode.Text = model.webcountcode;

            staticstatus.SelectedValue = model.staticstatus.ToString();
            staticextension.Text = model.staticextension;
            memberstatus.SelectedValue = model.memberstatus.ToString();
            commentstatus.SelectedValue = model.commentstatus.ToString();
            logstatus.SelectedValue = model.logstatus.ToString();

            emailstmp.Text = model.emailstmp;
            emailport.Text = model.emailport.ToString();
            emailfrom.Text = model.emailfrom;
            emailusername.Text = model.emailusername;
            if (!string.IsNullOrEmpty(model.emailpassword))
            {
                emailpassword.Attributes["value"] = defaultpassword;
            }
            emailnickname.Text = model.emailnickname;

            attachpath.Text = model.attachpath;
            attachextension.Text = model.attachextension;
            attachsave.SelectedValue = model.attachsave.ToString();
            attachfilesize.Text = model.attachfilesize.ToString();
            attachimgsize.Text = model.attachimgsize.ToString();
            attachimgmaxheight.Text = model.attachimgmaxheight.ToString();
            attachimgmaxwidth.Text = model.attachimgmaxwidth.ToString();
            thumbnailheight.Text = model.thumbnailheight.ToString();
            thumbnailwidth.Text = model.thumbnailwidth.ToString();
            watermarktype.SelectedValue = model.watermarktype.ToString();
            watermarkposition.Text = model.watermarkposition.ToString();
            watermarkimgquality.Text = model.watermarkimgquality.ToString();
            watermarkpic.Text = model.watermarkpic;
            watermarktransparency.Text = model.watermarktransparency.ToString();
            watermarktext.Text = model.watermarktext;
            watermarkfont.Text = model.watermarkfont;
            watermarkfontsize.Text = model.watermarkfontsize.ToString();
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:55,代码来源:sys_config.aspx.cs


示例11: btnSubmit_Click

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string userName = txtUserName.Text.Trim();
            string userPwd = txtPassword.Text.Trim();

            if (userName.Equals("") || userPwd.Equals(""))
            {
                msgtip.InnerHtml = "请输入用户名或密码";
                return;
            }
            if (Session["AdminLoginSun"] == null)
            {
                Session["AdminLoginSun"] = 1;
            }
            else
            {
                Session["AdminLoginSun"] = Convert.ToInt32(Session["AdminLoginSun"]) + 1;
            }
            //判断登录错误次数
            if (Session["AdminLoginSun"] != null && Convert.ToInt32(Session["AdminLoginSun"]) > 5)
            {
                msgtip.InnerHtml = "错误超过5次,关闭浏览器重新登录!";
                return;
            }
            BLL.manager bll = new BLL.manager();

            Model.manager model = bll.GetModel(userName, userPwd, true);
            if (model == null)
            {
                msgtip.InnerHtml = "用户名或密码有误,请重试!";
                return;
            }
            // 保存当前的后台管理员
            Session[MXKeys.SESSION_ADMIN_INFO] = model;
            Session.Timeout = 45;
            //写入登录日志
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
            if (siteConfig.logstatus > 0)
            {
                new BLL.manager_log().Add(model.id, model.user_name, MXEnums.ActionEnum.Login.ToString(), "用户登录");
            }
            //写入Cookies
            Utils.WriteCookie("DTRememberName", model.user_name, 14400);
            Utils.WriteCookie("AdminName", "MxWeiXinPF", model.user_name);
            Utils.WriteCookie("AdminPwd", "MxWeiXinPF", model.password);
            Response.Redirect("wxIndex.aspx");
            return;
        }
开发者ID:xiangyan99,项目名称:Weixin,代码行数:48,代码来源:login.aspx.cs


示例12: get_config

 /// <summary>
 /// 获取OAuth配置信息
 /// </summary>
 /// <param name="oauth_name"></param>
 public static oauth_config get_config(string oauth_name)
 {
     //读取接口配置信息
     Model.app_oauth model = new BLL.app_oauth().GetModel(oauth_name);
     if (model != null)
     {
         //读取站点配置信息
         Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(HotoKeys.FILE_SITE_XML_CONFING);
         //赋值
         oauth_config config = new oauth_config();
         config.oauth_name = model.api_path.Trim();
         config.oauth_app_id = model.app_id.Trim();
         config.oauth_app_key = model.app_key.Trim();
         config.return_uri = HotoUtils.DelLastChar(siteConfig.weburl, "/") + siteConfig.webpath + "api/oauth/" + model.api_path + "/return_url.aspx";
         return config;
     }
     return null;
 }
开发者ID:refinedKing,项目名称:Hoto-cms,代码行数:22,代码来源:oauth_helper.cs


示例13: TenpayUtil

        static TenpayUtil()
        {
            //��ȡXML������Ϣ
            string fullPath = Utils.GetMapPath("~/xmlconfig/tenpay.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode _partner = doc.SelectSingleNode(@"Root/partner");
            XmlNode _key = doc.SelectSingleNode(@"Root/key");
            XmlNode _return_url = doc.SelectSingleNode(@"Root/return_url");
            XmlNode _notify_url = doc.SelectSingleNode(@"Root/notify_url");
            //��ȡվ��������Ϣ
            Model.siteconfig model = new BLL.siteconfig().loadConfig();

            partner = _partner.InnerText;
            key = _key.InnerText;
            return_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _return_url.InnerText;
            notify_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _notify_url.InnerText;
        }
开发者ID:LutherW,项目名称:MTMS,代码行数:18,代码来源:TenpayUtil.cs


示例14: TenpayUtil

        public static string tenpay_return = ""; //��ʾ֧��֪ͨҳ��;

        #endregion Fields

        #region Constructors

        static TenpayUtil()
        {
            //��ȡXML������Ϣ
            string fullPath = HotoUtils.GetMapPath("~/xmlconfig/tenpay.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode _bargainor_id = doc.SelectSingleNode(@"Root/bargainor_id");
            XmlNode _tenpay_key = doc.SelectSingleNode(@"Root/tenpay_key");
            XmlNode _tenpay_return = doc.SelectSingleNode(@"Root/tenpay_return");
            XmlNode _tenpay_notify = doc.SelectSingleNode(@"Root/tenpay_notify");
            //��ȡվ��������Ϣ
            Model.siteconfig model = new BLL.siteconfig().loadConfig(HotoKeys.FILE_SITE_XML_CONFING);

            bargainor_id = _bargainor_id.InnerText;
            tenpay_key = _tenpay_key.InnerText;
            tenpay_return = HotoUtils.DelLastChar(model.weburl, "/") + _tenpay_return.InnerText;
            tenpay_notify = HotoUtils.DelLastChar(model.weburl, "/") + _tenpay_notify.InnerText;
        }
开发者ID:refinedKing,项目名称:Hoto-cms,代码行数:24,代码来源:TenpayUtil.cs


示例15: get_config

 /// <summary>
 /// 获取OAuth配置信息
 /// </summary>
 /// <param name="oauth_name"></param>
 public static oauth_config get_config(string oauth_name)
 {
     //读取接口配置信息
     Model.user_oauth_app model = new BLL.user_oauth_app().GetModel(oauth_name);
     if (model != null)
     {
         //读取站点配置信息
         Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
         //赋值
         oauth_config config = new oauth_config();
         config.oauth_name = model.api_path.Trim();
         config.oauth_app_id = model.app_id.Trim();
         config.oauth_app_key = model.app_key.Trim();
         config.return_uri = HttpContext.Current.Request.Url.Authority.ToLower() + siteConfig.webpath + "api/oauth/" + model.api_path + "/return_url.aspx";
         return config;
     }
     return null;
 }
开发者ID:yi724926089,项目名称:MyWx,代码行数:22,代码来源:oauth_helper.cs


示例16: CreateIndexHtml

        //生成首页静态
        public static void CreateIndexHtml()
        {
            Model.siteconfig config = new BLL.siteconfig().loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));
            string urlPath = string.Format("{0}{1}/{2}", config.webpath, DTKeys.DIRECTORY_REWRITE_ASPX, "index.aspx"); //文件相对路径
            string htmlPath = string.Format("{0}{1}/{2}", config.webpath, DTKeys.DIRECTORY_REWRITE_HTML, "index." + config.staticextension); //保存相对路径
            //检查文件是否存在
            if (!File.Exists(Utils.GetMapPath(urlPath)))
            {

            }
            Stopwatch watch = new Stopwatch(); //测量时间
            watch.Start();
            StringWriter sw = new StringWriter();
            HttpContext.Current.Server.Execute(urlPath, sw);
            File.WriteAllText(Utils.GetMapPath(htmlPath), sw.ToString(), Encoding.UTF8);
            watch.Stop();
            //watch.Elapsed
            sw.Close();
            sw.Dispose();
        }
开发者ID:sichina,项目名称:DTcms_103_sql_src,代码行数:21,代码来源:HtmlBuilder.cs


示例17: Config

        public Config()
        {
            //读取XML配置信息
            string fullPath = Utils.GetMapPath("~/xmlconfig/chinabankpc.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode _partner = doc.SelectSingleNode(@"Root/partner");
            XmlNode _key = doc.SelectSingleNode(@"Root/key");
            XmlNode _return_url = doc.SelectSingleNode(@"Root/return_url");
            XmlNode _notify_url = doc.SelectSingleNode(@"Root/notify_url");
            //读取站点配置信息
            Model.siteconfig model = new BLL.siteconfig().loadConfig();

            //赋值变量值
            partner = _partner.InnerText;
            key = _key.InnerText;
            return_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _return_url.InnerText;
            notify_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _notify_url.InnerText;
            input_charset = "utf-8";
        }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:20,代码来源:Config.cs


示例18: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            //读取站点配置信息
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(DTKeys.FILE_SITE_XML_CONFING);
            SortedDictionary<string, string> sPara = GetRequestGet();

            if (sPara.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify = new Notify();
                bool verifyResult = aliNotify.Verify(sPara, DTRequest.GetString("notify_id"), DTRequest.GetString("sign"));

                if (verifyResult)//验证成功
                {
                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表
                    string trade_no = DTRequest.GetString("trade_no");              //支付宝交易号
                    string order_no = DTRequest.GetString("out_trade_no");	        //获取订单号
                    string total_fee = DTRequest.GetString("total_fee");            //获取总金额
                    string subject = DTRequest.GetString("subject");                //商品名称、订单名称
                    string body = DTRequest.GetString("body");                      //商品描述、订单备注、描述
                    string buyer_email = DTRequest.GetString("buyer_email");        //买家支付宝账号
                    string trade_status = DTRequest.GetString("trade_status");      //交易状态
                    string order_type = DTRequest.GetString("extra_common_param");  //订单交易类别

                    if (DTRequest.GetString("trade_status") == "TRADE_FINISHED" || DTRequest.GetString("trade_status") == "TRADE_SUCCESS")
                    {
                        //成功状态
                        Response.Redirect(new Web.UI.BasePage().linkurl("payment1", "succeed", order_type, order_no));
                        return;
                    }
                }
            }
            //失败状态
            Response.Redirect(new Web.UI.BasePage().linkurl("payment", "error"));
            return;
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:36,代码来源:return_url.aspx.cs


示例19: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            //读取站点配置信息
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();

            //=============================获得订单信息================================
            string order_no = DTRequest.GetFormString("pay_order_no").ToUpper();
            decimal order_amount = DTRequest.GetFormDecimal("pay_order_amount", 0);
            string user_name = DTRequest.GetFormString("pay_user_name");
            string subject = DTRequest.GetFormString("pay_subject");
            //以下收货人信息
            string receive_name = string.Empty; //收货人姓名
            string receive_address = string.Empty; //收货人地址
            string receive_zip = string.Empty; //收货人邮编
            string receive_phone = string.Empty; //收货人电话
            string receive_mobile = string.Empty; //收货人手机
            //检查参数是否正确
            if (string.IsNullOrEmpty(order_no) || order_amount == 0)
            {
                Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,您提交的参数有误!")));
                return;
            }
            if (order_no.StartsWith("R")) //R开头为在线充值订单
            {
                Model.user_recharge model = new BLL.user_recharge().GetModel(order_no);
                if (model == null)
                {
                    Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,您充值的订单号不存在或已删除!")));
                    return;
                }
                if (model.amount != order_amount)
                {
                    Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,您充值的订单金额与实际金额不一致!")));
                    return;
                }
                //取得用户信息
                Model.users userModel = new BLL.users().GetModel(model.user_id);
                if (userModel == null)
                {
                    Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,用户账户不存在或已删除!")));
                    return;
                }
                receive_name = userModel.nick_name;
                receive_address = userModel.address;
                receive_phone = userModel.telphone;
                receive_mobile = userModel.mobile;
            }
            else //B开头为商品订单
            {
                Model.orders model = new BLL.orders().GetModel(order_no);
                if (model == null)
                {
                    Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,您支付的订单号不存在或已删除!")));
                    return;
                }
                if (model.order_amount != order_amount)
                {
                    Response.Redirect(new Web.UI.BasePage().linkurl("error", "?msg=" + Utils.UrlEncode("对不起,您支付的订单金额与实际金额不一致!")));
                    return;
                }
                receive_name = model.accept_name;
                receive_address = model.address;
                receive_zip = model.post_code;
                receive_phone = model.telphone;
                receive_mobile = model.mobile;
            }
            if (user_name != "")
            {
                user_name = "支付会员:" + user_name;
            }
            else
            {
                user_name = "匿名用户";
            }

            //===============================请求参数==================================

            //判断担保或是即时到帐接口
            if (Config.Type == "1") //即时到帐
            {
                //把请求参数打包成数组
                SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();
                sParaTemp.Add("payment_type", "1"); //收款类型1商品购买
                sParaTemp.Add("show_url", siteConfig.weburl); //商品展示地址
                sParaTemp.Add("out_trade_no", order_no); //网站订单号
                sParaTemp.Add("subject", siteConfig.webname + "-" + subject); //订单名称
                sParaTemp.Add("body", user_name); //订单描述
                sParaTemp.Add("total_fee", order_amount.ToString()); //订单总金额
                sParaTemp.Add("paymethod", ""); //默认支付方式
                sParaTemp.Add("defaultbank", ""); //默认网银代号
                sParaTemp.Add("anti_phishing_key", ""); //防钓鱼时间戳
                sParaTemp.Add("exter_invoke_ip", DTRequest.GetIP()); ////获取客户端的IP地址
                sParaTemp.Add("buyer_email", ""); //默认买家支付宝账号
                sParaTemp.Add("royalty_type", "");
                sParaTemp.Add("royalty_parameters", "");

                //构造即时到帐接口表单提交HTML数据,无需修改
                Service ali = new Service();
                string sHtmlText = ali.Create_direct_pay_by_user(sParaTemp);
                Response.Write(sHtmlText);
//.........这里部分代码省略.........
开发者ID:rockhe168,项目名称:CMS,代码行数:101,代码来源:index.aspx.cs


示例20: sys_channel_validate

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BLL.users类代码示例发布时间:2022-05-24
下一篇:
C# BLL.orders类代码示例发布时间: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