예제 #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string manaNum = this.untx.Value.Trim();
     ManaData model = new ManaDataManager().GetModel(manaNum);
     if ((model == null) || !model.isSenhe)
     {
         this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('点位不存在或未审核');", true);
     }
     else
     {
         this.groupLb.Text = Mark.GetGroupName(model.groupId);
         this.DropDownList1.Items.Clear();
         if (model.groupId == 4)
         {
             this.DropDownList1.Items.Add(new ListItem(Mark.GetGroupName(4), "4"));
             this.addUserBtn.Enabled = false;
         }
         else
         {
             for (int i = model.groupId + 1; i <= 4; i++)
             {
                 this.DropDownList1.Items.Add(new ListItem(Mark.GetGroupName(i), i.ToString()));
             }
             this.addUserBtn.Enabled = true;
         }
     }
 }
예제 #2
0
 protected void GetData()
 {
     UserData model = new UserDataManager().GetModel(this.userName);
     this.addUserBtn.Enabled = true;
     if ((model == null) || !model.isSenhe)
     {
         this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('请退出重新登录后再操作');", true);
     }
     else
     {
         List<ManaData> list = new ManaDataManager().GetList(model.userName);
         this.DropDownList2.Items.Clear();
         foreach (ManaData data2 in list)
         {
             this.DropDownList2.Items.Add(new ListItem(data2.manaNum, data2.manaNum));
         }
         this.ficitLb.Text = model.zhuceMoney.ToString("F2");
         this.lastMoneyLb.Text = model.lastMoney.ToString("F2");
         this.GetNewGroup(list[0].manaNum);
         if (model.isKou == 0)
         {
             this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('您是空单,不能升级');", true);
             this.addUserBtn.Enabled = false;
         }
     }
 }
예제 #3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string manaNum = this.untx.Text.Trim();
     ManaData model = new ManaDataManager().GetModel(manaNum);
     if ((model == null) || !model.isSenhe)
     {
         this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('您输入的编号不存在或者未审核');", true);
     }
     else
     {
         this.DataTopBing(manaNum);
     }
 }
예제 #4
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string manaNum = this.untx.Text.Trim();
     ManaData model = new ManaDataManager().GetModel(manaNum);
     if ((model != null) && model.isSenhe)
     {
         while ((model != null) && (model.manaNum != this.topName))
         {
             model = new ManaDataManager().GetModel(model.topName);
         }
         if (model == null)
         {
             this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('您搜索的账号不在您的管理区');", true);
         }
         else
         {
             this.DataTopBing(manaNum);
         }
     }
     else
     {
         this.Page.ClientScript.RegisterStartupScript(base.GetType(), "", "alert('您输入的账号不存在或者未审核');", true);
     }
 }
예제 #5
0
    private void databingtable(string manaNum, ImageButton img1, Label unlb, Label rnlb, Label mn1, Label mn2, HtmlTableCell td, string Name, int isLeft)
    {
        if (((manaNum == "0") || (manaNum == "")) || (manaNum == null))
        {
            if (Name == "")
            {
                img1.AlternateText = this.topName;
                img1.ImageUrl = "~/Images/p6.gif";
                unlb.Text = "空位";
                rnlb.Text = "";
                mn1.Text = "";
                mn2.Text = "";
                td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
            }
            else
            {
                img1.AlternateText = this.topName;
                img1.ImageUrl = "~/Images/p6.gif";
                unlb.Text = string.Concat(new object[] { "<a href='ad_AddUser.aspx?tn=", Name, "&il=", isLeft, "'>注册</a>" });
                rnlb.Text = "";
                mn1.Text = "";
                mn2.Text = "";
                td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
            }
        }
        else
        {
            ManaData model = new ManaDataManager().GetModel(manaNum);
            if (!model.isSenhe)
            {
                img1.AlternateText = this.topName;
                img1.ImageUrl = "~/Images/p6.gif";
                unlb.Text = "未审核";
                rnlb.Text = "";
                mn1.Text = "";
                mn2.Text = "";
                td.Style[HtmlTextWriterStyle.BackgroundColor] = "#F5DBC2";
            }
            else
            {
                img1.AlternateText = model.manaNum;
                switch (model.groupId)
                {
                    case 1:
                        img1.ImageUrl = "~/Images/p1.gif";
                        td.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                        break;

                    case 2:
                        img1.ImageUrl = "~/Images/p2.gif";
                        td.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                        break;

                    case 3:
                        img1.ImageUrl = "~/Images/p4.gif";
                        td.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                        break;

                    case 4:
                        img1.ImageUrl = "~/Images/p5.gif";
                        td.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                        break;

                    default:
                        img1.ImageUrl = "~/Images/p6.gif";
                        td.Style[HtmlTextWriterStyle.BackgroundColor] = "#F5DBC2";
                        break;
                }
                unlb.Text = model.manaNum;
                rnlb.Text = new UserDataManager().GetRealName(model.fromName);
                mn1.Text = model.leftCount.ToString("F2");
                mn2.Text = model.rightCount.ToString("F2");
            }
        }
    }
