예제 #1
0
        private void GetStructure(string mid, int level, StringBuilder sb)
        {
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(string.Format("MSH='{0}' and MID<>'{0}' and RoleCode = 'VIP' order by MCreateDate", mid));

            if (level > 0)
            {
                sb.Append("<ul>");
                for (int i = 0; i < ListMember.Count; i++)
                {
                    string colors = "";
                    if (ListMember[i].MState)
                    {
                        colors = ListMember[i].MAgencyType.MColor;
                    }
                    else
                    {
                        colors = "#FF5151";
                    }
                    sb.AppendFormat(tempMysb, ListMember[i].MID, ListMember[i].MID, ListMember[i].Role.RName, colors, BLL.Member.GetOnlineInfo(ListMember[i].MID), GetMemberType(ListMember[i]));

                    GetStructure(ListMember[i].MID, level - 1, sb);
                    sb.Append("</li>");
                }
                sb.Append("</ul>");
            }
        }
예제 #2
0
        /// <summary>
        /// 更新基本资料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override string btnModify_Click()
        {
            Hashtable MyHs = new Hashtable();

            if (Request.Form["chkCloseAll"] == "on" || Request.Form["chkClockAll"] == "on")
            {
                List <Model.Member> list = BllModel.GetMemberEntityList("MID in (select mid from getTreeBuyMID('" + MemberModel.MID + "'))");
                foreach (Model.Member item in list)
                {
                    if (Request.Form["chkCloseAll"] == "on")
                    {
                        item.IsClose = MemberModel.IsClose;
                        item.IsClock = MemberModel.IsClock;
                    }
                    if (Request.Form["chkClockAll"] == "on")
                    {
                        item.IsClock = MemberModel.IsClock;
                    }
                    BllModel.Update(item, MyHs);
                }
            }

            BllModel.Update(MemberModel, MyHs);
            BLL.Member.UpdateConfigTran(MemberModel.MID, "EPXingCount", MemberModel.MConfig.EPXingCount.ToString(), null, true, System.Data.SqlDbType.Int, MyHs);
            //更新会员的密保问题
            UpdateQuestion(MemberModel.ID.ToString(), MyHs);

            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                return("操作成功");
            }
            return("操作失败");
        }
