Exemplo n.º 1
0
 public JsonResult deleteMessage()
 {
     try
     {
         AAccountUtil.DeleteMessage(Request["msgid"]);
         return(Json(new { flag = "y" }));
     }
     catch (Exception)
     {
         return(Json(new { flag = "n" }));
     }
 }
Exemplo n.º 2
0
 public JsonResult getMessageBody()
 {
     try
     {
         return(Json(new
         {
             flag = "y",
             msgbody = AAccountUtil.GetMessageBody(Request["msgid"])
         },
                     JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         return(Json(new { flag = "n" }, JsonRequestBehavior.AllowGet));
     }
 }
Exemplo n.º 3
0
        public JsonResult queryMessageList()
        {
            Hashtable aHT = Authorizes.GetAuthorizeCache(Request);

            if (aHT != null)
            {
                DataSet            ds_result = AAccountUtil.GetMessageList(ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER"), Request["pageno"]);
                List <messageItem> rows      = new List <messageItem>();
                foreach (DataRow item in ds_result.Tables["list"].Rows)
                {
                    messageItem a = new messageItem();
                    switch (item.Field <int>("MSGTYPE"))
                    {
                    case message_id.Account_KeyIn_BankCard:
                    case message_id.Account_KeyIn_DetailInfo:
                    case message_id.Account_KeyIn_Withdrawals:
                        a.msg_type = "账户提示";
                        break;

                    default:
                        a.msg_type = "系统消息";
                        break;
                    }
                    a.msg_id = item["MSGID"].ToString();
                    a.title  = item["MSGTITLE"].ToString();
                    a.ctime  = Convert.ToDateTime(item["CTIME"]).ToString("yyyy/MM/dd HH:mm");
                    a.state  = item["STATE"].ToString();
                    rows.Add(a);
                }

                return(Json(new
                {
                    flag = "y",
                    pagenums = ds_result.Tables["pages"].Rows.Count > 0 ? ds_result.Tables["pages"].Rows[0][0] : 0,
                    pageno = string.IsNullOrEmpty(Request["pageno"]) ? "1" : Request["pageno"],
                    rows = rows.ToList()
                }));
            }

            return(Json(new { flag = "n" }));
        }
Exemplo n.º 4
0
        public ActionResult UserCenter(string id)
        {
            Hashtable aHT = Authorizes.GetAuthorizeCache(Request);

            if (aHT != null)
            {
                if (string.IsNullOrEmpty(id))
                {
                    id = "zhmx";
                }

                PageModel model = new PageModel(this, @"model\usercenter.xml");
                model.Parameters.Subpage   = id;
                model.Parameters.Pid       = string.Format("{0}{1}", id, Request["t"]);
                model.Parameters.Account   = ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER");
                model.Parameters.NickName  = ParamUtil.Pick(aHT).GetValueAsString("NICKNAME");
                model.Parameters.LoginTime = ParamUtil.Pick(aHT).GetValueAsString("LOGINTIME");
                model.Parameters.Available = string.Format("{0:f2}", Convert.ToDecimal(aHT["AVAILABLE"]));
                model.Parameters.Freezed   = string.Format("{0:f2}", Convert.ToDecimal(aHT["FREEZED"]));
                model.Parameters.Score     = aHT["SCORE"].ToString();
                switch (id)
                {
                case "czlink":
                    model.Parameters.PayList = CommonDBUtils.GetPaymentList();
                    break;

                case "zhmx":
                    // 返回账户流水清单
                    DataSet ds_result = new ParamUtil()
                                        .SetCmd(AAccountUtil.CGetJournalList)
                                        .SetParam(model.Parameters.Account).SetParam("type", Request["t"]).SetParam("time", Request["m"]).SetParam("pageno", Request["pageno"])
                                        .ExecuteCmd(new AAccountUtil())
                                        .GetValueAsDataSet();

                    model.Parameters.List = ds_result.Tables["list"];

                    DictSetUtil ds_total = new DictSetUtil(ds_result);
                    model.Parameters.Deposited = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.充值)) ? "0.00" : ds_total.GetValue(journal_type.充值));
                    model.Parameters.Bonus     = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.中奖)) ? "0.00" : ds_total.GetValue(journal_type.中奖));
                    model.Parameters.Exchanged = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.积分兑换)) ? "0.00" : ds_total.GetValue(journal_type.积分兑换));
                    model.Parameters.Returned  = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.返点)) ? "0.00" : ds_total.GetValue(journal_type.返点));
                    model.Parameters.Consume   = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.投注)) ? "0.00" : ds_total.GetValue(journal_type.投注));
                    model.Parameters.Withdraw  = string.Format("{0:f}", string.IsNullOrEmpty(ds_total.GetValue(journal_type.提现)) ? "0.00" : ds_total.GetValue(journal_type.提现));

                    model.Parameters.Type     = Request["t"];
                    model.Parameters.Time     = Request["m"];
                    model.Parameters.PageNo   = string.IsNullOrEmpty(Request["pageno"]) ? "1" : Request["pageno"];
                    model.Parameters.PageNums = 0;
                    if (ds_result.Tables["pages"].Rows.Count > 0)
                    {
                        model.Parameters.PageNums = ds_result.Tables["pages"].Rows[0][0];
                    }
                    break;

                case "zhmm":
                    model.Parameters.WithdrawIsEmpty = AAccountUtil.WithdrawIsEmpty(ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER"));
                    break;

                case "bdyhk":
                    model.Parameters.Provinces = CommonDBUtils.GetAreas();

                    // 返回账户的绑定的银行卡数据
                    DictSetUtil ds_bank = new DictSetUtil(AAccountUtil.GetBankData(ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER")));
                    model.Parameters.BankData = ds_bank.MyDS;
                    model.Parameters.HaveBank = ds_bank.DSxtcs.Rows.Count > 0;
                    break;

                case "grzl":
                    DictSetUtil ds_info = new DictSetUtil(AAccountUtil.GetMemberInfo(ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER")));
                    model.Parameters.MemberInfo = ds_info.MyDS;
                    model.Parameters.InfoIsFull = !string.IsNullOrEmpty(ds_info.GetValue("REALNAME")) && !string.IsNullOrEmpty(ds_info.GetValue("UID")) && !string.IsNullOrEmpty(ds_info.GetValue("ANSWER"));
                    break;

                case "msglist":
                    DataSet ds_msglist = AAccountUtil.GetMessageList(ParamUtil.Pick(aHT).GetValueAsString("DOMAINUSER"), Request["pageno"]);
                    model.Parameters.List     = ds_msglist.Tables["list"];
                    model.Parameters.PageNums = ds_msglist.Tables["pages"].Rows.Count > 0 ? ds_msglist.Tables["pages"].Rows[0][0] : 0;
                    model.Parameters.PageNo   = string.IsNullOrEmpty(Request["pageno"]) ? "1" : Request["pageno"];
                    break;
                }

                return(View("UserCenter", model));
            }

            return(Redirect("/"));
        }