private void GetStaffClassList(string strSql) { Chain.BLL.SysRotateCount bllStaffClass = new Chain.BLL.SysRotateCount(); int Counts = this.NetPagerParameter.RecordCount; DataTable dtStaffClass = bllStaffClass.GetListSP(this.NetPagerParameter.PageSize, this.NetPagerParameter.CurrentPageIndex, out Counts, new string[] { strSql }).Tables[0]; this.NetPagerParameter.RecordCount = Counts; this.NetPagerParameter.CustomInfoHTML = string.Format("<div class=\"results\"><span>当前第{0}/{1}页 共{2}条记录 每页{3}条</span></div>", new object[] { this.NetPagerParameter.CurrentPageIndex, this.NetPagerParameter.PageCount, this.NetPagerParameter.RecordCount, this.NetPagerParameter.PageSize }); this.gvSysRotateCountList.DataSource = dtStaffClass; this.gvSysRotateCountList.DataBind(); PageBase.BindSerialRepeater(this.gvSysRotateCountList, this.NetPagerParameter.PageSize * (this.NetPagerParameter.CurrentPageIndex - 1)); }
private void BinRotateInfo(int RotateID, int MemID) { Chain.Model.SysRotate modelSysRotate = this.bllSysRotate.GetModel(RotateID); if (modelSysRotate.RotateID != 0) { if (modelSysRotate.ImageUrl != null && modelSysRotate.ImageUrl.ToString() != "") { this.spImageUrl.InnerHtml = modelSysRotate.ImageUrl; } this.spPersonTotalCount.InnerHtml = modelSysRotate.PersonTotalCount.ToString(); this.spPersonDayCount.InnerHtml = modelSysRotate.PersonDayCount.ToString(); this.spRotateCount.InnerHtml = modelSysRotate.RotateCount.ToString(); this.spStartTime.InnerHtml = modelSysRotate.StartTime.ToString("yyyy-MM-dd"); this.spEndTime.InnerHtml = modelSysRotate.EndTime.ToString("yyyy-MM-dd"); this.spRotateDesc.InnerHtml = modelSysRotate.RotateRemark.ToString(); this.spOneName.InnerHtml = modelSysRotate.OneName; this.spTwoName.InnerHtml = modelSysRotate.TwoName; this.spThreeName.InnerHtml = modelSysRotate.ThreeName; this.spFourName.InnerHtml = modelSysRotate.FourName; this.spFiveName.InnerHtml = modelSysRotate.FiveName; this.spSixName.InnerHtml = modelSysRotate.SixName; this.spOnePrizeName.InnerHtml = modelSysRotate.OnePrizeName; this.spTwoPrizeName.InnerHtml = modelSysRotate.TwoPrizeName; this.spThreePrizeName.InnerHtml = modelSysRotate.ThreePrizeName; this.spFourPrizeName.InnerHtml = modelSysRotate.FourPrizeName; this.spFivePrizeName.InnerHtml = modelSysRotate.FivePrizeName; this.spSixPrizeName.InnerHtml = modelSysRotate.SixPrizeName; this.spOneRate.InnerHtml = modelSysRotate.OneRate.ToString(); this.spTwoRate.InnerHtml = modelSysRotate.TwoRate.ToString(); this.spThreeRate.InnerHtml = modelSysRotate.ThreeRate.ToString(); this.spFourRate.InnerHtml = modelSysRotate.FourRate.ToString(); this.spFiveRate.InnerHtml = modelSysRotate.FiveRate.ToString(); this.spSixRate.InnerHtml = modelSysRotate.SixRate.ToString(); this.spIsWinOne.InnerHtml = modelSysRotate.IsWinOne.ToString(); Chain.BLL.SysRotateCount bllSysRotateCount = new Chain.BLL.SysRotateCount(); DataTable dt = bllSysRotateCount.GetList(" RotateID=" + RotateID).Tables[0]; this.txtMemTotalCount.Value = "0"; for (int i = 0; i < dt.Rows.Count; i++) { string starttime = DateTime.Parse(dt.Rows[i]["StartTime"].ToString()).ToString("yyyy-MM-dd"); string endtime = DateTime.Parse(dt.Rows[i]["endTime"].ToString()).ToString("yyyy-MM-dd"); int count = int.Parse(dt.Rows[i]["RotateCount"].ToString()); int memID = int.Parse(this.txtMemID.Value); decimal costamount = decimal.Parse(dt.Rows[i]["CostAmount"].ToString()); decimal amount = bllSysRotateCount.GetMemCountCostAmount(starttime, endtime, MemID); decimal amount2 = bllSysRotateCount.GetMemOrderLogCostAmount(starttime, endtime, MemID); decimal amount3 = bllSysRotateCount.GetMemStorageTimingCostAmount(starttime, endtime, MemID); decimal amount4 = amount + amount2 + amount3; if (amount4 >= costamount) { this.txtMemTotalCount.Value = count.ToString(); break; } } Chain.BLL.SysRotatePrizeLog bllSysRotatePrizeLog = new Chain.BLL.SysRotatePrizeLog(); int getcount = bllSysRotatePrizeLog.GetRecordCount(string.Concat(new object[] { "MemID=", int.Parse(this.txtMemID.Value), " and RotateID=", int.Parse(this.txtRotateID.Value) })); int hasWinCount = bllSysRotatePrizeLog.GetRecordCount(string.Concat(new object[] { "MemID=", int.Parse(this.txtMemID.Value), " and PrizeLevel<>'未中奖' and RotateID=", int.Parse(this.txtRotateID.Value) })); this.spWinCount.InnerHtml = hasWinCount.ToString(); if (this.txtMemTotalCount.Value != "0") { this.spNoUseCount.InnerHtml = (int.Parse(this.txtMemTotalCount.Value) - getcount).ToString(); } if (modelSysRotate.OneMobile != null && modelSysRotate.OneMobile.ToString() != "") { string[] strOneMobileList = modelSysRotate.OneMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int a = 0; a < strOneMobileList.Length; a++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strOneMobileList[a]); if (strMemID == MemID) { this.spIsOne.InnerHtml = "1"; break; } } } if (modelSysRotate.TwoMobile != null && modelSysRotate.TwoMobile.ToString() != "") { string[] strTwoMobileList = modelSysRotate.TwoMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int b = 0; b < strTwoMobileList.Length; b++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strTwoMobileList[b]); if (strMemID == MemID) { this.spIsTwo.InnerHtml = "1"; break; } } } if (modelSysRotate.ThreeMobile != null && modelSysRotate.ThreeMobile.ToString() != "") { string[] strThreeMobileList = modelSysRotate.ThreeMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int c = 0; c < strThreeMobileList.Length; c++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strThreeMobileList[c]); if (strMemID == MemID) { this.spIsThree.InnerHtml = "1"; break; } } } if (modelSysRotate.FourMobile != null && modelSysRotate.FourMobile.ToString() != "") { string[] strFourMobileList = modelSysRotate.FourMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int d = 0; d < strFourMobileList.Length; d++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strFourMobileList[d]); if (strMemID == MemID) { this.spIsFour.InnerHtml = "1"; break; } } } if (modelSysRotate.FiveMobile != null && modelSysRotate.FiveMobile.ToString() != "") { string[] strFiveMobileList = modelSysRotate.FiveMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int e = 0; e < strFiveMobileList.Length; e++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strFiveMobileList[e]); if (strMemID == MemID) { this.spIsFive.InnerHtml = "1"; break; } } } if (modelSysRotate.SixMobile != null && modelSysRotate.SixMobile.ToString() != "") { string[] strSixMobileList = modelSysRotate.SixMobile.Trim(new char[] { ',' }).Split(new char[] { ',' }); for (int f = 0; f < strSixMobileList.Length; f++) { int strMemID = new Chain.BLL.Mem().GetMemIDByMobile(strSixMobileList[f]); if (strMemID == MemID) { this.spIsSix.InnerHtml = "1"; break; } } } } }