protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["userid"] != null) { Chain.BLL.SysUser bllUser = new Chain.BLL.SysUser(); Chain.Model.SysUser modelUser = bllUser.GetModel(int.Parse(this.Session["userid"].ToString())); Chain.BLL.OrderLog bllExchange = new Chain.BLL.OrderLog(); DataTable dt; if (modelUser.UserShopID != 1) { dt = bllExchange.GetList(100, " OrderLog.OrderShopID= " + modelUser.UserShopID, " OrderCreateTime desc").Tables[0]; } else { dt = bllExchange.GetList(100, "1=1", "OrderCreateTime desc").Tables[0]; } this.rptExchange.DataSource = dt; this.rptExchange.DataBind(); if (dt.Rows.Count < 10 || base.Request.QueryString["type"] == "all") { this.moreExpense.Attributes.Add("style", "display:none"); } else { this.moreExpense.Attributes.Add("style", ""); } } else { base.Response.Redirect("login.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["userid"] != null) { Chain.BLL.SysUser bllUser = new Chain.BLL.SysUser(); Chain.Model.SysUser modelUser = bllUser.GetModel(int.Parse(this.Session["userid"].ToString())); Chain.Model.SysShop modelShop = new Chain.BLL.SysShop().GetModel(modelUser.UserShopID); this.txtShopID.Value = modelUser.UserShopID.ToString(); } else { base.Response.Redirect("login.aspx"); } if (base.Request.QueryString["type"] != null) { this.txtType.Value = base.Request.QueryString["Type"]; } else { this.txtType.Value = "1"; } } }
private void BindCBLCustomRemind() { DataTable dt = new Chain.BLL.SysUser().GetList("").Tables[0]; this.cblCustomReminder.DataSource = dt; this.cblCustomReminder.DataTextField = "UserName"; this.cblCustomReminder.DataValueField = "UserID"; this.cblCustomReminder.DataBind(); foreach (ListItem li in this.cblCustomReminder.Items) { li.Attributes.Add("alt", li.Value); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["userid"] != null) { this.spOrderAccount.InnerHtml = "wxKS" + DateTime.Now.ToString("yyMMddHHmmssffff"); Chain.BLL.SysUser bllUser = new Chain.BLL.SysUser(); Chain.Model.SysUser modelUser = bllUser.GetModel(int.Parse(this.Session["userid"].ToString())); Chain.Model.SysShop modelShop = new Chain.BLL.SysShop().GetModel(modelUser.UserShopID); this.txtShopID.Value = modelUser.UserShopID.ToString(); this.txtUserID.Value = modelUser.UserID.ToString(); } else { base.Response.Redirect("login.aspx"); } } }
public bool Login(string Account, string Pwd) { Chain.BLL.SysUser bll = new Chain.BLL.SysUser(); Chain.Model.SysUser model = bll.CheckUserLogin(Account, DESEncrypt.Encrypt(Pwd)); bool result; if (model != null && !model.UserLock) { Chain.Model.SysShop shop = new Chain.BLL.SysShop().GetModel(model.UserShopID); if (shop != null && !shop.ShopState) { this.IsLoggedOn = true; this.LoginUser = model; this._lastUpdateTime = DateTime.Now; string code = this.Encode(model, this._lastUpdateTime); this.LoginIn(code); result = true; return(result); } } result = false; return(result); }
public static void MEMPointRate(Chain.Model.Mem mem, int point, string OrderAccount, int pointType, int UserID, int UserShopID) { if (PubFunction.curParameter.chkPointLevel) { Chain.Model.PointRate PointRateModel = new Chain.BLL.PointRate().GetPointRate(); if (PointRateModel != null) { MEMPointUpdate.RateLevel = PointRateModel.PointRateLevel; MEMPointUpdate.RateType = PointRateModel.PointRateType; MEMPointUpdate.NowRateLevel = 1; MEMPointUpdate.MEMRate[0] = PointRateModel.MemLevel1; MEMPointUpdate.MEMRate[1] = PointRateModel.MemLevel2; MEMPointUpdate.MEMRate[2] = PointRateModel.MemLevel3; MEMPointUpdate.MEMRate[3] = PointRateModel.MemLevel4; MEMPointUpdate.MEMRate[4] = PointRateModel.MemLevel5; MEMPointUpdate.MEMRate[5] = PointRateModel.MemLevel6; MEMPointUpdate.MEMRate[6] = PointRateModel.MemLevel7; MEMPointUpdate.MEMRate[7] = PointRateModel.MemLevel8; MEMPointUpdate.MEMRate[8] = PointRateModel.MemLevel9; MEMPointUpdate.MEMRate[9] = PointRateModel.MemLevel10; MEMPointUpdate.MEMRate[10] = PointRateModel.MemLevel11; MEMPointUpdate.MEMRate[11] = PointRateModel.MemLevel12; MEMPointUpdate.MEMRate[12] = PointRateModel.MemLevel13; MEMPointUpdate.MEMRate[13] = PointRateModel.MemLevel14; MEMPointUpdate.MEMRate[14] = PointRateModel.MemLevel15; MEMPointUpdate.MEMCard = mem.MemCard; MEMPointUpdate.MEMName = mem.MemName; MEMPointUpdate.PointOrderCode = OrderAccount; Chain.Model.SysUser User = new Chain.BLL.SysUser().GetModel(UserID); if (User != null) { MEMPointUpdate.PointRateUpdate(mem, point, pointType, mem.MemID, User, OrderAccount); string remark = ""; switch (pointType) { case -1: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员商品消费退货,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 0: case 4: break; case 1: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员商品消费,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 2: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员快速消费,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 3: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员充次,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 5: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员注册,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 6: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员手动增加积分,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; default: switch (pointType) { case 14: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员充时,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; case 15: remark = string.Concat(new object[] { "单号:[", OrderAccount, "],会员充值,多级推荐扣除运营商积分:[", MEMPointUpdate.sumPoint, "]" }); break; } break; } PubFunction.SetShopPoint(User.UserID, UserShopID, 1, MEMPointUpdate.sumPoint, remark, 2); MEMPointUpdate.sumPoint = 0; } } } }