예제 #3
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1'  AND ROLECODE='SiJi' ";

            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' ) ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["SiJiType"]))
            {
                strWhere += string.Format(" and FMID={0} ", (context.Request["SiJiType"]));
            }

            string SQL2 = " ";

            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                SQL2 += " and  CreateDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                SQL2 += " and CreateDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }

            string TState = "";

            if (!string.IsNullOrEmpty(context.Request["TType"]))
            {
                if (context.Request["TType"] == "1")
                {
                    TState = " and TState=1 ";
                }
                else
                {
                    TState = " and TState in(-1,0) ";
                }
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(GetCountByCPCode(SQL2, ListMember[i].MID, 1, TState) + "~");
                sb.Append(GetCountByCPCode(SQL2, ListMember[i].MID, 2, TState) + "");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #4
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "MState='1'";
            string mKey     = "";

            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mKey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!TModel.Role.IsAdmin)
            {
                mKey = TModel.MID;
            }
            if (!string.IsNullOrEmpty(mKey))
            {
                strWhere += string.Format(" and FMID='{0}' ", mKey);
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].SHMoney + "~");
                sb.Append(ListMember[i].MConfig.MJJ + "~");
                sb.Append(ListMember[i].MConfig.MJB + "~");
                sb.Append(ListMember[i].MConfig.MCW + "~");
                sb.Append((ListMember[i].IsClose ? "已锁定" : "未锁定") + "~");
                sb.Append((ListMember[i].IsClock ? "已冻结" : "未冻结") + "~");
                sb.Append(ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append("<a href='" + HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/Default.aspx") + "?id=" + ListMember[i].MID + "'>进入系统</a>");
                sb.Append("≌");
            }
            var info = new { PageData = sb.ToString(), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #5
0
        private void GetStructure(string mid, List <sys_Tree> tree)
        {
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(string.Format("MTJ='{0}' and MID<>'{0}' order by MDate", mid));

            for (int i = 0; i < ListMember.Count; i++)
            {
                //string colors = "";
                //colors = ListMember[i].MAgencyType.MColor;
                //bool parent = isParent(ListMember[i].MID);
                tree.Add(GetTreeByMember(ListMember[i], isParent(ListMember[i].MID)));
            }
        }
예제 #6
0
        private bool isParent(string mid)
        {
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(string.Format("MTJ='{0}' and MID<>'{0}' order by MDate", mid));

            if (ListMember != null && ListMember.Any())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #7
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string strWhere = " RoleCode in (" + RoleCode + ")";

            strWhere += " and '1'='1' ";
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                if (context.Request["tState"] == "001")
                {
                    strWhere += " and AgencyCode='" + context.Request["tState"] + "' and MTJ='" + memberModel.MID + "' ";
                }
                else
                {
                    strWhere += " and AgencyCode<>'001' and MTJ='" + memberModel.MID + "' ";
                }
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + BLL.Member.GetOnlineInfo(ListMember[i].MID) + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].NewSHMoney.NName + "~");
                sb.Append(ListMember[i].QQ + "~");
                //sb.Append(ListMember[i].Email + "~");
                sb.Append(ListMember[i].Tel + "~");
                sb.Append(ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append(ListMember[i].MDate.Year == DateTime.MaxValue.Year ? "未升级" : ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #8
0
        /// <summary>
        /// 更新基本资料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override string btnModify_Click()
        {
            string error = "";

            if (string.IsNullOrEmpty(error))
            {
                if (Request.Form["txtBankNumber"].Trim() != null)
                {
                    List <Model.Member> list1 = BllModel.GetMemberEntityList("BankNumber='" + Request.Form["txtBankNumber"].Trim() + "' and MID <> '" + TModel.MID + "'");
                    if (list1.Count > 0)
                    {
                        error += "该银行卡已绑定,请更换其它帐号";
                        return(error);
                    }
                }
                //if (Request.Form["txtAliPay"].Trim() != null)
                //{
                //    List<Model.Member> list2 = BllModel.GetMemberEntityList("Alipay='" + Request.Form["txtAliPay"].Trim() + "' and MID <> '" + TModel.MID + "'");
                //    if (list2.Count > 0)
                //    {
                //        error += "该支付宝已绑定,请更换其它帐号";
                //        return error;
                //    }
                //}
                Model.Member m = BLL.Member.GetModelByMID(MemberModel.MID);
                if (!m.ZDStatus && MemberModel.ZDStatus)
                {
                    return("防撞单关闭后不可再次开启");
                }


                if (!BLL.Member.getCardNameCount(MemberModel))
                {
                    return("三代内不能有同名开户账号");
                }

                Hashtable hs = new Hashtable();
                BllModel.Update(MemberModel, hs);
                BLL.Member.UpdateConfigTran(MemberModel.MID, "HLMoneyState", MemberModel.MConfig.HLMoneyState.ToString(), null, true, System.Data.SqlDbType.Bit, hs);

                if (BLL.CommonBase.RunHashtable(hs))
                {
                    return("1");
                }
                return("操作失败");
            }
            return(error);
        }
예제 #9
0
        /// <summary>
        /// 更新基本资料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override string btnModify_Click()
        {
            string error = "";

            if (string.IsNullOrWhiteSpace(MemberModel.Province))
            {
                return("省不能为空");
            }
            if (string.IsNullOrWhiteSpace(MemberModel.City))
            {
                return("市不能为空");
            }

            if (BLL.WebBase.Model.TelVerify)
            {
                List <Model.Member> list = BllModel.GetMemberEntityList("Tel='" + Request.Form["txtTel"].Trim() + "' and MID<>'" + TModel.MID + "'");
                if (list.Count > 0)
                {
                    error += "该手机号码已被绑定";
                }
                else
                {
                    //string code = BLL.SMS.GetSKeyBuyTel(Request.Form["txtTel"].Trim(), Model.SMSType.ZCYZ);
                    ////if ((string.IsNullOrEmpty(code) || code != Request.Form["txtTelCode"].Trim()) && !TModel.Role.Super)
                    //if ((string.IsNullOrEmpty(code) || code != Request.Form["txtTelCode"].Trim()))
                    //{
                    //    error += "手机验证码错误!";
                    //}
                }
            }
            if (string.IsNullOrEmpty(error))
            {
                if (BllModel.Update(MemberModel))
                {
                    BLL.OperationRecordBLL.Add(TModel.MID, ChangeType.O_XGZL, "修改资料");
                    return("操作成功");
                }
                return("操作失败");
            }
            return(error);
        }
예제 #10
0
        protected override string btnOther_Click()
        {
            string where = " 1=1 and MTJ='" + TModel.MID + "' ";

            string mkey = "";

            mkey = TModel.MID;

            List <Model.Member> listchange = null;

            listchange = BllModel.GetMemberEntityList(where, CurrentPage, ItemsPerPage, out totalCount);

            var list = listchange.Select(item => new
            {
                MID  = item.MID,
                MHB  = item.MConfig.MHB,
                MJB  = item.MConfig.MJB,
                Date = item.MState?item.MDate.ToString("yyyy-MM-dd"):item.MCreateDate.ToString("yyyy-MM-dd"),
            });

            return(jss.Serialize(new { Items = list, TotalCount = totalCount }));
        }
예제 #11
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";

            strWhere += " and MID in (select MID from MemberConfig where IsRegionalDirector=1)";
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                //sb.Append(ListMember[i].Province+ListMember[i].MConfig.Region.ToString() + "区~");
                sb.Append(ListMember[i].MID + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                Model.MemberApply obj = GetMemberApply(ListMember[i].MID, 2, 1);
                if (obj != null)
                {
                    sb.Append(obj.MQQ + "~");
                    sb.Append(obj.MQQGroup + "~");
                    sb.Append(obj.MTel + "~");
                    sb.Append(obj.ApplyTime.ToString("yyyy-MM-dd HH:mm") + "~");
                    sb.Append(Convert.ToDateTime(obj.ConfirmTime).ToString("yyyy-MM-dd HH:mm"));
                }
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #12
0
        public override void ProcessRequest(HttpContext context)
        {
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                return;
            }
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => emp.VState && !emp.IsAdmin).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += string.Format(" and MType={0} ", (context.Request["tState"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["RoleCode"]))
            {
                strWhere += " and RoleCode in ('" + context.Request["RoleCode"] + "') ";
            }
            else
            {
                strWhere += " and RoleCode in (" + RoleCode + ") ";
            }
            if (!string.IsNullOrEmpty(context.Request["JXType"]))
            {
                if (context.Request["JXType"] == "no")
                {
                    strWhere += " and JXType is NULL ";
                }
                else
                {
                    strWhere += " and JXType='" + context.Request["JXType"] + "'";
                }
            }
            if (!string.IsNullOrEmpty(context.Request["IsClose"]))
            {
                strWhere += " and IsClose='" + context.Request["IsClose"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["IsClock"]))
            {
                strWhere += " and IsClock='" + context.Request["IsClock"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["AgencyCode"]))
            {
                strWhere += " and AgencyCode='" + context.Request["AgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["NAgencyCode"]))
            {
                strWhere += " and NAgencyCode='" + context.Request["NAgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["ddlPCode"]))
            {
                strWhere += " and (select PCode from MemberConfig where MID=Member.MID)='" + context.Request["ddlPCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["OnlyOnLine"]))
            {
                strWhere += " and mid in ('" + String.Join("','", BLL.Member.OnLineMember.ToArray()) + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlRegion"]))
            {
                strWhere += " and Country = ('" + context.Request["ddlRegion"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlProvince"]))
            {
                strWhere += " and Province = ('" + context.Request["ddlProvince"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlCity"]))
            {
                strWhere += " and City = ('" + context.Request["ddlCity"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlZone"]))
            {
                strWhere += " and Zone = ('" + context.Request["ddlZone"] + "') ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                if (ListMember[i].Role.CanSH)
                {
                    sb.Append("<a href='javascript:void(0)' onclick=\"callhtml('/ProjectManage/MProjectList.aspx?bmmid=" + ListMember[i].MID + "','项目进度查询');onclickMenu()\"><span style='color:red;'>" + ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "</span></a>" + "~");
                }
                else
                {
                    sb.Append(ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "~");
                }
                string rostr = "";
                if (!string.IsNullOrEmpty(ListMember[i].FMID))
                {
                    rostr = ListMember[i].FMID.ToString().Replace("0", "检测机构登记证书").Replace("1", "个人身份证").Replace("1", "其他");
                }
                sb.Append(ListMember[i].MName + "~");
                sb.Append((ListMember[i].Role.RName + "~"));
                sb.Append(ListMember[i].Tel + "~");
                sb.Append((ListMember[i].RoleCode == "DW" ? "" : ListMember[i].NumID) + "[" + rostr + "]" + "~");
                sb.Append((ListMember[i].IsClose ? "已锁定" : "未锁定") + "~");
                //sb.Append((ListMember[i].IsClock ? "已冻结" : "未冻结") + "~");


                sb.Append(ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append(ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm") + "~");
                if (!ListMember[i].MState)
                {
                    if (!ListMember[i].FHState)
                    {
                        sb.Append("<a class='btn' href=\"javascript:SHAuto('" + ListMember[i].MID + "')\">审核</a>");
                        sb.Append("<a class='pay btn btn-warning' href=\"javascript:ReAuto('" + ListMember[i].MID + "')\">不通过</a>");
                    }
                    else
                    {
                        sb.Append("<span style='color:red;'>审核不通过,原因:" + ListMember[i].Country + "</span>");
                    }
                }
                else
                {
                    if (ListMember[i].FHState)
                    {
                        sb.Append("<span style='color:green;'>审核不通过,原因:" + ListMember[i].Country + "</span>");
                    }
                    else
                    {
                        sb.Append("<span style='color:green;'>正常</span>");
                    }
                }
                sb.Append("≌");
                sb.Append("≠");
                ////数量
                sb.Append("10");
                sb.Append("≠");

                sb.Append("地址:" + ListMember[i].Province + ListMember[i].City + ListMember[i].Zone + ListMember[i].Address);
                sb.Append("<br>邮编:" + ListMember[i].Alipay);
                sb.Append("<br>联系人:" + ListMember[i].BankCardName);
                sb.Append("<br>电话:" + ListMember[i].Tel);
                sb.Append("<br>传真:" + ListMember[i].QQ);
                sb.Append("<br>电子邮件:" + ListMember[i].Email);

                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #13
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string strWhere = "RoleCode in (" + RoleCode + ")";

            string sh = " and AgencyCode='001' ";

            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                if (context.Request["tState"] == "true")
                {
                    sh = " and AgencyCode<>'001' ";

                    if (!TModel.Role.Super)
                    {
                        sh += " and MSH = '" + TModel.MID + "'";
                    }
                }
                else
                {
                    sh = " and AgencyCode='001' ";
                }
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MCreateDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MCreateDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlRegion"]))
            {
                strWhere += " and Country = ('" + context.Request["ddlRegion"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlProvince"]))
            {
                strWhere += " and Province = ('" + context.Request["ddlProvince"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlCity"]))
            {
                strWhere += " and City = ('" + context.Request["ddlCity"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlZone"]))
            {
                strWhere += " and Zone = ('" + context.Request["ddlZone"] + "') ";
            }
            //strWhere += " and RegistAgency = 0 ";

            //Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!TModel.Role.Super)
            {
                strWhere += string.Format(" and MSH='{0}' ", TModel.MID);
            }
            else
            {
                if (!string.IsNullOrEmpty(context.Request["mSHKey"]))
                {
                    strWhere += string.Format(" and MSH='{0}' ", context.Request["mSHKey"]);
                }
            }

            //if (!TModel.Role.Super)
            //{
            //    strWhere += " and MID in (select * from dbo.GetAllSubBDMember('" + TModel.MID + "'))";
            //}

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere + sh, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + BLL.Member.GetOnlineInfo(ListMember[i].MID) + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].Tel + "~");
                //sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].MTJ + "~");
                //sb.Append((ListMember[i].MState ? ListMember[i].MSH : "") + "~");
                //sb.Append(ListMember[i].MSH + "~");
                sb.Append(ListMember[i].NumID + "~");
                if (!string.IsNullOrEmpty(ListMember[i].Address))
                {
                    foreach (var pic in ListMember[i].Address.Split('≌'))
                    {
                        if (!string.IsNullOrEmpty(pic))
                        {
                            sb.Append("<a href=\"" + pic + "\" target=\"_blank\"><img alt=\"图片\" src=\"" + pic + "\" style=\"width: 60px;height: 60px\" /></a>");
                        }
                    }
                }
                sb.Append("~");
                sb.Append((ListMember[i].MState ? "已审核" : "未审核") + "~");
                sb.Append(ListMember[i].MDate.Year == DateTime.MaxValue.Year ? ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") : ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #14
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string strWhere = " RoleCode in (" + RoleCode + ")";
            string mkey = "", mtjkey = "";

            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mkey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["mTJKey"]))
            {
                mtjkey = context.Request["mTJKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["mBDKey"]))
            {
                strWhere += " and MBD='" + context.Request["mBDKey"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += " and MState='" + context.Request["tState"] + "' ";
            }
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                if (!string.IsNullOrEmpty(mkey))
                {
                    mkey = memberModel.MID;
                }
                mtjkey = memberModel.MID;
            }
            if (!string.IsNullOrEmpty(mkey))
            {
                strWhere += " and MID='" + mkey + "' ";
            }
            if (!string.IsNullOrEmpty(mtjkey))
            {
                strWhere += " and MTJ='" + mtjkey + "' ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + BLL.Member.GetOnlineInfo(ListMember[i].MID) + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].Role.RName + "~");
                sb.Append(ListMember[i].MTJ + "~");
                if (ListMember[i].MConfig != null)
                {
                    sb.Append(ListMember[i].MConfig.TJCount + "~");
                    sb.Append(ListMember[i].MConfig.MJJ.ToFixedDecimal() + "~");
                    sb.Append(ListMember[i].MConfig.MJB.ToFixedDecimal() + "~");
                    //sb.Append(ListMember[i].MConfig.MCW.ToFixedDecimal() + "~");
                }
                else
                {
                    sb.Append("~~~~");
                }
                sb.Append((ListMember[i].MState ? "已激活" : "未激活") + "~");
                if (ListMember[i].MState)
                {
                    sb.Append(ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm"));
                }
                else
                {
                    sb.Append(ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm"));
                }
                //sb.Append("~");
                //sb.Append("<input class=\"btn btn-primary\" value=\"转出货币\" onclick=\"transferForm('" + ListMember[i].MID + "')\" type=\"button\">");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #15
0
        public override void ProcessRequest(HttpContext context)
        {
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                return;
            }
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => emp.VState && !emp.IsAdmin).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += string.Format(" and MType={0} ", (context.Request["tState"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["RoleCode"]))
            {
                strWhere += " and RoleCode in ('" + context.Request["RoleCode"] + "') ";
            }
            else
            {
                strWhere += " and RoleCode in (" + RoleCode + ") ";
            }
            if (!string.IsNullOrEmpty(context.Request["JXType"]))
            {
                if (context.Request["JXType"] == "no")
                {
                    strWhere += " and JXType is NULL ";
                }
                else
                {
                    strWhere += " and JXType='" + context.Request["JXType"] + "'";
                }
            }
            if (!string.IsNullOrEmpty(context.Request["IsClose"]))
            {
                strWhere += " and IsClose='" + context.Request["IsClose"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["IsClock"]))
            {
                strWhere += " and IsClock='" + context.Request["IsClock"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["AgencyCode"]))
            {
                strWhere += " and AgencyCode='" + context.Request["AgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["NAgencyCode"]))
            {
                strWhere += " and NAgencyCode='" + context.Request["NAgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["ddlPCode"]))
            {
                strWhere += " and (select PCode from MemberConfig where MID=Member.MID)='" + context.Request["ddlPCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["OnlyOnLine"]))
            {
                strWhere += " and mid in ('" + String.Join("','", BLL.Member.OnLineMember.ToArray()) + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlRegion"]))
            {
                strWhere += " and Country = ('" + context.Request["ddlRegion"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlProvince"]))
            {
                strWhere += " and Province = ('" + context.Request["ddlProvince"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlCity"]))
            {
                strWhere += " and City = ('" + context.Request["ddlCity"] + "') ";
            }
            if (!string.IsNullOrWhiteSpace(context.Request["ddlZone"]))
            {
                strWhere += " and Zone = ('" + context.Request["ddlZone"] + "') ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                if (ListMember[i].Role.CanSH)
                {
                    sb.Append("<span style='color:red;'>" + ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "</span>" + "~");
                }
                else
                {
                    sb.Append(ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "~");
                }
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].Role.RName + "~");
                //sb.Append(GetMemberType(ListMember[i]) + "~");
                sb.Append(ListMember[i].MConfig.MHB.ToFixedDecimal() + "~");
                //sb.Append(ListMember[i].MConfig.MJB.ToFixedDecimal() + "~");
                //sb.Append(ListMember[i].MTJ + "~");
                //sb.Append(ListMember[i].Province + ListMember[i].City + ListMember[i].Zone + "~");
                //sb.Append((ListMember[i].IsClose ? "已锁定" : "未锁定") + "~");
                //sb.Append((ListMember[i].IsClock ? "已冻结" : "未冻结") + "~");
                //if (!string.IsNullOrEmpty(ListMember[i].Address))
                //{
                //    foreach (var pic in ListMember[i].Address.Split('≌'))
                //    {
                //        if (!string.IsNullOrEmpty(pic))
                //        {
                //            sb.Append("<a href=\"" + pic + "\" target=\"_blank\"><img alt=\"图片\" src=\"" + pic + "\" style=\"width: 60px;height: 60px\" /></a>");
                //        }
                //    }
                //}
                //sb.Append("~");
                //sb.Append(ListMember[i].MConfig.SHMoney + "~");
                //sb.Append(ListMember[i].MConfig.YJMoney + "~");
                sb.Append(ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm") + "");
                //if (!ListMember[i].IsClose)
                //{
                //    sb.Append("<a href='?LoggedInMID=" + ListMember[i].MID + "' target=\"_blank\">进入会员系统</a>");
                //}
                //else
                //{
                //    sb.Append("限制登录");
                //}
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #16
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string        strWhere = "MState='1' and RoleCode in (" + RoleCode + ")";
            List <string> typeList = new List <string>();
            List <string> needTakeOff = new List <string>();
            string        startDate = "", endDate = "", mKey = "";

            if (!string.IsNullOrEmpty(context.Request["typeList"]))
            {
                string types = context.Request["typeList"].Remove(context.Request["typeList"].Length - 1);
                typeList = new List <string>(types.Split('|'));
            }
            if (!string.IsNullOrEmpty(context.Request["typeList"]))
            {
                string types = context.Request["typeList"].Remove(context.Request["typeList"].Length - 1);
                needTakeOff = new List <string>(types.Split('|'));
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", context.Request["mKey"]);
                mKey      = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                startDate = context.Request["startDate"];
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                endDate = context.Request["endDate"];
            }
            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);


            Dictionary <string, decimal> JJInfo;
            StringBuilder sb = new StringBuilder();
            int           sumCount = 0; decimal sumMoney = 0;

            for (int i = 0; i < ListMember.Count; i++)
            {
                sumCount = 0; sumMoney = 0;
                JJInfo   = BllModel.GetJJInfo(ListMember[i].MID, typeList, needTakeOff, startDate, endDate);
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append("<a href=\"javascript:void(0);\" onclick=\"callhtml('ChangeMoney/JJJLList.aspx?id=" + ListMember[i].MID + "');\">" + ListMember[i].MID + "</a>~");
                //sb.Append(ListMember[i].MName + "~");
                sb.Append(GetMemberType(ListMember[i]) + "~");
                foreach (string item in typeList)
                {
                    sb.Append(JJInfo[item + "Money"].ToFixedDecimal() + "~");
                    sumCount += Convert.ToInt32(JJInfo[item + "Count"]);
                    sumMoney += JJInfo[item + "Money"];
                }
                sb.Append("<span style='color:Red;font-weight:bold;'>" + sumMoney.ToFixedDecimal() + "</span>");
                //sb.Append(Convert.ToDecimal(sumMoney - JJInfo["ReBuyMoney"] - JJInfo["MCWMoney"] - JJInfo["TakeOffMoney"]).ToFixedDecimal());
                //sb.Append(Convert.ToDecimal(JJInfo["TakeOffMoney"]).ToFixedDecimal() + "~");
                //sb.Append(Convert.ToDecimal(JJInfo["ReBuyMoney"]).ToFixedDecimal());
                //sb.Append(Convert.ToDecimal(JJInfo["MCWMoney"]).ToFixedDecimal());

                //sb.Append(Convert.ToDecimal(JJInfo["TakeOffMoney"]).ToFixedDecimal() + "~");
                //sb.Append("<span style='color:Red;font-weight:bold;'>" + (sumMoney - JJInfo["TakeOffMoney"] - JJInfo["ReBuyMoney"] - JJInfo["MCWMoney"]).ToFixedDecimal() + "</span>");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #17
0
        public override void ProcessRequest(HttpContext context)
        {
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                return;
            }
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => emp.VState && !emp.IsAdmin).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += string.Format(" and MType={0} ", (context.Request["tState"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["RoleCode"]))
            {
                strWhere += " and RoleCode in ('" + context.Request["RoleCode"] + "') ";
            }
            else
            {
                strWhere += " and RoleCode in (" + RoleCode + ") ";
            }
            if (!string.IsNullOrEmpty(context.Request["JXType"]))
            {
                if (context.Request["JXType"] == "no")
                {
                    strWhere += " and JXType is NULL ";
                }
                else
                {
                    strWhere += " and JXType='" + context.Request["JXType"] + "'";
                }
            }
            if (!string.IsNullOrEmpty(context.Request["IsClose"]))
            {
                strWhere += " and IsClose='" + context.Request["IsClose"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["IsPPLeavel"]))
            {
                strWhere += " and  (select PPLeavel from MemberConfig where MID=Member.MID)='" + context.Request["IsPPLeavel"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["AgencyCode"]))
            {
                strWhere += " and AgencyCode='" + context.Request["AgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["ddlPCode"]))
            {
                strWhere += " and (select PCode from MemberConfig where MID=Member.MID)='" + context.Request["ddlPCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["OnlyOnLine"]))
            {
                strWhere += " and mid in ('" + String.Join("','", BLL.Member.OnLineMember.ToArray()) + "') ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                if (ListMember[i].Role.CanSH)
                {
                    sb.Append("<span style='color:red;'>" + ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "</span>" + "~");
                }
                else
                {
                    sb.Append(ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "~");
                }
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].ActiveCode + "~");
                //if (ListMember[i].MConfig.MHB - ListMember[i].MConfig.MHBFreeze < 0)
                //{
                //    sb.Append(ListMember[i].MConfig.MHB + "~");
                //}
                //else
                {
                    sb.Append(ListMember[i].MConfig.MHB + "~");
                }

                sb.Append(ListMember[i].MConfig.MJB + "~");
                //sb.Append(ListMember[i].MConfig.MCW + "~");
                sb.Append(ListMember[i].MConfig.MGP + "~");
                //sb.Append(ListMember[i].MConfig.MJBF + "~");
                sb.Append(ListMember[i].MConfig.TotalYFHMoney.ToFixedDecimal(0) + "~");
                sb.Append(ListMember[i].MConfig.EPXingCount + "~");
                sb.Append(ListMember[i].MTJ + "~");
                sb.Append((ListMember[i].IsClose ? "已锁定" : "未锁定") + ListMember[i].Province + "~");
                //sb.Append((ListMember[i].MConfig.PPLeavel == 0 ? "不优先" : "优先") + "~");
                sb.Append(ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") + "~");
                if (ListMember[i].IsClose)
                {
                    sb.Append("限制登录");
                }
                else
                {
                    sb.Append("正常");
                    sb.Append("<a href='?LoggedInMID=" + ListMember[i].MID + "' target=\"_blank\">进入会员系统</a>");
                }
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #18
0
        public override void ProcessRequest(HttpContext context)
        {
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                return;
            }
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => emp.VState && !emp.IsAdmin).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += string.Format(" and MType={0} ", (context.Request["tState"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["RoleCode"]))
            {
                strWhere += " and RoleCode in ('" + context.Request["RoleCode"] + "') ";
            }
            else
            {
                strWhere += " and RoleCode in (" + RoleCode + ") ";
            }
            if (!string.IsNullOrEmpty(context.Request["JXType"]))
            {
                if (context.Request["JXType"] == "no")
                {
                    strWhere += " and JXType is NULL ";
                }
                else
                {
                    strWhere += " and JXType='" + context.Request["JXType"] + "'";
                }
            }
            if (!string.IsNullOrEmpty(context.Request["IsClose"]))
            {
                strWhere += " and IsClose='" + context.Request["IsClose"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["IsPPLeavel"]))
            {
                strWhere += " and  (select PPLeavel from MemberConfig where MID=Member.MID)='" + context.Request["IsPPLeavel"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["AgencyCode"]))
            {
                strWhere += " and AgencyCode='" + context.Request["AgencyCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["ddlPCode"]))
            {
                strWhere += " and (select PCode from MemberConfig where MID=Member.MID)='" + context.Request["ddlPCode"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["OnlyOnLine"]))
            {
                strWhere += " and mid in ('" + String.Join("','", BLL.Member.OnLineMember.ToArray()) + "') ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + "~");
                //if (ListMember[i].Role.CanSH)
                //{
                //    sb.Append("<span style='color:red;'>" + ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "</span>" + "~");
                //}
                //else
                //{
                //    sb.Append(ListMember[i].MID + "[" + (BLL.Member.IfOnLine(ListMember[i].MID) ? "<b style='color:#A8FF24;cursor:help;' onclick='OpenTask(\"" + ListMember[i].MID + "\");'>在线</b>" : "离线") + "]" + "~");
                //}
                //sb.Append(ListMember[i].MConfig.MJB + BLL.MOfferHelp.GetSumMoney(" SQMID = '" + ListMember[i].MID + "' and PPState = 3 ") + "~");//互助币总数
                sb.Append(BLL.MOfferHelp.GetSumMoney(" SQMID = '" + ListMember[i].MID + "' and PPState <> 5 ") + "~");       //提供互助币总数
                sb.Append(BLL.MHelpMatch.GetSumMoney(" OfferMID = '" + ListMember[i].MID + "' and MatchState >= 2 ") + "~"); //打款成功总数
                sb.Append(BLL.MHelpMatch.GetSumMoney(" OfferMID = '" + ListMember[i].MID + "' and MatchState = 2 ") + "~");  //对方未确认总数
                sb.Append(BLL.MGetHelp.GetSumMoney(" SQMID = '" + ListMember[i].MID + "' and PPState <> 5 ") + "~");         //获得互助币总数
                sb.Append(BLL.MHelpMatch.GetSumMoney(" GetMID = '" + ListMember[i].MID + "' and MatchState = 1 ") + "~");    //对方未打款
                sb.Append(BLL.MHelpMatch.GetSumMoney(" GetMID = '" + ListMember[i].MID + "' and MatchState >= 3 "));         //确认成功总数
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #19
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string strWhere = "RoleCode in (" + RoleCode + ")";

            string sh = " and AgencyCode='001' ";

            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                if (context.Request["tState"] == "true")
                {
                    sh = " and AgencyCode<>'001' ";
                }
            }
            //if (!string.IsNullOrEmpty(context.Request["IsMHS"]))
            //{
            //    strWhere += string.Format(" and ( MSH='{0}'", TModel.MID);
            //}
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                strWhere += string.Format(" and ( MID='{0}' or MName='{0}') ", (context.Request["mKey"]));
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and MCreateDate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and MCreateDate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!TModel.Role.Super)
            {
                strWhere += string.Format(" and MSH='{0}' ", TModel.MID);
            }

            //Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            //if (!TModel.Role.Super)
            //    strWhere += string.Format(" and MSH='{0}' ", TModel.MID);
            //else
            //{
            //    if (!string.IsNullOrEmpty(context.Request["mSHKey"]))
            //    {
            //        strWhere += string.Format(" and MSH='{0}' ", context.Request["mSHKey"]);
            //    }
            //}
            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere + sh, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + BLL.Member.GetOnlineInfo(ListMember[i].MID) + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].Tel + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].MAgencyType.Money + "~");
                //if (ListMember[i].MConfig != null && ListMember[i].MConfig.JXType != null)
                //{
                //    sb.Append(ListMember[i].MConfig.JXType.JXName + "~");
                //}
                //else
                //{
                //    sb.Append("无称谓~");
                //}
                //sb.Append(ListMember[i].MBD + "~");
                sb.Append(ListMember[i].MTJ + "~");
                sb.Append(ListMember[i].MSH + "~");
                sb.Append((ListMember[i].MState ? "已审核" : "未审核") + "~");
                sb.Append(ListMember[i].MDate.Year == DateTime.MaxValue.Year ? ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") : ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #20
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string RoleCode = "";

            foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => !emp.IsAdmin && emp.VState).ToList())
            {
                RoleCode += "'" + item.RType + "',";
            }
            RoleCode = RoleCode.Substring(0, RoleCode.Length - 1);
            string strWhere = " RoleCode in (" + RoleCode + ")";
            string mkey = "", mtjkey = "";

            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mkey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["mTJKey"]))
            {
                mtjkey = context.Request["mTJKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["mBDKey"]))
            {
                strWhere += " and MBD='" + context.Request["mBDKey"] + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                strWhere += " and MState='" + context.Request["tState"] + "' ";
            }
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                if (!string.IsNullOrEmpty(mkey))
                {
                    mkey = memberModel.MID;
                }
                mtjkey = memberModel.MID;
            }
            if (!string.IsNullOrEmpty(mkey))
            {
                strWhere += " and MID='" + mkey + "' ";
            }
            if (!string.IsNullOrEmpty(mtjkey))
            {
                strWhere += " and MTJ='" + mtjkey + "' ";
            }

            int count;
            List <Model.Member> ListMember = BllModel.GetMemberEntityList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListMember.Count; i++)
            {
                sb.Append(ListMember[i].MID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListMember[i].MID + BLL.Member.GetOnlineInfo(ListMember[i].MID) + "~");
                sb.Append(ListMember[i].MName + "~");
                sb.Append(ListMember[i].MAgencyType.MAgencyName + "~");
                sb.Append(ListMember[i].MConfig.SHMoney + "~");
                //if (ListMember[i].MConfig != null && ListMember[i].MConfig.JXType != null)
                //{
                //    sb.Append(ListMember[i].MConfig.JXType.JXName + "~");
                //}
                //else
                //{
                //    sb.Append("无称谓"+"~");
                //}
                sb.Append(ListMember[i].MTJ + "~");
                //sb.Append(ListMember[i].MBD + "~");
                if (ListMember[i].MConfig != null)
                {
                    sb.Append(ListMember[i].MConfig.TJCount + "~");
                    sb.Append(ListMember[i].MConfig.TJMoney + "~");
                    //if (TModel.Role.IsAdmin)
                    {
                        sb.Append(ListMember[i].MConfig.YJCount + "~");
                        sb.Append(ListMember[i].MConfig.YJMoney + "~");
                        //sb.Append(ListMember[i].MConfig.TJCount + "~");
                        //sb.Append(ListMember[i].MConfig.TJMoney + "~");
                        sb.Append(ListMember[i].MConfig.TotalMoney + "~");
                        sb.Append(ListMember[i].MConfig.RealMoney + "~");
                    }
                }
                else
                {
                    sb.Append("~~~~~~");
                }
                //sb.Append(ListMember[i].MBDIndexStr + "~");
                //sb.Append((ListMember[i].MState ? "已激活" : "未激活") + "~");
                //if (ListMember[i].MState)
                //    sb.Append(ListMember[i].MDate.ToString("yyyy-MM-dd HH:mm"));
                //else
                sb.Append(ListMember[i].MCreateDate.ToString("yyyy-MM-dd HH:mm") + "~");

                if (!ListMember[i].MState)
                {
                    sb.Append("<input type =\"button\" value =\"激活\" class=\"btn btn-danger btn-sm\" onclick=\"JHMember('" + ListMember[i].MID + "')\">");
                }
                if (ListMember[i].IsClose)
                {
                    sb.Append("限制登录");
                }
                else
                {
                    if (ListMember[i].MConfig.HLMoneyState && ListMember[i].MTJ == TModel.MID)
                    {
                        sb.Append("<a href='?LoggedInMID=" + ListMember[i].MID + "' target=\"_blank\">托管进入</a>");
                    }
                }
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }