예제 #1
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            List <string> typeList = new List <string>()
            {
                "SH"
            };
            List <string> mType = new List <string> {
                "MJB"
            };
            string mKey     = "";
            string strWhere = " '1'='1' ";

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

            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                mKey = memberModel.MID;
            }

            int count;
            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(mKey, BLL.Member.ManageMember.TModel.MID, "", "true", typeList, mType, pageIndex, pageSize, strWhere, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                Model.Member member = BllModel.GetModel(ListChangeMoney[i].SHMID);
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(member.MID + "~");
                sb.Append(member.MName + "~");
                sb.Append(member.Tel + "~");
                sb.Append(member.MAgencyType.MAgencyName + "~");
                sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                sb.Append(ListChangeMoney[i].CRemarks + "~");
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

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

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

            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                mKey = memberModel.MID;
            }
            strWhere += string.Format(" and (FromMID='{0}' or ToMID='{0}') ", mKey);


            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(strWhere + " order by ChangeDate desc");

            StringBuilder sb = new StringBuilder();

            for (int i = (pageIndex - 1) * pageSize; i < ListChangeMoney.Count && i < pageIndex * pageSize; i++)
            {
                Model.Member member = BllModel.GetModel(mKey);

                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append(i + 1 + "~");
                sb.Append(member.MID + "~");
                sb.Append(member.MName + "~");
                sb.Append((ListChangeMoney[i].FromMID == member.MID ? "<b style='color:red;'>支出</b>" : "<b style='blue'>收入</b>") + "~");
                sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].ChangeTypeStr + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = ListChangeMoney.Count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #3
0
        protected override string btnOther_Click()
        {
            string where = " 1=1  ";
            //string where = string.Format(" MID = '{0}'   ", TModel.MID);
            //var txtCode = Request["txtCode"];
            //if (!string.IsNullOrEmpty(txtCode))
            //{
            //    where += string.Format(" and Code = '{0}'", txtCode);
            //}
            string mkeyfrom = "";
            string mkeyto   = "";

            string state = Request.Form["state"];

            if (!string.IsNullOrEmpty(state))
            {
                if (state == "ZC")
                {
                    where   += " and FromMID='" + TModel.MID + "' ";
                    mkeyfrom = TModel.MID;
                }
                else
                {
                    where += " and ToMID='" + TModel.MID + "' ";
                    mkeyto = TModel.MID;
                }
            }
            else
            {
                where   += " and FromMID='" + TModel.MID + "' ";
                mkeyfrom = TModel.MID;
            }
            List <Model.ChangeMoney> listchange = null;

            listchange = BllModel.GetChangeMoneyEntityList(mkeyfrom, mkeyto, "", "true", new List <string> {
                "ZZ"
            }, new List <string> {
                "MHB", "MJB", "MGP", "MCW", "TotalYFHMoney"
            }, CurrentPage, ItemsPerPage, where, out totalCount);
            var list = listchange.Select(item => new
            {
                MID        = !string.IsNullOrEmpty(mkeyfrom)?item.ToMID:item.FromMID,
                Money      = item.Money,
                MoneyType  = item.MoneyTypeStr,
                ChangeDate = item.ChangeDate.ToString()
            });

            return(jss.Serialize(new { Items = list, TotalCount = totalCount }));
        }
예제 #4
0
        protected override string btnOther_Click()
        {
            string where = " 1=1 ";
            //string where = string.Format(" MID = '{0}'   ", TModel.MID);
            //var txtCode = Request["txtCode"];
            //if (!string.IsNullOrEmpty(txtCode))
            //{
            //    where += string.Format(" and Code = '{0}'", txtCode);
            //}
            string mkey = "";

            mkey = TModel.MID;
            //if (!string.IsNullOrEmpty(Request["begin_time"]))
            //{
            //    where += " and ChangeDate>'" + Request["begin_time"] + " 00:00:00' ";
            //}
            //if (!string.IsNullOrEmpty(Request["end_time"]))
            //{
            //    where += " and ChangeDate<'" + Request["end_time"] + " 23:59:59' ";
            //}
            List <Model.ChangeMoney> listchange = null;

            listchange = BllModel.GetChangeMoneyEntityList(TModel.MID, BLL.Member.ManageMember.TModel.MID, "", "true", new List <string> {
                "KF"
            }, new List <string> {
                "MHB", "MJB", "MGP", "MCW", "TotalYFHMoney"
            }, CurrentPage, ItemsPerPage, where, out totalCount);

            var list = listchange.Select(item => new
            {
                MID        = item.ToMID,
                Money      = item.Money,
                MoneyType  = item.MoneyTypeStr,
                ChangeDate = item.ChangeDate.ToString(),
                liyou      = item.CRemarks
            });

            return(jss.Serialize(new { Items = list, TotalCount = totalCount }));
        }
예제 #5
0
        protected override string btnOther_Click()
        {
            string where = " 1=1 ";
            //string where = string.Format(" MID = '{0}'   ", TModel.MID);
            //var txtCode = Request["txtCode"];
            //if (!string.IsNullOrEmpty(txtCode))
            //{
            //    where += string.Format(" and Code = '{0}'", txtCode);
            //}
            string mkey = "";

            mkey = TModel.MID;
            //if (!string.IsNullOrEmpty(Request["begin_time"]))
            //{
            //    where += " and ChangeDate>'" + Request["begin_time"] + " 00:00:00' ";
            //}
            //if (!string.IsNullOrEmpty(Request["end_time"]))
            //{
            //    where += " and ChangeDate<'" + Request["end_time"] + " 23:59:59' ";
            //}
            List <Model.ChangeMoney> listchange = null;

            listchange = BllModel.GetChangeMoneyEntityList(TModel.MID, BLL.Member.ManageMember.TModel.MID, "", "", new List <string> {
                "TX"
            }, new List <string> {
                "MHB", "MCW"
            }, CurrentPage, ItemsPerPage, where, out totalCount);

            var list = listchange.Select(item => new
            {
                Money      = item.Money,
                sfMoney    = (item.Money - item.TakeOffMoney).ToFixedDecimal(2),
                State      = item.CState ? "已批准" : "未批准",
                ChangeDate = item.ChangeDate.ToString(),
                cdetails   = item.CState ? "" : "<a class=\"button button-fill button-success\" href=\"javascript:delTX(" + item.CID + ")\">删除</a>"
            });

            return(jss.Serialize(new { Items = list, TotalCount = totalCount }));
        }
