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


C# BLL.orders类代码示例

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


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

示例1: RptBind

        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            this.page = MXRequest.GetQueryInt("page", 1);
            
            txtKeywords.Text = this.keywords;
            BLL.orders bll = new BLL.orders();
            DataSet ds = bll.GetList(weixin.id,this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); ;
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                    dr["statusName"] = GetOrderStatus(MyCommFun.Obj2Int(dr["id"]), MyCommFun.Obj2Int(dr["status"]), MyCommFun.Obj2Int(dr["payment_status"]), MyCommFun.Obj2Int(dr["express_status"]));

                }
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("order_confirm.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:26,代码来源:order_confirm.aspx.cs

示例2: 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

示例3: btnDelete_Click

 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("order_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     int sucCount = 0;
     int errorCount = 0;
     BLL.orders bll = new BLL.orders();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             if (bll.Delete(id))
             {
                 sucCount += 1;
             }
             else
             {
                 errorCount += 1;
             }
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除订单成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
     JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("order_list.aspx", "status={0}&payment_status={1}&express_status={2}&keywords={3}",
         this.status.ToString(), this.payment_status.ToString(), this.express_status.ToString(), this.keywords));
 }
开发者ID:sfwjiao,项目名称:MyTestProject,代码行数:27,代码来源:order_list.aspx.cs

示例4: InitPage

        /// <summary>
        /// 重写虚方法,此方法在Init事件执行
        /// </summary>
        protected override void InitPage()
        {
            action = MXRequest.GetQueryString("action");

            //获得最后登录日志
            DataTable dt = new BLL.user_login_log().GetList(2, "user_name='" + userModel.user_name + "'", "id desc").Tables[0];
            if (dt.Rows.Count == 2)
            {
                curr_login_ip = dt.Rows[0]["login_ip"].ToString();
                pre_login_ip = dt.Rows[1]["login_ip"].ToString();
                pre_login_time = dt.Rows[1]["login_time"].ToString();
            }
            else if (dt.Rows.Count == 1)
            {
                curr_login_ip = dt.Rows[0]["login_ip"].ToString();
            }
            //未完成订单
            total_order = new BLL.orders().GetCount("user_name='" + userModel.user_name + "' and status<3");
            //未读短信息
            total_msg = new BLL.user_message().GetCount("accept_user_name='" + userModel.user_name + "' and is_read=0");

            //退出登录==========================================================
            if (action == "exit")
            {
                //清险Session
                HttpContext.Current.Session[MXKeys.SESSION_USER_INFO] = null;
                //清除Cookies
                Utils.WriteCookie(MXKeys.COOKIE_USER_NAME_REMEMBER, "MxWeiXinPF", -43200);
                Utils.WriteCookie(MXKeys.COOKIE_USER_PWD_REMEMBER, "MxWeiXinPF", -43200);
                Utils.WriteCookie("UserName", "MxWeiXinPF", -1);
                Utils.WriteCookie("Password", "MxWeiXinPF", -1);
                //自动登录,跳转URL
                HttpContext.Current.Response.Redirect(linkurl("login"));
            }
        }
开发者ID:yi724926089,项目名称:MyWx,代码行数:38,代码来源:usercenter.cs

示例5: RptBind

        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.status > 0)
            {
                this.ddlStatus.SelectedValue = this.status.ToString();
            }
            if (this.payment_status > 0)
            {
                this.ddlPaymentStatus.SelectedValue = this.payment_status.ToString();
            }
            if (this.distribution_status > 0)
            {
                this.ddlDistributionStatus.SelectedValue = this.distribution_status.ToString();
            }
            this.txtKeywords.Text = this.keywords;
            BLL.orders bll = new BLL.orders();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("order_list.aspx", "status={0}&payment_status={1}&distribution_status={2}&keywords={3}&page={4}",
                this.status.ToString(), this.payment_status.ToString(), this.distribution_status.ToString(), this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:26,代码来源:order_list.aspx.cs

示例6: lbtnComplete_Click

 //完成订单
 protected void lbtnComplete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("orders", DTEnums.ActionEnum.Edit.ToString()); //检查权限
     BLL.orders bll = new BLL.orders();
     Model.orders model = bll.GetModel(this.id);
     //检查订单状态
     if (model == null || model.status != 2 || model.distribution_status != 2)
     {
         JscriptMsg("订单不符合要求,无法发货!", "", "Error");
         return;
     }
     //检查支付方式
     Model.payment payModel = new BLL.payment().GetModel(model.payment_id);
     if (payModel == null)
     {
         JscriptMsg("支付方式不存在,无法完成订单!", "", "Error");
         return;
     }
     //增加积分/经验值
     if (model.point > 0)
     {
         new BLL.point_log().Add(model.user_id, model.user_name, model.point, "购物获得积分,订单号:" + model.order_no);
     }
     //如果配送方式为先款后货,则检查付款状态
     if (payModel.type == 2)
     {
         bll.UpdateField(this.id, "status=3,complete_time='" + DateTime.Now + "'," + "payment_status=2,payment_time='" + DateTime.Now + "'");
     }
     else
     {
         bll.UpdateField(this.id, "status=3,complete_time='" + DateTime.Now + "'");
     }
     JscriptMsg("订单已经完成啦!", "order_edit.aspx?id=" + this.id, "Success");
 }
开发者ID:egojit,项目名称:B2C,代码行数:35,代码来源:order_edit.aspx.cs

示例7: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     openid = MyCommFun.RequestOpenid();
     int otid = MyCommFun.RequestInt("orderid");
     wid = MyCommFun.RequestInt("wid");
     expireMinute = MyCommFun.RequestInt("expireminute");
     if (expireMinute == 0)
     {
         expireMinute = 30;
     }
     else if(expireMinute==-1)
     {  //如果为-1,则有限期间为1年
         expireMinute = 60 * 12 * 365;
     }
     if (openid == "" || otid == 0 || wid==0)
     {
         return;
     }
     BLL.orders otBll = new BLL.orders();
     Model.orders orderEntity = otBll.GetModel(otid,wid);
     litout_trade_no.Text = orderEntity.order_no;
     litMoney.Text = orderEntity.order_amount.ToString();
     litDate.Text = orderEntity.add_time.ToString();
     WxPayData(orderEntity.order_amount, orderEntity.id.ToString(), orderEntity.order_no);
 }
开发者ID:yi724926089,项目名称:MyWx,代码行数:25,代码来源:paypage.aspx.cs

示例8: InitPage

 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     id = DTRequest.GetQueryInt("id");
     BLL.orders bll = new BLL.orders();
     if (!bll.Exists(id))
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您要浏览的页面不存在或已删除!")));
         return;
     }
     model = bll.GetModel(id);
     if (model.user_id != userModel.id)
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您所查看的并非自己的订单信息!")));
         return;
     }
     payModel = new BLL.payment().GetModel(model.payment_id);
     if (payModel == null)
     {
         payModel = new Model.payment();
     }
     //根据订单状态和物流单号跟踪物流信息
     if (model.status > 1 && model.status < 4 && model.express_status == 2 && model.express_no.Trim().Length > 0)
     {
         Model.express modelt = new BLL.express().GetModel(model.express_id);
         Model.orderconfig orderConfig = new BLL.orderconfig().loadConfig();
     }
 }
开发者ID:rockhe168,项目名称:CMS,代码行数:30,代码来源:userorder_show.cs

示例9: ShowInfo

 private void ShowInfo(string _order_no)
 {
     BLL.orders bll = new BLL.orders();
     model = bll.GetModel(_order_no);
     adminModel = GetAdminInfo();
     this.rptList.DataSource = model.order_goods;
     this.rptList.DataBind();
 }
开发者ID:rockhe168,项目名称:CMS,代码行数:8,代码来源:dialog_print.aspx.cs

示例10: ShowInfo

 private void ShowInfo(int _id)
 {
     BLL.orders bll = new BLL.orders();
     model = bll.GetModel(_id);
     managerModel = GetAdminInfo();
     this.rptList.DataSource = model.order_goods;
     this.rptList.DataBind();
 }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:8,代码来源:order_print.aspx.cs

示例11: RptBind

        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.orders bll = new BLL.orders();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("order_confirm.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:13,代码来源:order_confirm.aspx.cs

示例12: btnInvalid_Click

 //作废订单
 protected void btnInvalid_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("orders", DTEnums.ActionEnum.Invalid.ToString()); //检查权限
     BLL.orders bll = new BLL.orders();
     Model.orders model = bll.GetModel(this.id);
     if (model == null && model.status != 3)
     {
         JscriptMsg("订单未完成,无法作废!", "", "Error");
         return;
     }
     bll.UpdateField(this.id, "status=5");
     JscriptMsg("订单取消成功啦!", "order_edit.aspx?id=" + this.id, "Success");
 }
开发者ID:egojit,项目名称:B2C,代码行数:14,代码来源:order_edit.aspx.cs

示例13: ShowInfo

 private void ShowInfo(int _id)
 {
     BLL.orders bll = new BLL.orders();
     model = bll.GetModel(_id);
     payModel = new BLL.payment().GetModel(model.payment_id);
     userModel = new BLL.users().GetModel(model.user_id);
     if (userModel != null)
     {
         groupModel = new BLL.user_groups().GetModel(userModel.group_id);
     }
     if (payModel == null)
     {
         payModel = new Model.payment();
     }
     this.rptList.DataSource = model.order_goods;
     this.rptList.DataBind();
     //订单状态
     if (model.status == 1)
     {
         if (payModel != null && payModel.type == 1)
         {
             if (model.payment_status > 1)
             {
                 this.lbtnConfirm.Enabled = true;
             }
         }
         else
         {
             this.lbtnConfirm.Enabled = true;
         }
     }
     else if (model.status == 2 && model.distribution_status == 1)
     {
         this.lbtnSend.Enabled = true;
     }
     else if (model.status == 2 && model.distribution_status == 2)
     {
         this.lbtnComplete.Enabled = true;
     }
     if (model.status < 3)
     {
         this.btnCancel.Visible = true;
     }
     //如果订单为已完成时,不能取消订单
     if (model.status == 3)
     {
         this.btnInvalid.Visible = true;
     }
 }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:49,代码来源:order_edit.aspx.cs

示例14: btnConfirm_Click

 //确认订单
 protected void btnConfirm_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("order_list", DTEnums.ActionEnum.Confirm.ToString()); //检查权限
     int sucCount = 0;
     int errorCount = 0;
     BLL.orders bll = new BLL.orders();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             Model.orders model = bll.GetModel(id);
             if (model != null)
             {
                 //检查订单是否使用在线支付方式
                 if (model.payment_status > 0)
                 {
                     //在线支付方式
                     model.payment_status = 2; //标志已付款
                     model.payment_time = DateTime.Now; //支付时间
                     model.status = 2; // 订单为确认状态
                     model.confirm_time = DateTime.Now; //确认时间
                 }
                 else
                 {
                     //线下支付方式
                     model.status = 2; // 订单为确认状态
                     model.confirm_time = DateTime.Now; //确认时间
                 }
                 if (bll.Update(model))
                 {
                     sucCount++;
                 }
                 else
                 {
                     errorCount++;
                 }
             }
             else
             {
                 errorCount++;
             }
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Confirm.ToString(), "确认订单成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
     JscriptMsg("确认成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("order_confirm.aspx", "keywords={0}", this.keywords), "Success");
 }
开发者ID:LutherW,项目名称:MTMS,代码行数:49,代码来源:order_confirm.aspx.cs

示例15: InitPage

 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     id = MXRequest.GetQueryInt("id");
     BLL.orders bll = new BLL.orders();
     if (!bll.Exists(id))
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "error.aspx?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除啦!")));
         return;
     }
     model = bll.GetModel(id);
     payModel = new BLL.payment().GetModel(model.payment_id);
     if (payModel == null)
     {
         payModel = new Model.payment();
     }
 }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:19,代码来源:userorder_show.cs


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