protected void BindData() { if (!String.IsNullOrEmpty(txtPhoneNumber.Text) && !PhoneRechargeBLL.CheckPhoneNumber(txtPhoneNumber.Text)) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("006545", "手机号码格式错误") + "!')</script>"); return; } this.Pager1.Visible = true; string number = Session["Member"].ToString(); string strwhere = " "; if (dllState.SelectedValue != "-1") { strwhere += " and AddState=" + dllState.SelectedValue + " "; } if (!String.IsNullOrEmpty(txtPhoneNumber.Text)) { strwhere += " and PhoneNumber=" + txtPhoneNumber.Text + " "; } BLL.Registration_declarations.PagerParmsInit model = PhoneRechargeBLL.FindPhoneRecharge(strwhere); this.Pager1.ControlName = "gv_browOrder"; this.Pager1.key = model.Key; this.Pager1.PageColumn = model.PageColumn; this.Pager1.Pageindex = 0; this.Pager1.PageTable = model.PageTable; this.Pager1.Condition = model.SqlWhere; this.Pager1.PageSize = model.PageSize; this.Pager1.PageCount = 0; this.Pager1.PageBind(); Translate(); }
protected void QueryWhere(string number, int volume, string condition, string compare, string content) { string strwhere = " and assister='" + Session["Member"].ToString() + "' and isagain=0 and DefrayState>-2 "; BLL.Registration_declarations.PagerParmsInit model = bll.GetMemberOrderList(condition, compare, content, strwhere); if (type == 1) { if (Request.QueryString["dd"] != null) { model.SqlWhere = model.SqlWhere + " and Convert(varchar,RegisterDate,23) ='" + Request.QueryString["dd"].ToString() + "'"; } } else { model.SqlWhere = model.SqlWhere + " and B.OrderExpectNum=" + volume + ""; } if (model.ErrInfo != null) { ScriptHelper.SetAlert(Page, model.ErrInfo); } else { } }
/// <summary> /// 数据绑定 /// </summary> /// <returns></returns> public PagerParmsInit QueryWhere(string storeId, int maxExcept) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "A.RegisterDate"; model.ControlName = "gv_browOrder"; model.PageTable = "MemberInfo as A,MemberOrder as B"; model.PageColumn = @"A.Error as Error2, A.ExpectNum as ExpectNum,A.Placement as Placement,A.Direct as Direct,A.[name] as name2,A.RegisterDate as 'RegisterDate',B.* ,case when B.isAgain=0 then '首次消费' when B.isAgain = 3 then '会员报单' when B.isAgain = 5 then '首次团购' else ' ' end as fuxiaoName, case when B.DefrayState = 0 then '<font color=red>未支付</font>' when B.DefrayState = 1 then '<font color=green>已支付</font>' else ' ' end as zhifu, (select top 1 A2.Name from MemberInfo as A2 Where A.Placement=A2.number) as PlaceName, (select top 1 A3.Name from MemberInfo as A3 Where A.Direct=A3.number) as DerictName"; model.SqlWhere = " B.Number=A.Number and A.StoreID='" + storeId + "' and A.isbatch = 1 and B.ordertype = 0 and A.ExpectNum=" + maxExcept; return(model); }
protected void QueryWhere(string number, int volume, string condition, string compare, string content) { string strwhere = " and assister='" + Session["Member"].ToString() + "' and isagain=0 and DefrayState>-2 "; //if (rdbtnType.SelectedValue != "-1") //{ // strwhere += " and DefrayState=" + rdbtnType.SelectedValue + " "; //} //this.Pager1.Visible = true; BLL.Registration_declarations.PagerParmsInit model = bll.GetMemberOrderList(condition, compare, content, strwhere); if (type == 1) { if (Request.QueryString["dd"] != null) { model.SqlWhere = model.SqlWhere + " and Convert(varchar,RegisterDate,23) ='" + Request.QueryString["dd"].ToString() + "'"; } } else { model.SqlWhere = model.SqlWhere + " and B.OrderExpectNum=" + volume + ""; } if (model.ErrInfo != null) { ScriptHelper.SetAlert(Page, model.ErrInfo); } else { //this.Pager1.ControlName = "rep"; //this.Pager1.key = model.Key; //this.Pager1.PageColumn = model.PageColumn; //this.Pager1.Pageindex = 0; //this.Pager1.PageTable = model.PageTable; //this.Pager1.Condition = model.SqlWhere; //this.Pager1.PageSize = model.PageSize; //this.Pager1.PageCount = 0; //this.Pager1.PageBind(); } //Translate(); }
protected void QueryWhere(string storeId, int volume, string condition, string compare, string content) { this.Pager1.Visible = true; //this.lbbaodanmoney.Text = new BLL.Registration_declarations.RegistermemberBLL().GetLeftRegisterMemberMoney(storeId); try { if (this.txtBox_OrderDateTimeEnd.Text.Trim() != "") { Convert.ToDateTime(txtBox_OrderDateTimeEnd.Text.Trim()); } if (this.txtBox_OrderDateTimeStart.Text.Trim() != "") { Convert.ToDateTime(txtBox_OrderDateTimeStart.Text.Trim()); } } catch { msg = "<script>alert('" + GetTran("000450", "日期格式输入错误!") + "');</scipt>"; return; } string endTime = this.txtBox_OrderDateTimeEnd.Text.Trim(); string startTime = this.txtBox_OrderDateTimeStart.Text.Trim(); string iszf = this.rtbiszf.SelectedValue; BLL.Registration_declarations.PagerParmsInit model = auditingMemberagainBLL.QueryWhere2(volume.ToString(), storeId, condition, compare, content, iszf, endTime, startTime); if (model.ErrInfo != null) { ScriptHelper.SetAlert(Page, model.ErrInfo); } else { // this.Pager1.PageBind(model.PageIndex, model.PageSize, model.PageTable, model.PageColumn, model.SqlWhere, model.Key, model.ControlName); //this.Pager1.PageSorting(1, model.PageSize, model.PageTable, model.PageColumn, model.SqlWhere, model.Key, model.ControlName); Pager1.PageBind(0, model.PageSize, model.PageTable, model.PageColumn, model.SqlWhere, model.Key, model.ControlName); } }
public PagerParmsInit QueryWhere(string volume, string storeId, string condition, string compare, string content, string iszf) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "A.ID"; model.ControlName = "gv_browOrder"; model.PageTable = "MemberInfo as A,MemberOrder as B,Currency"; if (volume.Equals("-1")) { model.SqlWhere = " B.PayCurrency=Currency.id and B.Number=A.Number and B.OrderType=3 and B.IsAgain=0 and B.StoreID='" + storeId + "'"; } else { model.SqlWhere = " B.PayCurrency=Currency.id and B.Number=A.Number and B.OrderType=3 and B.IsAgain=0 and B.OrderExpectNum=" + volume + " and B.StoreID='" + storeId + "'"; } model.PageColumn = "IsReceivables,Currency.Name as paycrr,A.ID,A.Number,b.OrderID,A.StoreID,A.Name,A.PetName,B.totalMoney,B.totalPv,B.OrderExpectNum,B.PayExpectNum,B.DefrayType" + " ,A.RegisterDate,A.Remark,B.ordertype ,case when B.ordertype=0 then '0' when B.ordertype = 3 then '3' when B.ordertype = 4 then '4' else '5' end as RegisterWay, case when B.defraytype=1 then '1' when " + " B.defraytype = 2 then '2' when B.defraytype = 3 then '3' when B.defraytype = 4 then '4' else '5' end as defrayname, " + " case when B.DefrayState = 0 then '0' when B.DefrayState = 1 then '1' else '2' end as PayStatus,B.defrayState,B.lackproductmoney"; if (condition.Length > 0) { switch (compare.Trim()) { case "all": break; case "like": if (content.Length == 0) { model.ErrInfo = "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " like '%" + content + "%'"; } break; case "not like": if (content.Length == 0) { model.ErrInfo = "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " not like '%" + content + "%'"; } break; case "allErr": model.SqlWhere += " and " + condition + "<>''"; break; default: try { Convert.ToDouble(content); } catch { model.ErrInfo = "请输入数值!"; return(model); } model.SqlWhere += " and " + condition + compare + content; break; } } if (iszf != "-1") { model.SqlWhere += " and " + iszf; } return(model); }
public PagerParmsInit QueryWhereMember(string volume, string number, string condition, string compare, string content) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "A.registerDate"; model.ControlName = "gv_browOrder"; model.PageTable = "MemberInfo as A,MemberOrder as B"; model.PageColumn = "A.storeId as storeId,A.ID,A.Number,b.OrderID,A.StoreID,A.Name,A.PetName,case when B.Error='' then '0' end as Error,B.totalMoney,B.totalPv,B.OrderExpectNum,B.PayExpectNum,B.defraytype" + " ,A.RegisterDate,A.Remark,B.ordertype ,B.ordertype as RegisterWay, case when B.defraytype=1 then '1' when " + " B.defraytype = 2 then '2' when B.defraytype = 3 then '3' when B.defraytype = 4 then '4' else '5' end as defrayname, " + " case when B.DefrayState = 0 then '0' when B.DefrayState = 1 then '1' else '2' end as PayStatus,B.lackproductmoney,case defraystate when 1 then 1 else case paymentmoney when 0 then 0 else 1 end end as dpqueren,defraystate as gsqueren"; model.SqlWhere = " B.Number=A.Number and B.IsAgain=0 and A.Direct='" + number + "' and B.orderType=3"; if (condition.Length > 0) { switch (compare.Trim()) { case "all": break; case "like": if (content.Length == 0) { model.ErrInfo = this.GetTran("000959", "请输入字符!"); // "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " like '%" + content + "%'"; } break; case "not like": if (content.Length == 0) { model.ErrInfo = this.GetTran("000959", "请输入字符"); // "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " not like '%" + content + "%'"; } break; case "allErr": model.SqlWhere += " and " + condition + "<>''"; break; default: try { Convert.ToDouble(content); } catch { model.ErrInfo = this.GetTran("000969", "请输入数值"); //"请输入数值!"; return(model); } model.SqlWhere += " and " + condition + compare + content; break; } } return(model); }
/// <summary> /// 获取会员报单列表 /// </summary> /// <param name="condition">列名</param> /// <param name="compare">运算符</param> /// <param name="content">值</param> /// <param name="sqlwhere">附加条件</param> /// <returns></returns> public PagerParmsInit GetMemberOrderList(string condition, string compare, string content, string sqlwhere) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "A.registerDate"; model.ControlName = "gv_browOrder"; model.PageTable = "MemberInfo as A,MemberOrder as B,city c"; model.PageColumn = "B.SendWay,A.ID,A.Number,b.OrderID,A.StoreID,A.Name,A.PetName,case when B.Error='' then '0' end as Error,B.totalMoney,B.totalPv,B.OrderExpectNum,B.PayExpectNum,B.defraytype" + " ,A.RegisterDate,A.Remark,B.ordertype ,B.ordertype ,c.country,c.province,city,xian, B.defraystate,a.mobiletele, a.papertypecode,papernumber,sendway,sendtype,direct,placement," + " B.DefrayState,B.lackproductmoney"; model.SqlWhere = " B.Number=A.Number and c.cpccode=a.cpccode "; model.SqlWhere += sqlwhere; if (condition.Length > 0) { switch (compare.Trim()) { case "all": break; case "like": if (content.Length == 0) { model.ErrInfo = this.GetTran("000959", "请输入字符!"); // "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " like '%" + content + "%'"; } break; case "not like": if (content.Length == 0) { model.ErrInfo = this.GetTran("000959", "请输入字符"); // "请输入字符!"; return(model); } else { model.SqlWhere += " and " + condition + " not like '%" + content + "%'"; } break; case "allErr": model.SqlWhere += " and " + condition + "<>''"; break; default: try { Convert.ToDouble(content); } catch { model.ErrInfo = this.GetTran("000969", "请输入数值"); //"请输入数值!"; return(model); } model.SqlWhere += " and " + condition + compare + content; break; } } return(model); }
public PagerParmsInit QueryWhere(string volume, string storeId, string condition, string compare, string content, string iszf) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "MO.ID"; model.ControlName = "gv_browOrder"; model.PageColumn = "MO.id,MO.ElectronicAccountID,MO.OrderExpectNum,MO.OrderType,case when MO.DefrayState = 0 then '" + BLL.Translation.Translate("000521", "未支付") + "' when MO.DefrayState = 1 then '" + BLL.Translation.Translate("000517", "已支付") + "' else '" + BLL.Translation.Translate("001416", "未知") + "' end as PayStatus,case when MO.defraytype=1 then '" + BLL.Translation.Translate("001558", "现金") + "' when " + " MO.defraytype = 2 then '" + BLL.Translation.Translate("001672", "电子转帐") + "' when MO.defraytype = 3 then '" + BLL.Translation.Translate("000983", "快钱") + "' when MO.defraytype = 4 then '" + BLL.Translation.Translate("001582", "银行汇款") + "' else '" + BLL.Translation.Translate("001416", "未知") + "' end as defrayname,MO.defraytype,MO.StoreID,MO.OrderID,MI.Number,MI.RegisterDate,MI.Remark,MI.Name,Mo.TotalMoney,MO.TotalPv,MO.IsReceivables,Currency.Name as paycrr,MO.defrayState "; model.PageTable = "MemberOrder as MO ,MemberInfo as MI,Currency"; if (volume.Equals("-1")) { model.SqlWhere = "MO.PayCurrency=Currency.id and MO.Number=MI.Number and MO.OrderType=2 and MO.IsAgain=1 and MO.storeID='" + storeId + "' "; } else { model.SqlWhere = "MO.PayCurrency=Currency.id and MO.Number=MI.Number and MO.OrderType=2 and MO.IsAgain=1 and MO.storeID='" + storeId + "' and MO.OrderExpectNum=" + volume; } if (condition.Length > 0) { switch (compare.Trim()) { case "all": break; case "like": if (content.Length == 0) { model.ErrInfo = BLL.Translation.Translate("001662", "请输入字符!"); return(model); } else { model.SqlWhere += " and " + condition + " like '%" + content + "%'"; } break; case "not like": if (content.Length == 0) { model.ErrInfo = BLL.Translation.Translate("001662", "请输入字符!"); return(model); } else { model.SqlWhere += " and " + condition + " not like '%" + content + "%'"; } break; case "allErr": model.SqlWhere += " and " + condition + "<>''"; break; default: try { Convert.ToDouble(content); } catch { model.ErrInfo = BLL.Translation.Translate("001665", "请输入数值!"); return(model); } model.SqlWhere += " and " + condition + compare + content; break; } } if (iszf != "-1") { model.SqlWhere += " and " + iszf; } return(model); }
public PagerParmsInit QueryWhere(string volume, string storeId, string condition, string compare, string content, string iszf) { PagerParmsInit model = new PagerParmsInit(); model.PageIndex = 0; model.PageSize = 10; model.Key = "B.OrderDate desc"; model.ControlName = "gv_browOrder"; model.PageTable = "MemberInfo as A,MemberOrder as B"; model.PageColumn = "B.DefrayType,B.OrderType,B.remark,B.totalPv,B.totalMoney,B.PayExpectNum,B.orderExpectNum,B.number,B.OrderID,A.name,A.PetName, B.OrderDate," + " case when B.ordertype=1 then '" + BLL.Translation.Translate("001445", "店铺复消") + "'" + " when B.ordertype = 2 then '" + BLL.Translation.Translate("001448", "网上购物") + "'" + " when B.ordertype = 5 then '" + BLL.Translation.Translate("001454", "特殊报单") + "'" + " else '' " + " end as fuxiaoName, " + " case when B.defraytype=1 then '" + BLL.Translation.Translate("000699", "现金") + "'" + " when B.defraytype = 2 then '" + BLL.Translation.Translate("001672", "电子转帐") + "'" + " when B.defraytype = 3 then '" + BLL.Translation.Translate("000968", "支付宝") + "'" + " when B.defraytype = 4 then '" + BLL.Translation.Translate("000983", "快钱支付") + "'" + " else ''" + " end as defrayname, " + " case when B.DefrayState = 0 then '" + BLL.Translation.Translate("000521", "未支付") + "'" + " when B.DefrayState = 1 then '" + BLL.Translation.Translate("000517", "已支付") + "'" + " else ''" + " end as zhifu," + " case when B.Error = '' then '" + BLL.Translation.Translate("000221", "无") + "' end as Error," + " (select Name from MemberInfo as anzhiName where anzhiName.number=A.Placement) as anzhiName, " + " (select Name from MemberInfo as tuijianName where tuijianName.number=A.Direct) as tuijianName"; model.SqlWhere = " B.Number=A.Number and B.IsAgain = 1 and B.OrderExpectNum=" + volume + " and B.StoreID='" + storeId + "'"; if (condition.Length > 0) { switch (compare.Trim()) { case "all": break; case "like": if (content.Length == 0) { model.ErrInfo = BLL.Translation.Translate("001662", "请输入字符!"); return(model); } else { model.SqlWhere += " and " + condition + " like '%" + content + "%'"; } break; case "not like": if (content.Length == 0) { model.ErrInfo = BLL.Translation.Translate("001662", "请输入字符!"); return(model); } else { model.SqlWhere += " and " + condition + " not like '%" + content + "%'"; } break; case "allErr": model.SqlWhere += " and " + condition + "<>''"; break; default: try { Convert.ToDouble(content); } catch { model.ErrInfo = BLL.Translation.Translate("001665", "请输入数值!"); return(model); } model.SqlWhere += " and " + condition + compare + content; break; } } if (iszf != "-1") { model.SqlWhere += " and " + iszf; } return(model); }