예제 #6
0
        protected override string btnOther_Click()
        {
            string where = " '1'='1' ";

            string mkey = "";

            mkey = TModel.MID;
            string        shmid     = "";
            List <string> cTypeList = new List <string> {
                "R_LD", "R_RFH", "R_TJ"
            };
            List <string> mTypeList = new List <string> {
                "MHB", "MJB", "MCW"
            };

            if (!string.IsNullOrEmpty(Request["begin_time"]))
            {
                where += " and ChangeDate>'" + Request["begin_time"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(Request["end_time"]))
            {
                where += " and ChangeDate<'" + Request["end_time"] + " 23:59:59' ";
            }


            List <Model.ChangeMoney> listchange = null;

            listchange = BllModel.GetChangeMoneyEntityList(BLL.Member.ManageMember.TModel.MID, TModel.MID, shmid, "True", cTypeList, mTypeList, CurrentPage, ItemsPerPage, where, out totalCount);
            var list = listchange.Select(item => new
            {
                Money      = item.Money,
                ChangeType = item.ChangeTypeStr,
                SHMID      = item.SHMID,
                ChangeDate = item.ChangeDate.ToString(),
            });

            return(jss.Serialize(new { Items = list, TotalCount = totalCount }));
        }
예제 #7
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            List <string> cTypeList = new List <string>();
            List <string> mTypeList = new List <string> {
                "MHB", "MJB", "MGP", "MCW", "CTB", "CTD"
            };
            string mKey = "", shmKey = "", cState = "";
            string strWhere = " '1'='1' ";

            if (!string.IsNullOrEmpty(context.Request["typeList"]))
            {
                string types = context.Request["typeList"].Remove(context.Request["typeList"].Length - 1);
                cTypeList = new List <string>(types.Split('|'));
                cTypeList.Add("TJKF");
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mKey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                cState = context.Request["tState"];
            }
            if (!string.IsNullOrEmpty(context.Request["txtKey"]))
            {
                shmKey = context.Request["txtKey"];
            }
            if (!string.IsNullOrEmpty(cState))
            {
                strWhere += " and ChangeType ='" + cState + "' ";
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["moneyType"]))
            {
                mTypeList = new List <string> {
                    context.Request["moneyType"]
                };
            }

            if (!string.IsNullOrEmpty(context.Request["countdate"]))
            {
                strWhere += " and changedate>'" + context.Request["countdate"] + " 00:00:00'  and changedate<'" + context.Request["countdate"] + " 23:59:59'";
            }

            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                mKey = memberModel.MID;
                //cState = "true";
            }
            int    count;
            string toMID   = mKey;
            string fromMID = BLL.Member.ManageMember.TModel.MID;

            if (cState == "TJKF")
            {
                toMID   = BLL.Member.ManageMember.TModel.MID;
                fromMID = mKey;
            }
            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(fromMID, toMID, shmKey, cState, cTypeList, mTypeList, pageIndex, pageSize, strWhere, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                //if (shmid != ListChangeMoney[i].SHMID)
                //{
                //    shmid = ListChangeMoney[i].SHMID;
                //    if (i != 0)
                //    {
                //        sb.Append("~~~~~~~~~≌");
                //    }
                //}
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");

                if (ListChangeMoney[i].ChangeType == "TJKF")
                {
                    if (TModel.Role.IsAdmin)
                    {
                        Model.Member member = BllModel.GetModel(ListChangeMoney[i].FromMID);
                        sb.Append(member.MID + "~");
                        sb.Append(member.MAgencyType.MAgencyName + "~");
                    }
                    sb.Append("-" + Math.Round(ListChangeMoney[i].Money, 2) + "~");
                }
                else
                {
                    if (TModel.Role.IsAdmin)
                    {
                        Model.Member member = BllModel.GetModel(ListChangeMoney[i].ToMID);
                        sb.Append(member.MID + "~");
                        sb.Append(member.MAgencyType.MAgencyName + "~");
                    }
                    sb.Append(Math.Round(ListChangeMoney[i].Money, 6) + "~");
                }
                //sb.Append(Math.Round(ListChangeMoney[i].TakeOffMoney, 2) + "~");
                //sb.Append(ListChangeMoney[i].TakeOffMoney+ "~");
                //sb.Append(ListChangeMoney[i].MCWMoney + "~");
                //sb.Append(ListChangeMoney[i].ReBuyMoney+ "~");
                //sb.Append(ListChangeMoney[i].ReBuyMoney + "~");
                sb.Append(ListChangeMoney[i].ChangeTypeStr + "~");
                string JJsource = (!string.IsNullOrEmpty(ListChangeMoney[i].CRemarks)) ? ListChangeMoney[i].CRemarks + "~" : ListChangeMoney[i].SHMID + "~";
                sb.Append(JJsource);
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                if (!ListChangeMoney[i].CState)
                {
                    //sb.Append(RemainLeaveTime(ListChangeMoney[i].ChangeDate, BLL.Configuration.Model.DFHOutCount));
                    string button = "<input onclick=\"TQJJ(" + ListChangeMoney[i].CID + ")\" class=\"btn btn-success\" value=\"提取奖金\" type=\"button\">";
                    //if (ListChangeMoney[i].ToMID != TModel.MID)
                    //{
                    //    button = "<span style=\"color:red;\">等待提取</span>";
                    //}
                    sb.Append(DateDiffStr(DateDiffType.MI, ListChangeMoney[i].ChangeDate, BLL.MMMConfig.Model.GLRewardFreezeTimes, "倒计时:", button));
                }
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #8
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            List <string> cTypeList = new List <string>();
            List <string> mTypeList = new List <string> {
                "MHB"
            };
            string mKey = "", shmKey = "", cState = "";
            string strWhere = " '1'='1' ";

            string types = "TG";

            cTypeList = new List <string>(types.Split('|'));

            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mKey = context.Request["mKey"];
            }
            //if (!string.IsNullOrEmpty(context.Request["tState"]))
            //{
            //    cState = context.Request["tState"];
            //}
            if (!string.IsNullOrEmpty(context.Request["txtKey"]))
            {
                shmKey = context.Request["txtKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["moneyType"]))
            {
                mTypeList = new List <string> {
                    context.Request["moneyType"]
                };
            }

            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                mKey   = memberModel.MID;
                cState = "true";
            }
            int count;
            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(BLL.Member.ManageMember.TModel.MID, mKey, shmKey, cState, cTypeList, mTypeList, pageIndex, pageSize, strWhere, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                Model.Member member = BllModel.GetModel(ListChangeMoney[i].ToMID);
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(member.MID + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append(ListChangeMoney[i].Money + "~");
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].CRemarks);
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
예제 #9
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            List <string> cTypeList = new List <string>();
            List <string> mTypeList = new List <string> {
                "MHB", "MJB", "MGP", "MCW"
            };
            string mKey = "", shmKey = "", cState = "";
            string strWhere = " '1'='1' ";

            //if (!string.IsNullOrEmpty(context.Request["typeList"]))
            //{
            //    string types = context.Request["typeList"].Remove(context.Request["typeList"].Length - 1);
            //}
            cTypeList = new List <string> {
                "JJSY"
            };
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mKey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                cState = context.Request["tState"];
            }
            if (!string.IsNullOrEmpty(context.Request["txtKey"]))
            {
                shmKey = context.Request["txtKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["moneyType"]))
            {
                mTypeList = new List <string> {
                    context.Request["moneyType"]
                };
            }

            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                mKey   = memberModel.MID;
                cState = "true";
            }
            int count;
            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(BLL.Member.ManageMember.TModel.MID, mKey, shmKey, cState, cTypeList, mTypeList, pageIndex, pageSize, strWhere, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                Model.Member member = BllModel.GetModel(ListChangeMoney[i].ToMID);
                //if (shmid != ListChangeMoney[i].SHMID)
                //{
                //    shmid = ListChangeMoney[i].SHMID;
                //    if (i != 0)
                //    {
                //        sb.Append("~~~~~~~~~≌");
                //    }
                //}
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                if (TModel.Role.IsAdmin)
                {
                    sb.Append(member.MID + "~");
                    sb.Append(member.MAgencyType.MAgencyName + "~");
                }
                if (ListChangeMoney[i].ChangeType == "ZZB")
                {
                    sb.Append(ListChangeMoney[i].Money + "(手续费" + ListChangeMoney[i].TakeOffMoney.ToString() + ")" + "~");
                }
                else
                {
                    sb.Append(ListChangeMoney[i].Money + "~");
                }
                //sb.Append(ListChangeMoney[i].TakeOffMoney+ "~");
                //sb.Append(ListChangeMoney[i].MCWMoney + "~");
                //sb.Append(ListChangeMoney[i].ReBuyMoney+ "~");
                //sb.Append(ListChangeMoney[i].ReBuyMoney + "~");
                sb.Append(ListChangeMoney[i].ChangeTypeStr + "~");
                string JJsource = (ListChangeMoney[i].ChangeType == "DFH" || ListChangeMoney[i].ChangeType == "PY" || ListChangeMoney[i].ChangeType == "TJ" || ListChangeMoney[i].ChangeType == "DP") ? ListChangeMoney[i].CRemarks + "~" : ListChangeMoney[i].SHMID + "~";
                sb.Append(JJsource);
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

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

            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                type = context.Request["tState"];
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mkey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                mkey = memberModel.MID;
            }
            int                      count = 0;
            StringBuilder            sb    = new StringBuilder();
            List <Model.ChangeMoney> ListChangeMoney;

            if (type == "zc")
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList(mkey, "", "", "true", new List <string> {
                    "ZZ"
                }, new List <string> {
                    "MHB", "MJB"
                }, pageIndex, pageSize, strWhere, out count);

                for (int i = 0; i < ListChangeMoney.Count; i++)
                {
                    Model.Member member  = BllModel.GetModel(ListChangeMoney[i].FromMID);
                    Model.Member member2 = BllModel.GetModel(ListChangeMoney[i].ToMID);
                    sb.Append(ListChangeMoney[i].CID + "~");
                    sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                    sb.Append(ListChangeMoney[i].FromMID + "~");
                    sb.Append(member2.MName + "~");
                    sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                    sb.Append(ListChangeMoney[i].ToMID + "~");
                    sb.Append(member.MName + "~");
                    sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                    sb.Append(BLL.Reward.List[ListChangeMoney[i].MoneyType].RewardName + "~");
                    sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                    sb.Append("≌");
                }
            }
            else if (type == "zr")
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList("", mkey, "", "true", new List <string> {
                    "ZZ"
                }, new List <string> {
                    "MHB", "MJB"
                }, pageIndex, pageSize, strWhere, out count);

                for (int i = 0; i < ListChangeMoney.Count; i++)
                {
                    Model.Member member  = BllModel.GetModel(ListChangeMoney[i].FromMID);
                    Model.Member member2 = BllModel.GetModel(ListChangeMoney[i].ToMID);
                    sb.Append(ListChangeMoney[i].CID + "~");
                    sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                    sb.Append(ListChangeMoney[i].ToMID + "~");
                    sb.Append(member2.MName + "~");
                    sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                    sb.Append(ListChangeMoney[i].FromMID + "~");
                    sb.Append(member.MName + "~");
                    sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                    sb.Append(BLL.Reward.List[ListChangeMoney[i].MoneyType].RewardName + "~");
                    sb.Append(ListChangeMoney[i].ChangeDate);
                    sb.Append("≌");
                }
            }
            else if (type == "dh")
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList(mkey, BLL.Member.ManageMember.TModel.MID, "", "true", new List <string> {
                    "DH"
                }, new List <string> {
                    "MHB", "MJB"
                }, pageIndex, pageSize, strWhere, out count);

                for (int i = 0; i < ListChangeMoney.Count; i++)
                {
                    Model.Member member = BllModel.GetModel(ListChangeMoney[i].FromMID);
                    sb.Append(ListChangeMoney[i].CID + "~");
                    sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                    sb.Append(ListChangeMoney[i].FromMID + "~");
                    sb.Append(member.MName + "~");
                    sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                    sb.Append(ListChangeMoney[i].FromMID + "~");
                    sb.Append(member.MName + "~");
                    sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                    sb.Append(BLL.Reward.List[ListChangeMoney[i].MoneyType].RewardName + "-" + ListChangeMoney[i].CRemarks + "~");
                    sb.Append(ListChangeMoney[i].ChangeDate);
                    sb.Append("≌");
                }
            }
            else
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList(BLL.Member.ManageMember.TModel.MID, mkey, "", "true", new List <string> {
                    "GM"
                }, new List <string> {
                    "MCW"
                }, pageIndex, pageSize, strWhere, out count);

                for (int i = 0; i < ListChangeMoney.Count; i++)
                {
                    Model.Member member = BllModel.GetModel(ListChangeMoney[i].ToMID);
                    sb.Append(ListChangeMoney[i].CID + "~");
                    sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                    sb.Append(ListChangeMoney[i].ToMID + "~");
                    sb.Append(member.MName + "~");
                    sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                    sb.Append((ListChangeMoney[i].CState ? "购买成功" : "购买失败") + "~");
                    sb.Append(ListChangeMoney[i].ChangeDate);
                    sb.Append("≌");
                }
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

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

            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mKey = context.Request["mKey"];
            }
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.Super)
            {
                mKey = memberModel.MID;
            }
            if (!string.IsNullOrEmpty(mKey))
            {
                strWhere += " and (ToMID='" + mKey + "' or ToMName like '%" + mKey + "%') ";
            }
            int                      count = 0;
            StringBuilder            sb    = new StringBuilder();
            List <Model.ChangeMoney> ListChangeMoney;

            if (!TModel.Role.Super)
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList("", TModel.MID, "", "true", new List <string> {
                    "CZ"
                }, new List <string> {
                    "MHB", "MJB", "MGP", "MCW", "TotalYFHMoney"
                }, pageIndex, pageSize, strWhere, out count);
            }
            else
            {
                ListChangeMoney = BllModel.GetChangeMoneyEntityList("", mKey, "", "true", new List <string> {
                    "CZ"
                }, new List <string> {
                    "MHB", "MJB", "MGP", "MCW", "TotalYFHMoney"
                }, pageIndex, pageSize, strWhere, out count);
            }

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                Model.Member member = BllModel.GetModel(ListChangeMoney[i].ToMID);
                if (member == null)
                {
                    continue;
                }
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(member.MID + "~");
                sb.Append(member.MName + "~");
                sb.Append(ListChangeMoney[i].Money.ToFixedDecimal() + "~");
                sb.Append((ListChangeMoney[i].CState ? "已生效" : "未生效") + "~");
                sb.Append(ListChangeMoney[i].MoneyTypeStr + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.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)
        {
            base.ProcessRequest(context);
            bool   state    = false;
            string mkey     = "";
            string strWhere = " '1'='1' ";

            if (!string.IsNullOrEmpty(context.Request["tState"]))
            {
                state = bool.Parse(context.Request["tState"]);
            }
            if (!string.IsNullOrEmpty(context.Request["mKey"]))
            {
                mkey = context.Request["mKey"];
            }
            if (!string.IsNullOrEmpty(context.Request["startDate"]))
            {
                strWhere += " and changedate>'" + context.Request["startDate"] + " 00:00:00' ";
            }
            if (!string.IsNullOrEmpty(context.Request["endDate"]))
            {
                strWhere += " and changedate<'" + context.Request["endDate"] + " 23:59:59' ";
            }
            if (!string.IsNullOrEmpty(context.Request["ddlCRemarks"]))
            {
                strWhere += " and CRemarks='" + context.Request["ddlCRemarks"] + "' ";
            }
            Model.Member memberModel = (TModel == null ? BllModel.TModel : TModel);
            if (!memberModel.Role.IsAdmin)
            {
                mkey = memberModel.MID;
            }
            int count;
            List <Model.ChangeMoney> ListChangeMoney = BllModel.GetChangeMoneyEntityList(mkey, BLL.Member.ManageMember.TModel.MID, "", state.ToString(), new List <string> {
                "TX"
            }, new List <string> {
                "MJB"
            }, pageIndex, pageSize, strWhere, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListChangeMoney.Count; i++)
            {
                Model.Member member = BllModel.GetModel(ListChangeMoney[i].FromMID);
                sb.Append(ListChangeMoney[i].CID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append("<span id='" + ListChangeMoney[i].CID + "_span'>" + ListChangeMoney[i].FromMID + "</span>~");
                //sb.Append(member.Bank + "~");
                //sb.Append(member.Branch + "~");
                //sb.Append(member.BankCardName + "~");
                //sb.Append(member.BankNumber + "~");
                sb.Append(ListChangeMoney[i].CRemarks + "~");
                sb.Append("" + Math.Round(ListChangeMoney[i].Money, 2) + "~");
                sb.Append("" + Math.Round((ListChangeMoney[i].Money - ListChangeMoney[i].TakeOffMoney), 2) + "~");
                //sb.Append("" + ((ListChangeMoney[i].Money - ListChangeMoney[i].TakeOffMoney) * BLL.Configuration.Model.OutFloat).ToString("F2") + "~");
                //sb.Append(ListChangeMoney[i].TakeOffMoney * 6 + "~");
                //sb.Append((ListChangeMoney[i].Money - ListChangeMoney[i].TakeOffMoney) * 6 + "~");
                //sb.Append(ListChangeMoney[i].BeforeChangeFrom + "~");
                //sb.Append(ListChangeMoney[i].EndChangeFrom + "~");
                sb.Append((ListChangeMoney[i].CState ? "已批准" : "未批准") + "~");
                sb.Append(ListChangeMoney[i].ChangeDate.ToString("yyyy-MM-dd HH:mm"));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }