Exemplo n.º 1
0
 private void initSelect(agent_userinfo_session userModel)
 {
     if (this.lotteryDT != null)
     {
         foreach (DataRow row in this.lotteryDT.Rows)
         {
             string str = row["id"].ToString();
             int num = 100;
             if (str == num.ToString())
             {
                 if (userModel.get_six_op_odds().Equals(1))
                 {
                     this.strLi = this.strLi + string.Format("<option value='{0}' {1}>{2}</option>", str, (str == this.lotteryId) ? "selected=selected" : "", base.GetGameNameByID(str));
                 }
             }
             else if (userModel.get_kc_op_odds().Equals(1))
             {
                 this.strLi = this.strLi + string.Format("<option value='{0}' {1}>{2}</option>", str, (str == this.lotteryId) ? "selected=selected" : "", base.GetGameNameByID(str));
             }
         }
     }
     if (this.lotteryId != "")
     {
         if (this.phaseNum == "")
         {
             this.strPhaseHtml = this.strPhaseHtml + string.Format("<option value='{0}' {1}>{2}</option>", "", "selected=selected", "全部");
         }
         else
         {
             this.strPhaseHtml = this.strPhaseHtml + string.Format("<option value='{0}' {1}>{2}</option>", "", "", "全部");
         }
         foreach (DataRow row2 in this.phaseNumTable.Rows)
         {
             string str2 = row2["l_phase"].ToString();
             string str3 = row2["l_phase"].ToString();
             if (str3.Equals(this.phaseNum))
             {
                 this.strPhaseHtml = this.strPhaseHtml + string.Format("<option value='{0}' {1}>{2}</option>", str3, "selected=selected", "第" + str2 + "期");
             }
             else
             {
                 this.strPhaseHtml = this.strPhaseHtml + string.Format("<option value='{0}' {1}>{2}</option>", str3, "", "第" + str2 + "期");
             }
         }
     }
 }
