Example #1
0
 public void bindGV(string ghostName, string type)
 {
     DataTable dt = new AutoBwsBLL.GhostBLL().getGhostbetinfoByGhostName(ghostName, type);
     if (dt != null && dt.Rows.Count > 0)
     {
         this.GridView1.DataSource = dt;
         this.GridView1.DataBind();
     }
 }
Example #2
0
 public string id2Name(string id)
 {
     string returnStr = "";
     if (!string.IsNullOrEmpty(id))
     {
         returnStr = new AutoBwsBLL.GhostBLL().getGhostNameByGhostID(Convert.ToInt32(id));
     }
     if (jurisdiction.Equals("P"))
     {
         if (returnStr.Equals(v))
             returnStr = "Ghost" + k;
     }
     return returnStr;
 }
Example #3
0
        public void AgentDetail()
        {
            Agent agent = new AutoBwsBLL.AgentBLL().getAgentDetail(Request.QueryString["uid"]);

            bindddlURL(agent.UrlType);
            txtloginName.ReadOnly = true;
            txtloginName.Text = agent.LoginName;
            txtloginPwd.Attributes.Add("value", agent.LoginPwd);
            ddlURL.Items.Insert(0, agent.Url);
            if (!IsWritable())
            {
                ddlURL.Enabled = false;
            }
            //			this.ddlIP.Items.Insert(0, agent.Ip);
            DataTable dt = new AutoBwsBLL.GhostBLL().getGhostsByAgentLoginName(agent.Id + "");

            this.GridView1.DataSource = dt;
            this.GridView1.DataBind();

            if (!this.IsWritable())
            {
            //				this.GridView1.Visible = false;
                this.btnSubmit.Visible = false;
                this.txtloginName.ReadOnly = true;
                this.txtloginName.Attributes["class"] = "";
                this.txtloginPwd.ReadOnly = true;
                this.txtloginPwd.Attributes["class"] = "";
                this.ddlURL.Enabled = false;
            //				this.ddlIP.Enabled = false;
                this.needHidden.Visible = false;

                this.txtghost1.Enabled = false;
                this.txtRealBet1.Enabled = false;
                this.ckReverse1.Enabled = false;

                this.txtghost2.Enabled = false;
                this.txtRealBet2.Enabled = false;
                this.ckReverse3.Enabled = false;

                this.txtghost4.Enabled = false;
                this.txtRealBet4.Enabled = false;
                this.ckReverse4.Enabled = false;

                this.txtghost5.Enabled = false;
                this.txtRealBet5.Enabled = false;
                this.ckReverse5.Enabled = false;
            }
        }
Example #4
0
        private DataTable GetTopTenByWeek(string week)
        {
            String loginName = string.Empty;
            if (HttpContext.Current.Session["currentUser"] == null)
                HttpContext.Current.Response.Redirect("~/Default.aspx");
            else
                loginName = ((UserInfo)Session["currentUser"]).LoginName;
            String jurisdiction = AutoBwsWeb.Common.BasePage.getUserType(this.Page);
            DataTable dt = rBLL.getTop10Reverse(week);
            if (null == dt || null == dt.Rows || jurisdiction.EndsWith("S"))
            {
                return dt;
            }
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                String ghost = Convert.ToString(dt.Rows[i]["Ghost"]);
                // 判定ghost所属User是否属于Admin账户
                if (jurisdiction.EndsWith("A"))
                {
                    // todo need to use a real "company"
                    DataTable ghostDt = new AutoBwsBLL.GhostBLL().GetGhostByGhostName(ghost, "IBCBet");
                    int agentId = Convert.ToInt32(ghostDt.Rows[0]["belong2Agent"]);
                    AutoBwsModel.Agent agent = new AutoBwsBLL._EngineBLL().getEngineAgentByID(agentId);
                    int userId = agent.Partner.Id;
                    int id = Convert.ToInt32(new AutoBwsBLL.AdminBLL().GetAdminById(userId).Rows[0]["parentId"]);
                    string name = new AutoBwsBLL.AdminBLL().GetAdminById(id).Rows[0]["loginName"].ToString();
                    if (name == loginName)
                    {
                        continue;
                    }
                }
                bool flag = rBLL.CheckGhostBelong2Partner(ghost, loginName);
                if (!flag)
                {
                    dt.Rows[i]["Ghost"] = "Ghost" + (i + 1);
                }
            }

            return dt;
        }