예제 #6
0
 private void right3Bind(string manaNum, string Name)
 {
     ManaData model = new ManaDataManager().GetModel(manaNum);
     this.databingtable(manaNum, this.rightimg3, this.rightunlb3, this.rightrnlb3, this.r3mn1, this.r3mn2, this.righttd3, Name, 2);
     if (model == null)
     {
         this.right6Bind("0", manaNum);
         this.right7Bind("0", manaNum);
     }
     else
     {
         this.right6Bind(model.leftLower, manaNum);
         this.right7Bind(model.rightLower, manaNum);
     }
 }
예제 #7
0
 private void right2Bind(string manaNum, string Name)
 {
     ManaData model = new ManaDataManager().GetModel(manaNum);
     this.databingtable(manaNum, this.rightimg2, this.rightunlb2, this.rightrnlb2, this.r2mn1, this.r2mn2, this.righttd2, Name, 1);
     if (model == null)
     {
         this.right4Bind("0", manaNum);
         this.right5Bind("0", manaNum);
     }
     else
     {
         this.right4Bind(model.leftLower, manaNum);
         this.right5Bind(model.rightLower, manaNum);
     }
 }
예제 #8
0
 private void left1Bind(string manaNum, string Name)
 {
     ManaData model = new ManaDataManager().GetModel(manaNum);
     this.databingtable(manaNum, this.leftimg1, this.leftunlb1, this.leftrnlb1, this.l1mn1, this.l1mn2, this.lefttd1, Name, 0);
     if (model == null)
     {
         this.left2Bind("0", manaNum);
         this.left3Bind("0", manaNum);
     }
     else
     {
         this.left2Bind(model.leftLower, manaNum);
         this.left3Bind(model.rightLower, manaNum);
     }
 }
예제 #9
0
    private void DataTopBing(string manaNum)
    {
        ManaData model = new ManaDataManager().GetModel(manaNum);
        if (manaNum == this.topName)
        {
            this.LinkButton1.ToolTip = model.manaNum;
            this.topImg.AlternateText = model.manaNum;
        }
        else
        {
            this.LinkButton1.ToolTip = model.topName;
            this.topImg.AlternateText = model.topName;
        }
        switch (model.groupId)
        {
            case 1:
                this.topImg.ImageUrl = "~/Images/p1.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                break;

            case 2:
                this.topImg.ImageUrl = "~/Images/p2.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                break;

            case 3:
                this.topImg.ImageUrl = "~/Images/p4.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                break;

            case 4:
                this.topImg.ImageUrl = "~/Images/p5.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFB9B9";
                break;

            default:
                this.topImg.ImageUrl = "~/Images/p6.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#F5DBC2";
                break;
        }
        this.topunlb.Text = model.manaNum;
        this.toprnlb.Text = new UserDataManager().GetRealName(model.manaNum);
        this.tmb1.Text = model.leftCount.ToString("F2");
        this.tmn2.Text = model.rightCount.ToString("F2");
        this.left1Bind(model.leftLower, model.manaNum);
        this.right1Bind(model.rightLower, model.manaNum);
    }
예제 #10
0
    private void GetNewGroup(string manaNum)
    {
        ManaData model = new ManaDataManager().GetModel(manaNum);
        this.groupLb.Text = Mark.GetGroupName(model.groupId);
        this.DropDownList1.Items.Clear();
        if (model.groupId == 4)
        {
            this.DropDownList1.Items.Add(new ListItem(Mark.GetGroupName(4), "4"));
            this.addUserBtn.Enabled = false;
        }
        else
        {
            for (int i = model.groupId + 1; i <= 4; i++)
            {
                switch (i)
                {
                    case 1:
                        this.oneGroupMoneyInput.Value = new GroupSysManager().GetModel(i).regMoney.ToString("F2");
                        this.oneGroupNameInput.Value = Mark.GetGroupName(i);
                        break;

                    case 2:
                        this.twoGroupMoneyInput.Value = new GroupSysManager().GetModel(i).regMoney.ToString("F2");
                        this.twoGroupNameInput.Value = Mark.GetGroupName(i);
                        break;

                    case 3:
                        this.thrGroupMoneyInput.Value = new GroupSysManager().GetModel(i).regMoney.ToString("F2");
                        this.thrGroupNameInput.Value = Mark.GetGroupName(i);
                        break;

                    case 4:
                        this.forGroupMoneyInput.Value = new GroupSysManager().GetModel(i).regMoney.ToString("F2");
                        this.forGroupNameInput.Value = Mark.GetGroupName(i);
                        break;
                }
                this.DropDownList1.Items.Add(new ListItem(Mark.GetGroupName(i), i.ToString()));
            }
            this.addUserBtn.Enabled = true;
        }
    }
예제 #11
0
    private void databingtable(string manaNum, ImageButton img1, Label unlb, Label rnlb, Label mn1, Label mn2, HtmlTableCell td, string Name, int isLeft)
    {
        ManaData model = new ManaDataManager().GetModel(manaNum);
        if (model == null)
        {
            if (Name == "")
            {
                img1.AlternateText = this.topName;
                img1.ImageUrl = "Images/p6.gif";
                unlb.Text = "空位";
                rnlb.Text = "";
                mn1.Text = "";
                mn2.Text = "";
                td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
            }
            else
            {
                img1.AlternateText = this.topName;
                img1.ImageUrl = "Images/p6.gif";
                unlb.Text = string.Concat(new object[] { "<a href='u_AddUsers.aspx?tn=", Name, "&il=", isLeft, "'><span style='background-color:#FFCC99;padding-left:5px; padding-right:5px'>注册</span></a>" });
                rnlb.Text = "";
                mn1.Text = "";
                mn2.Text = "";
                td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
            }
        }
        else if (!model.isSenhe)
        {
            img1.AlternateText = this.topName;
            img1.ImageUrl = "Images/p6.gif";
            unlb.Text = "未审核";
            rnlb.Text = "";
            mn1.Text = "";
            mn2.Text = "";
            td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
        }
        else
        {
            img1.AlternateText = model.manaNum;
            switch (model.groupId)
            {
                case 1:
                    img1.ImageUrl = "Images/p1.gif";
                    td.Style[HtmlTextWriterStyle.BackgroundColor] = "#97C618";
                    break;

                case 2:
                    img1.ImageUrl = "Images/p2.gif";
                    td.Style[HtmlTextWriterStyle.BackgroundColor] = "#00549D";
                    break;

                case 3:
                    img1.ImageUrl = "Images/p4.gif";
                    td.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFBA00";
                    break;

                case 4:
                    img1.ImageUrl = "Images/p5.gif";
                    td.Style[HtmlTextWriterStyle.BackgroundColor] = "#B20003";
                    break;

                default:
                    img1.ImageUrl = "Images/p6.gif";
                    td.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
                    break;
            }
            unlb.Text = model.manaNum;
            rnlb.Text = new UserDataManager().GetNiCheng(model.fromName);
            mn1.Text = model.leftCount.ToString();
            mn2.Text = model.rightCount.ToString();
        }
    }
예제 #12
0
    private void DataTopBing(string manaNum)
    {
        ManaData model = new ManaDataManager().GetModel(manaNum);
        if (manaNum == this.topName)
        {
            this.LinkButton1.ToolTip = model.manaNum;
            this.topImg.AlternateText = model.manaNum;
        }
        else
        {
            this.LinkButton1.ToolTip = model.topName;
            this.topImg.AlternateText = model.topName;
        }
        switch (model.groupId)
        {
            case 1:
                this.topImg.ImageUrl = "Images/p1.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#97C618";
                break;

            case 2:
                this.topImg.ImageUrl = "Images/p2.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#00549D";
                break;

            case 3:
                this.topImg.ImageUrl = "Images/p4.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#FFBA00";
                break;

            case 4:
                this.topImg.ImageUrl = "Images/p5.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#B20003";
                break;

            default:
                this.topImg.ImageUrl = "Images/p6.gif";
                this.toptd.Style[HtmlTextWriterStyle.BackgroundColor] = "#79554E";
                break;
        }
        this.topunlb.Text = model.manaNum;
        this.toprnlb.Text = new UserDataManager().GetNiCheng(model.fromName);
        this.tmb1.Text = model.leftCount.ToString();
        this.tmn2.Text = model.rightCount.ToString();
        this.left1Bind(model.leftLower, model.manaNum);
        this.right1Bind(model.rightLower, model.manaNum);
    }