Exemplo n.º 2
0
        private void getMemberDetail(ref string strResult)
        {
            base.checkLoginByHandler(0);
            this.u_id = LSRequest.qq("uid");
            string str  = LSRequest.qq("memberId");
            string str2 = LSRequest.qq("submitType");

            if (str != "clone")
            {
                base.Response.End();
            }
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            List <object>          list            = new List <object>();
            List <object>          list2           = new List <object>();
            string                 str3            = this.Session["user_name"].ToString();
            agent_userinfo_session _session        = this.Session[str3 + "lottery_session_user_info"] as agent_userinfo_session;

            if (((!_session.get_u_type().Trim().Equals("zj") && !_session.get_u_type().Trim().Equals("fgs")) && (!_session.get_u_type().Trim().Equals("gd") && !_session.get_u_type().Trim().Equals("zd"))) && !_session.get_u_type().Trim().Equals("dl"))
            {
                base.Response.End();
            }
            if (this.Session["child_user_name"] != null)
            {
                base.Response.End();
            }
            this.userChildModel = CallBLL.cz_users_child_bll.GetUserByUID(this.u_id);
            if (this.userChildModel == null)
            {
                base.Response.End();
            }
            if (!this.userChildModel.get_is_admin().Equals(0))
            {
                base.Response.End();
            }
            if (!this.userChildModel.get_parent_u_name().Equals(str3))
            {
                base.Response.End();
            }
            bool      flag  = base.is_locked_user(this.userChildModel.get_retry_times().ToString());
            DataTable table = CallBLL.cz_permissions_bll.GetListByUType((_session.get_u_type().Equals("zj") != null) ? "zj" : "dl").Tables[0];

            if (_session.get_u_type().Equals("zj"))
            {
                this.zjDataRow1 = table.Select(string.Format(" group_id={0} ", 1));
                this.zjDataRow2 = table.Select(string.Format(" group_id={0} ", 2));
                this.zjDataRow3 = table.Select(string.Format(" group_id={0} ", 3));
                this.zjDataRow4 = table.Select(string.Format(" group_id={0} ", 4));
            }
            else
            {
                if (_session.get_u_type().Equals("fgs"))
                {
                    if (_session.get_six_op_odds().Equals(1) || _session.get_kc_op_odds().Equals(1))
                    {
                        this.dlDataRow1 = table.Select(string.Format(" group_id={0} ", 5));
                    }
                    else
                    {
                        this.dlDataRow1 = table.Select(string.Format(" group_id={0} and name<>'{1}' ", 5, "po_5_3"));
                    }
                }
                else
                {
                    this.dlDataRow1 = table.Select(string.Format(" group_id={0} and name<>'{1}' ", 5, "po_5_3"));
                }
                this.dlDataRow2 = table.Select(string.Format(" group_id={0} ", 6));
                this.dlDataRow3 = table.Select(string.Format(" group_id={0} ", 7));
            }
            switch (str2)
            {
            case "view":
            {
                if (_session.get_u_type().Equals("zj"))
                {
                    foreach (DataRow row in this.zjDataRow1)
                    {
                        string str4 = row["name"].ToString();
                        int    num  = (this.userChildModel.get_permissions_name().IndexOf(str4) > -1) ? 1 : 0;
                        if (num == 1)
                        {
                            list2.Add(str4);
                        }
                        string str5 = row["name_remark"].ToString();
                        Dictionary <string, object> item = new Dictionary <string, object>();
                        item.Add("value", str4);
                        item.Add("label", str5);
                        list.Add(item);
                    }
                    foreach (DataRow row2 in this.zjDataRow2)
                    {
                        string str6 = row2["name"].ToString();
                        int    num2 = (this.userChildModel.get_permissions_name().IndexOf(str6) > -1) ? 1 : 0;
                        if (num2 == 1)
                        {
                            list2.Add(str6);
                        }
                        string str7 = row2["name_remark"].ToString();
                        Dictionary <string, object> dictionary3 = new Dictionary <string, object>();
                        dictionary3.Add("value", str6);
                        dictionary3.Add("label", str7);
                        list.Add(dictionary3);
                    }
                    foreach (DataRow row3 in this.zjDataRow3)
                    {
                        string str8 = row3["name"].ToString();
                        int    num3 = (this.userChildModel.get_permissions_name().IndexOf(str8) > -1) ? 1 : 0;
                        if (num3 == 1)
                        {
                            list2.Add(str8);
                        }
                        string str9 = row3["name_remark"].ToString();
                        Dictionary <string, object> dictionary4 = new Dictionary <string, object>();
                        dictionary4.Add("value", str8.ToString());
                        dictionary4.Add("label", str9);
                        list.Add(dictionary4);
                    }
                    foreach (DataRow row4 in this.zjDataRow4)
                    {
                        string str10 = row4["name"].ToString();
                        int    num4  = (this.userChildModel.get_permissions_name().IndexOf(str10) > -1) ? 1 : 0;
                        if (num4 == 1)
                        {
                            list2.Add(str10);
                        }
                        string str11 = row4["name_remark"].ToString();
                        Dictionary <string, object> dictionary5 = new Dictionary <string, object>();
                        dictionary5.Add("value", str10);
                        dictionary5.Add("label", str11);
                        list.Add(dictionary5);
                    }
                }
                else
                {
                    foreach (DataRow row5 in this.dlDataRow1)
                    {
                        string str12 = row5["name"].ToString();
                        int    num5  = (this.userChildModel.get_permissions_name().IndexOf(str12) > -1) ? 1 : 0;
                        if (num5 == 1)
                        {
                            list2.Add(str12);
                        }
                        string str13 = row5["name_remark"].ToString();
                        Dictionary <string, object> dictionary6 = new Dictionary <string, object>();
                        dictionary6.Add("value", str12);
                        dictionary6.Add("label", str13);
                        list.Add(dictionary6);
                    }
                    foreach (DataRow row6 in this.dlDataRow2)
                    {
                        string str14 = row6["name"].ToString();
                        int    num6  = (this.userChildModel.get_permissions_name().IndexOf(str14) > -1) ? 1 : 0;
                        if (num6 == 1)
                        {
                            list2.Add(str14);
                        }
                        string str15 = row6["name_remark"].ToString();
                        Dictionary <string, object> dictionary7 = new Dictionary <string, object>();
                        dictionary7.Add("value", str14);
                        dictionary7.Add("label", str15);
                        list.Add(dictionary7);
                    }
                    foreach (DataRow row7 in this.dlDataRow3)
                    {
                        string str16 = row7["name"].ToString();
                        int    num7  = (this.userChildModel.get_permissions_name().IndexOf(str16) > -1) ? 1 : 0;
                        if (num7 == 1)
                        {
                            list2.Add(str16);
                        }
                        string str17 = row7["name_remark"].ToString();
                        Dictionary <string, object> dictionary8 = new Dictionary <string, object>();
                        dictionary8.Add("value", str16);
                        dictionary8.Add("label", str17);
                        list.Add(dictionary8);
                    }
                }
                Dictionary <string, object> dictionary9 = new Dictionary <string, object>();
                dictionary9.Add("cloneName", this.userChildModel.get_u_name());
                dictionary9.Add("isLocked", flag ? "1" : "0");
                dictionary9.Add("userState", this.userChildModel.get_status().ToString());
                dictionary9.Add("nicker", this.userChildModel.get_u_nicker());
                dictionary9.Add("qx", list2);
                dictionary9.Add("qxOptions", list);
                dictionary9.Add("date", this.userChildModel.get_add_date());
                dictionary = dictionary9;
                result.set_success(200);
                result.set_data(dictionary);
                strResult = base.ObjectToJson(result);
                return;
            }

            case "edit":
                this.UpdateStatusChild();
                this.AddUser();
                break;
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string str = this.Session["user_name"].ToString();
     agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
     if (!model.get_u_type().Equals("fgs"))
     {
         base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
         base.Response.End();
     }
     if (model.get_u_type().Equals("fgs") && (model.get_six_op_odds().Equals(1) || model.get_kc_op_odds().Equals(1)))
     {
         base.Permission_Aspx_DL(model, "po_5_3");
     }
     else
     {
         base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
         base.Response.End();
     }
     string str2 = model.get_u_name();
     this.u_type = model.get_u_type().Trim();
     if (this.Session["child_user_name"] != null)
     {
         this.isCloneUser = true;
         this.cloneName = this.Session["child_user_name"].ToString();
     }
     this.lotteryId = LSRequest.qq("lid");
     if (string.IsNullOrEmpty(this.lotteryId))
     {
         this.lotteryId = "";
     }
     this.phaseNum = LSRequest.qq("phaseNum");
     if (string.IsNullOrEmpty(this.phaseNum))
     {
         this.phaseNum = "";
     }
     this.lotteryDT = base.GetLotteryList();
     base.IsLotteryExistForSysLog(this.lotteryId, "u100032", "1", "");
     if (this.lotteryId == "")
     {
         if (model.get_six_op_odds().Equals(1))
         {
             this.lotteryId = 100.ToString();
         }
         else
         {
             this.lotteryId = this.lotteryDT.Select(string.Format(" id<>{0} ", 100))[0]["id"].ToString();
         }
     }
     else
     {
         if (!model.get_six_op_odds().Equals(1))
         {
             int num2 = 100;
             if (this.lotteryId == num2.ToString())
             {
                 this.lotteryId = this.lotteryDT.Select(string.Format(" id<>{0} ", 100))[0]["id"].ToString();
             }
         }
         if (!model.get_kc_op_odds().Equals(1))
         {
             int num3 = 100;
             if (this.lotteryId != num3.ToString())
             {
                 this.lotteryId = 100.ToString();
             }
         }
     }
     this.page = LSRequest.qq("page");
     if (string.IsNullOrEmpty(this.page))
     {
         this.page = "1";
     }
     if (int.Parse(this.page) < 1)
     {
         this.page = "1";
     }
     if (this.lotteryId != "")
     {
         this.phaseNumTable = CallBLL.cz_fgs_opt_log_bll.GetPhaseNumByLottery(this.lotteryId, str2);
     }
     this.initSelect(model);
     DataSet set = CallBLL.cz_fgs_opt_log_bll.GetFgsOptLogByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, (this.lotteryId == "") ? "" : this.lotteryId, this.phaseNum, str2);
     this.dataTable = set.Tables[0];
     this.FiledValue = new string[] { this.lotteryId, this.phaseNum };
 }