本文整理汇总了C#中BLL.orders.GetModel方法的典型用法代码示例。如果您正苦于以下问题:C# BLL.orders.GetModel方法的具体用法?C# BLL.orders.GetModel怎么用?C# BLL.orders.GetModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.orders
的用法示例。
在下文中一共展示了BLL.orders.GetModel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例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;
}
示例3: 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");
}
示例4: 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();
}
}
示例5: 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();
}
示例6: 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();
}
示例7: 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");
}
示例8: 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;
}
}
示例9: 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");
}
示例10: 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();
}
}
示例11: ShowInfo
private void ShowInfo(string _order_no)
{
BLL.orders bll = new BLL.orders();
Model.orders model = bll.GetModel(_order_no);
BLL.express bll2 = new BLL.express();
DataTable dt = bll2.GetList("").Tables[0];
ddlExpressId.Items.Clear();
ddlExpressId.Items.Add(new ListItem("请选择配送方式", ""));
foreach (DataRow dr in dt.Rows)
{
ddlExpressId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString()));
}
txtExpressNo.Text = model.express_no;
ddlExpressId.SelectedValue = model.express_id.ToString();
}
示例12: btnInvalid_Click
//作废订单
protected void btnInvalid_Click(object sender, EventArgs e)
{
ChkAdminLevel("orders", DTEnums.ActionEnum.Invalid.ToString()); //检查权限
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 && model.status == 3)
{
bll.UpdateField(id, "status=5");
}
}
}
JscriptMsg("符合的订单已作废!", Utils.CombUrlTxt("order_list.aspx", "status={0}&payment_status={1}&distribution_status={2}&keywords={3}",
this.status.ToString(), this.payment_status.ToString(), this.distribution_status.ToString(), this.keywords), "Success");
}
示例13: ProcessRequest
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/json";
string action = MyCommFun.QueryString("act");
Dictionary<string, string> jsonDict = new Dictionary<string, string>();
if (action == "orderRet")
{
#region //跳转到结果页面,查询订单的最终结果信息
string openid = MyCommFun.RequestOpenid();
int otid = MyCommFun.RequestInt("otid");
jsonDict = new Dictionary<string, string>();
if (openid == "" || otid == 0)
{
jsonDict.Add("ret", "err");
jsonDict.Add("content", "抱歉,参数不正确!");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
BLL.orders otBll = new BLL.orders();
Model.orders ordertmp = otBll.GetModel(otid);
if (ordertmp.payment_status == 2)
{
jsonDict.Add("ret", "ok");
jsonDict.Add("content", "下单已经成功!");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
}
else
{
jsonDict.Add("ret", "err");
jsonDict.Add("content", "下单失败!");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
}
#endregion
}
}
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
openid = MyCommFun.RequestOpenid();
otid = MyCommFun.RequestInt("otid");
int wid = MyCommFun.RequestWid();
if (openid == "" || otid == 0 || wid == 0)
{
return;
}
WeiXinCRMComm wxComm = new WeiXinCRMComm();
string err = "";
token = wxComm.getAccessToken(wid, out err);
BLL.orders otBll = new BLL.orders();
ordertmp = otBll.GetModel(otid, wid);
}
}
示例15: 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();
if (modelt != null && modelt.express_code.Trim().Length > 0 && orderConfig.kuaidiapi != "")
{
string apiurl = orderConfig.kuaidiapi + "?id=" + orderConfig.kuaidikey + "&com=" + modelt.express_code + "&nu=" + model.express_no + "&show=" + orderConfig.kuaidishow + "&muti=" + orderConfig.kuaidimuti + "&order=" + orderConfig.kuaidiorder;
string detail = Utils.HttpGet(@apiurl);
if (detail != null)
{
expressdetail = Utils.ToHtml(detail);
}
}
}
}