Пример #1
0
 private void OpUser(string flag, string id, string dlsid)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "0", 1))
     {
         MyFunc.goToLoginPage();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         if (flag == "1")
         {
             SqlDataReader reader = base2.ExecuteReader("SELECT dlsid,zdlid,gdid FROM member WHERE userid=" + id);
             reader.Read();
             string text3 = reader["dlsid"].ToString().Trim();
             string text = reader["zdlid"].ToString().Trim();
             string text2 = reader["gdid"].ToString().Trim();
             reader.Close();
             int num = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text3).ToString());
             if (num > 0)
             {
                 int num2 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE dlsid=" + text3 + " AND isuseable=1").ToString());
                 if (num < (num2 + 1))
                 {
                     base2.Dispose();
                     MyFunc.showmsg("该代理商的最大会员数为 " + num.ToString() + ",不能再启用会员");
                     base.Response.End();
                     return;
                 }
             }
             else
             {
                 int num3 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text).ToString());
                 if (num3 > 0)
                 {
                     int num4 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE zdlid=" + text + " AND isuseable=1").ToString());
                     if (num3 < (num4 + 1))
                     {
                         base2.Dispose();
                         MyFunc.showmsg("您的最大会员数为 " + num.ToString() + ",不能再启用会员");
                         base.Response.End();
                         return;
                     }
                 }
                 else
                 {
                     int num5 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text2).ToString());
                     if (num5 > 0)
                     {
                         int num6 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE gdid=" + text2 + " AND isuseable=1").ToString());
                         if (num5 < (num6 + 1))
                         {
                             base2.Dispose();
                             MyFunc.showmsg("该股东的最大会员数为 " + num.ToString() + ",不能再启用会员");
                             base.Response.End();
                             return;
                         }
                     }
                 }
             }
         }
         base2.ExecuteNonQuery("UPDATE member SET isuseable=" + flag + " WHERE userid=" + id);
         base2.Dispose();
     }
 }
Пример #2
0
        private string SumAllMember()
        {
            string        text2   = "";
            string        text3   = "";
            string        text4   = "";
            int           index   = 0;
            DataBase      base2   = new DataBase(MyFunc.GetConnStr(2));
            DataBase      base3   = new DataBase(MyFunc.GetConnStr(1));
            SqlDataReader reader  = null;
            SqlDataReader reader2 = null;
            DataSet       set     = null;
            double        num3    = 0;

            string[] textArray = "01,11,21,31,41,特单,02,12,22,32,42,特双,03,13,23,33,43,特大,04,14,24,34,44,特小,05,15,25,35,45,合单,06,16,26,36,46,合双,07,17,27,37,47,08,18,28,38,48,09,19,29,39,49,10,20,30,40".Split(new char[] { ',' });
            reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,content,qishu,kaisai FROM affiche WHERE le=1 ORDER BY updatetime DESC");
            if (reader.Read())
            {
                DateTime time = Convert.ToDateTime(reader["kaisai"].ToString().Trim());
                TimeSpan span = DateTime.Now.Subtract(time);
                int      num4 = ((span.Days * 0x5a0) + (span.Hours * 60)) + span.Minutes;
                if (num4 < 360)
                {
                    object obj2 = text2;
                    text2 = string.Concat(new object[] { obj2, "<tr bgcolor='#FFFFFF' ><td rowspan=10>", reader["kaisai"].ToString().Split(new char[] { ' ' })[0].ToString().Trim(), "<BR>", reader["kaisai"].ToString().Split(new char[] { ' ' })[1].ToString().Trim(), "</td><td rowspan=10 align=center>", reader["qishu"], "</td>" });
                    text4 = reader["kaisai"].ToString();
                    reader.Close();
                    set     = base3.ExecuteDataSet("SELECT v1.*,isnull((cl.giveup1sum-cl.giveup2sum)/cl.giveupmoney*giveuppl,0) as give FROM Pl as v1 LEFT JOIN changeleave as cl ON (v1.id = cl.ballid AND cl.gsid = '" + this.Session["usergsid"].ToString() + "')  where ((id>0 and id<7 )or (id>34 and id <84)) order by id asc");
                    reader2 = base2.ExecuteReader("select userid  from agence where gdid=" + this.Session["adminuserid"].ToString());
                    string text5 = "";
                    while (reader2.Read())
                    {
                        text5 = text5 + reader2["userid"].ToString().Trim() + ",";
                    }
                    reader2.Close();
                    text5 = text5 + "0";
                    for (int i = 0; i < 10; i++)
                    {
                        if (i != 0)
                        {
                            text2 = text2 + "<tr bgcolor='#FFFFFF' >";
                        }
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 6]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 6]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i + 6]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[i + 6]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        string text7 = text2;
                        text2 = text7 + "<td align=center background=" + MyFunc.GetRGB(textArray[index]) + " class=nums><font color=" + MyFunc.GetRGB(int.Parse(textArray[index])) + " size=3><b>" + textArray[index++] + "</b></font></td>";
                        if (reader2.Read())
                        {
                            string text8 = text2;
                            text2 = text8 + "<td align=center bgcolor=#FFFFFF ><font color=#CC0000>" + text3 + "</font>   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[i + 6]["id"].ToString().Trim() + "&tztype=8&marker=C'><span class=tznumer>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></span></a></td> ";
                            num3 += double.Parse(reader2["summoney"].ToString());
                        }
                        else
                        {
                            text2 = text2 + "<td align=center><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                        }
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x10]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x10]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i + 0x10]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[i + 0x10]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        string text9 = text2;
                        text2 = text9 + "<td align=center background=" + MyFunc.GetRGB(textArray[index]) + " class=nums><font color=" + MyFunc.GetRGB(int.Parse(textArray[index])) + " size=3><b>" + textArray[index++] + "</b></font></td>";
                        if (reader2.Read())
                        {
                            string text10 = text2;
                            text2 = text10 + "<td align=center bgcolor=#FFFFFF><font color=#CC0000>" + text3 + "</font>   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[i + 0x10]["id"].ToString().Trim() + "&tztype=8&marker=C'>  <span class=tznumer><font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</span></font></a></td> ";
                            num3 += double.Parse(reader2["summoney"].ToString());
                        }
                        else
                        {
                            text2 = text2 + "<td align=center><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                        }
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x1a]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x1a]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i + 0x1a]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[i + 0x1a]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        string text11 = text2;
                        text2 = text11 + "<td align=center background=" + MyFunc.GetRGB(textArray[index]) + " class=nums><font color=" + MyFunc.GetRGB(int.Parse(textArray[index])) + " size=3><b>" + textArray[index++] + "</b></font></td>";
                        if (reader2.Read())
                        {
                            string text12 = text2;
                            text2 = text12 + "<td align=center bgcolor=#FFFFFF ><font color=#CC0000>" + text3 + "</font>   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[i + 0x1a]["id"].ToString().Trim() + "&tztype=8&marker=C'>  <span class=tznumer><font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></span></a></td> ";
                            num3 += double.Parse(reader2["summoney"].ToString());
                        }
                        else
                        {
                            text2 = text2 + "<td align=center ><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                        }
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x24]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x24]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i + 0x24]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[i + 0x24]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        string text13 = text2;
                        text2 = text13 + "<td align=center background=" + MyFunc.GetRGB(textArray[index]) + " class=nums><font color=" + MyFunc.GetRGB(int.Parse(textArray[index])) + " size=3><b>" + textArray[index++] + "</b></font></td>";
                        if (reader2.Read())
                        {
                            string text14 = text2;
                            text2 = text14 + "<td align=center bgcolor=#FFFFFF ><font color=#CC0000>" + text3 + "</font>   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[i + 0x24]["id"].ToString().Trim() + "&tztype=8&marker=C'>  <span class=tznumer><font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></span></a></td> ";
                            num3 += double.Parse(reader2["summoney"].ToString());
                        }
                        else
                        {
                            text2 = text2 + "<td align=center ><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                        }
                        reader2.Close();
                        if (i < 9)
                        {
                            if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                            {
                                reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x2e]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                            }
                            else
                            {
                                reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i + 0x2e]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                            }
                            text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i + 0x2e]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[i + 0x2e]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                            string text15 = text2;
                            text2 = text15 + "<td align=center background=" + MyFunc.GetRGB(textArray[index]) + " class=nums><font color=" + MyFunc.GetRGB(int.Parse(textArray[index])) + " size=3><b>" + textArray[index++] + "</b></font></td>";
                            if (reader2.Read())
                            {
                                string text16 = text2;
                                text2 = text16 + "<td align=center bgcolor=#FFFFFF ><font color=#CC0000>" + text3 + "</font>   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[i + 0x2e]["id"].ToString().Trim() + "&tztype=8&marker=C'>  <span class=tznumer><font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></span></a></td> ";
                                num3 += double.Parse(reader2["summoney"].ToString());
                            }
                            else
                            {
                                text2 = text2 + "<td align=center ><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                            }
                            reader2.Close();
                        }
                        else
                        {
                            text2 = text2 + "<td colspan=2>&nbsp;</td>";
                        }
                        if (i < 6)
                        {
                            if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                            {
                                reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                            }
                            else
                            {
                                reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*(1-csgd-cszdl-csdls)),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and gdid in (" + text5 + ") and ballid=" + set.Tables[0].Rows[i]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                            }
                            text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[i]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[i]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                            text2 = text2 + "<td align=center>" + textArray[index++] + "</td>";
                            if (reader2.Read())
                            {
                                object   obj3      = text2;
                                object[] objArray2 = new object[] { obj3, "<td align=center bgcolor=#FFFFFF><font color=#CC0000>", text3, "</font>   <br>  <a href='tzinfo.aspx?gameid=", set.Tables[0].Rows[i]["id"].ToString().Trim(), "&tztype=", int.Parse(((i + 2) / 2).ToString()), "&marker=C'>  <span class=tznumer><font color=#000088>", double.Parse(reader2["summoney"].ToString()).ToString(), "</font></span></a></td> </tr>" };
                                text2 = string.Concat(objArray2);
                            }
                            else
                            {
                                text2 = text2 + "<td align=center bgcolor=#FFFFFF><font color=#CC0000>" + text3 + "</font>   <br>    <span class=tznumer><font color=#000088>0</font></span></a></td> ";
                            }
                            reader2.Close();
                        }
                        else
                        {
                            text2 = text2 + "<td colspan=2>&nbsp;</td></tr>";
                        }
                    }
                    set.Dispose();
                }
            }
            reader.Close();
            base3.CloseConnect();
            base3.Dispose();
            base2.CloseConnect();
            base2.Dispose();
            string text17 = text2;

            string[] textArray24 = new string[8];
            textArray24[0] = text17;
            textArray24[1] = "<tr bgcolor='#ffffff' height='25' ><td colspan=14>本页总额<b><font color=blue>";
            textArray24[2] = num3.ToString();
            textArray24[3] = "</font></b>元(49粒),码均<b><font color=black>";
            textArray24[4] = (num3 / 49).ToString("F2");
            textArray24[5] = "</font></b>元;按陪率42(12水)估算:如中到<b><font color=red>";
            double num26 = (num3 * 0.88) / 42;

            textArray24[6] = double.Parse(num26.ToString()).ToString("F2");
            textArray24[7] = "</font></b>元投注额,本项目您将输彩</td></tr>";
            return(string.Concat(textArray24) + "\n</table></form></body></html>");
        }
Пример #3
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            string text7 = "";
            string text6 = this.TextBoxGsID.Text.Trim();
            string input = this.TextBoxUserName.Text.Trim();
            string text2 = this.TextBoxNewpass1.Text.Trim();
            string text3 = this.TextBoxNewpass2.Text.Trim();
            string text4 = this.TextBoxTrueName.Text.Trim();
            string s     = this.TextBoxUseMoney.Text.Trim();
            string text8 = this.TextBoxMaxMem.Text.Trim();

            if (((text6 == "") || (input == "")) || ((text4 == "") || (text8 == "")))
            {
                MyFunc.showmsg("请输入公司帐号,名称,成数和最大会员数");
                base.Response.End();
            }
            else
            {
                Regex regex  = new Regex("[^'*%=\"<>/|]");
                Regex regex2 = new Regex("[^'*%=\"<>/|]");
                if (!regex.IsMatch(input) || !regex2.IsMatch(text4))
                {
                    MyFunc.showmsg("公司帐号或股东名里含有非法字符");
                    base.Response.End();
                }
                else
                {
                    if ((text2 != "") && (text3 != ""))
                    {
                        if (text2 != text3)
                        {
                            MyFunc.showmsg("输入的密码不相同");
                            return;
                        }
                        text7 = ",userpass='******'";
                    }
                    if (text4.Length > 8)
                    {
                        MyFunc.showmsg("公司名称不能大于8个字符(4个汉字)");
                        base.Response.End();
                    }
                    else
                    {
                        try
                        {
                            if (int.Parse(s) >= 0)
                            {
                                try
                                {
                                    int.Parse(text8);
                                }
                                catch
                                {
                                    MyFunc.showmsg("请输入正确的最大会员数");
                                    base.Response.End();
                                    return;
                                }
                                DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
                                if (int.Parse(base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE userid=" + text6).ToString()) < 1)
                                {
                                    base2.Dispose();
                                    MyFunc.showmsg("没有该公司");
                                }
                                else
                                {
                                    string text9 = base2.ExecuteScalar("select arrgd+'-1' from agence where userid ='" + text6 + "'").ToString();
                                    int    num2  = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE gdid in (" + text9 + ")").ToString());
                                    if ((num2 > int.Parse(text8)) && (int.Parse(text8) != 0))
                                    {
                                        base2.Dispose();
                                        MyFunc.showmsg("该公司已有 " + num2.ToString() + " 个会员,设置的最大会员数最小为" + num2.ToString());
                                        base.Response.End();
                                    }
                                    else if (base2.ExecuteNonQuery("UPDATE agence SET truename='" + text4 + "'" + text7 + ",maxmem=" + text8 + ",usemoney=" + s + " WHERE userid=" + text6) > 0)
                                    {
                                        base2.Dispose();
                                        MyFunc.JumpPage("修改公司成功!", "gslist.aspx");
                                    }
                                    else
                                    {
                                        base2.Dispose();
                                        MyFunc.showmsg("修改公司失败!");
                                    }
                                }
                            }
                            else
                            {
                                MyFunc.showmsg("请输入正确的信用额度");
                                base.Response.End();
                            }
                        }
                        catch
                        {
                            MyFunc.showmsg("请输入正确的信用额度");
                            base.Response.End();
                        }
                    }
                }
            }
        }
Пример #4
0
        private void Page_Load(object sender, EventArgs e)
        {
            MyFunc.isRefUrl();
            if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
            {
                MyFunc.goToLoginPage();
                base.Response.End();
            }
            else if (!base.IsPostBack)
            {
                if ((base.Request.QueryString["id"] != null) && (base.Request.QueryString["id"].ToString().Trim() != ""))
                {
                    string   text  = base.Request.QueryString["id"].ToString().Trim().Replace(" ", "").Replace("'", "");
                    DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
                    if (int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM ball_order WHERE orderid=" + text).ToString()) > 1)
                    {
                        base2.Dispose();
                        MyFunc.showmsg("该注单号重复,不能修改");
                        base.Response.End();
                        return;
                    }
                    SqlDataReader reader = base2.ExecuteReader("SELECT TOP 1 * FROM ball_order WHERE orderid=" + text);
                    if (reader.Read())
                    {
                        this.TextBoxOrderid.Text  = reader["orderid"].ToString().Trim();
                        this.TextBoxContent.Text  = reader["content"].ToString().Trim();
                        this.TextBoxTzMoney.Text  = double.Parse(reader["tzmoney"].ToString().Trim()).ToString();
                        this.TextBoxTzTime.Text   = DateTime.Parse(reader["updatetime"].ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss");
                        this.TextBoxDlsMoney.Text = reader["mdls"].ToString().Trim();
                        this.TextBoxZdlMoney.Text = reader["mzdl"].ToString().Trim();
                        this.TextBoxGdMoney.Text  = reader["mgd"].ToString().Trim();
                        this.TextBoxWin.Text      = double.Parse(reader["win"].ToString().Trim()).ToString("F2");
                        this.TextBoxLose.Text     = double.Parse(reader["lose"].ToString().Trim()).ToString("F2");
                        this.TextBoxUserHs_w.Text = double.Parse(reader["hsuser_w"].ToString().Trim()).ToString("F2");
                        this.TextBoxUserHs_l.Text = double.Parse(reader["hsuser_l"].ToString().Trim()).ToString("F2");
                        this.TextBoxDlsHs_w.Text  = double.Parse(reader["hsdls_w"].ToString().Trim()).ToString("F2");
                        this.TextBoxDlsHs_l.Text  = double.Parse(reader["hsdls_l"].ToString().Trim()).ToString("F2");
                        this.TextBoxZdlHs_w.Text  = double.Parse(reader["hszdl_w"].ToString().Trim()).ToString("F2");
                        this.TextBoxZdlHs_l.Text  = double.Parse(reader["hszdl_l"].ToString().Trim()).ToString("F2");
                        this.TextBoxGdHs_w.Text   = double.Parse(reader["hsgd_w"].ToString().Trim()).ToString("F2");
                        this.TextBoxGdHs_l.Text   = double.Parse(reader["hsgd_l"].ToString().Trim()).ToString("F2");
                        switch (reader["tztype"].ToString().Trim())
                        {
                        case "5":
                        case "20":
                        case "24":
                        case "27":
                        case "28":
                            this.TextBoxTzTeam.Text = (reader["ds"].ToString().Trim() == "1") ? "H" : "C";
                            break;

                        case "8":
                            this.TextBoxTzTeam.Text = (int.Parse(reader["tzteam"].ToString().Trim()) - 0x22).ToString();
                            break;

                        default:
                            this.TextBoxTzTeam.Text = reader["tzteam"].ToString().Trim();
                            break;
                        }
                        this.TextBoxTzType.Text                 = reader["tztype"].ToString().Trim();
                        this.DropDownListJs.SelectedValue       = (reader["isjs"].ToString().Trim().ToUpper() == "TRUE") ? "1" : "0";
                        this.DropdownlistIsCancel.SelectedValue = (reader["iscancel"].ToString().Trim() == "TRUE") ? "1" : "0";
                        this.TextBoxDS.Text = reader["dxc"].ToString().Trim();
                        this.TextBoxPl.Text = double.Parse(reader["curpl"].ToString().Trim()).ToString("F3");
                    }
                    reader.Close();
                    base2.Dispose();
                }
                this.TextBoxWin.Attributes["onKeyUp"]  = "SumMoney()";
                this.TextBoxLose.Attributes["onKeyUp"] = "SumMoney()";
            }
        }
        private void ShowBallOrderContent()
        {
            int    curpage;
            int    start;
            string text  = "";
            string sql   = "";
            string text3 = "";
            int    num   = 0;
            double num2  = 0;
            double num3  = 0;
            double num4  = 0;

            sql   = "SELECT cszdl,tzmoney*cszdl as csres,convert(numeric(5,2),hsuser_w) as hsuser_w,convert(numeric(5,2),hsuser_l) as hsuser_l,dbo.GettzType_Func(tzType) as tzTypeName,tzType,updatetime,username,content,tzmoney,isnull((win-lose),0) as result,abc,iscancel FROM ball_order where datediff(day,'" + this.upDateTime + "',updatetime) = 0 and userid='" + this.userId + "'";
            text3 = "select count(*) from ball_order where datediff(day,'" + this.upDateTime + "',updatetime) = 0 and userid='" + this.userId + "'";
            DataBase base2 = new DataBase(MyFunc.GetConnStr(2));

            text = "<table border=0 cellspacing=1 cellpadding=0 class=tableNoBorder1 width=100%>\n";
            text = text + "<tr class=dlsheader><td width=10%>时间</td><td width=15%>退水 (win/lose)</td><td width=10%>投注方式</td><td width=25%>详情</td><td width=10%>注额</td><td width=10%>成数</td><td width=10%>注额(成数)</td><td width=10%>结果</td></tr>\n";
            int pagesize = 100;

            try
            {
                curpage = int.Parse(this.selectpage.Value);
            }
            catch
            {
                curpage = 1;
            }
            if (curpage < 1)
            {
                curpage = 1;
            }
            int totalrecord = int.Parse(base2.ExecuteScalar(text3).ToString());

            if (totalrecord == 0)
            {
                start = 0;
            }
            else
            {
                if (((curpage - 1) * pagesize) >= totalrecord)
                {
                    curpage = 1;
                }
                start = (curpage - 1) * pagesize;
            }
            DataSet set = base2.ExecuteDataSet(sql, start, pagesize, "ball_order");

            for (int i = 0; i < set.Tables[0].Rows.Count; i++)
            {
                num++;
                string text4 = (((text + "<tr bgcolor=white align=right height=22>") + "<td align=center>" + DateTime.Parse(set.Tables[0].Rows[i]["updatetime"].ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss").ToUpper().Replace(" ", "<br>") + "</td>") + "<td align=center nowrap><table border=0 cellspacing=0 cellpadding=0><tr><td><font color=red>" + set.Tables[0].Rows[i]["abc"].ToString() + "</font>&nbsp;</td>") + "<td align=center nowrap>&nbsp;" + set.Tables[0].Rows[i]["username"].ToString() + "&nbsp;</td>";
                text = (((((text4 + "<td nowrap>&nbsp;<font color=red>" + set.Tables[0].Rows[i]["hsuser_w"].ToString() + "</font>/<font color=red>" + set.Tables[0].Rows[i]["hsuser_l"].ToString() + "</font></td></tr></table></td>") + "<td align=center>" + set.Tables[0].Rows[i]["tzTypeName"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["content"].ToString() + "</td>") + "<td>" + Convert.ToDouble(set.Tables[0].Rows[i]["tzmoney"]).ToString() + "</td>") + "<td>" + Convert.ToDouble(set.Tables[0].Rows[i]["cszdl"]).ToString("F1") + "</td>") + "<td>" + MyFunc.NumBerFormat(set.Tables[0].Rows[i]["csres"].ToString()) + "</td>";
                if (set.Tables[0].Rows[i]["iscancel"].ToString().ToLower() == "true")
                {
                    text = text + "<td><font color='red'>取消</font></td>";
                }
                else
                {
                    text = text + "<td>" + MyFunc.NumBerFormat(set.Tables[0].Rows[i]["result"].ToString()) + "</td>";
                }
                text  = text + "</tr>\n";
                num2 += double.Parse(set.Tables[0].Rows[i]["tzmoney"].ToString());
                num3 += double.Parse(set.Tables[0].Rows[i]["csres"].ToString());
                num4 += double.Parse(set.Tables[0].Rows[i]["result"].ToString());
            }
            set.Clear();
            base2.Dispose();
            this.setselectpageproc(pagesize, totalrecord, curpage);
            text = ((((((text + "<tr class=reportTotalnum align=right height=22><td colspan=3>&nbsp;</td>") + "<td>" + num.ToString() + "</td>") + "<td>" + num2.ToString() + "</td>") + "<td colspan=3>" + MyFunc.NumBerFormat(num4.ToString()) + "</td></tr>") + "</table>\n" + "<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor=white>\n") + "<tr><td width=100% height=12></td></tr>\n</table>\n" + "<table border=0 cellspacing=1 cellpadding=0 class=tableNoBorder1 width=100%>\n") + "<tr class=dlsreport1><td width=30%>总代理</td><td width=10%>笔数</td><td width=18%>投注额</td><td width=18%>注额(成数)</td><td width=18%>结果</td></tr>\n" + "<tr class=reportTotalnum align=right height=22>";
            if ((this.Session.Contents["adminsubid"] != null) && (this.Session.Contents["adminsubid"].ToString() != ""))
            {
                text = text + "<td>" + this.Session.Contents["adminsubname"].ToString() + "</td>";
            }
            else
            {
                text = text + "<td>" + this.Session.Contents["adminusername"].ToString() + "</td>";
            }
            text = (((text + "<td>" + num.ToString() + "</td>") + "<td>" + num2.ToString() + "</td>") + "<td>" + num3.ToString() + "</td>") + "<td>" + MyFunc.NumBerFormat(num4.ToString()) + "</td></tr></table>";
            this.tableContent.Rows[0].Cells[0].InnerHtml = text;
        }
Пример #6
0
        private void ButtonLogin_Click(object sender, EventArgs e)
        {
            string text  = this.TextBoxUserName.Text.Trim().ToLower();
            string text2 = this.TextBoxUserPass.Text.Trim();
            string text3 = base.Request.UserHostAddress.Trim();
            string text4 = DateTime.Now.ToString().Trim();

            if ((text == "") || (text2 == ""))
            {
                MyFunc.showmsg("请输入帐号和密码!");
                base.Response.End();
            }
            else if ((text.Length > 15) || (text2.Length > 15))
            {
                MyFunc.showmsg("用户名或密码的长度不能超过15!");
                base.Response.End();
            }
            else
            {
                DataBase      db     = new DataBase(MyFunc.GetConnStr(2));
                SqlDataReader reader = null;
                reader = db.ExecuteReader("SELECT userid,username,userpass,classid,arrgd,islock FROM agence WHERE username='******' AND classid=0 AND isuseable=1 and userid in (" + MyFunc.GetGongSiID().ToString() + ")");
                if (!reader.Read())
                {
                    reader.Close();
                    db.Dispose();
                    MyFunc.showmsg("帐号或密码错误!");
                    base.Response.End();
                }
                else if ((text != reader["username"].ToString().Trim()) || (text2 != reader["userpass"].ToString().Trim()))
                {
                    reader.Close();
                    db.Dispose();
                    MyFunc.showmsg("帐号或密码错误!");
                    base.Response.End();
                }
                else
                {
                    this.Session.Contents["adminuserid"]   = reader["userid"].ToString().Trim();
                    this.Session.Contents["adminusername"] = reader["username"].ToString().Trim();
                    this.Session.Contents["adminuserpass"] = reader["userpass"].ToString().Trim();
                    this.Session.Contents["adminsessid"]   = this.Session.SessionID.ToString().Trim();
                    this.Session.Contents["adminclassid"]  = reader["classid"].ToString().Trim();
                    this.Session.Contents["adminarrgd"]    = reader["arrgd"].ToString().Trim();
                    this.Session.Contents["usergsid"]      = reader["userid"].ToString().Trim();
                    string text5 = reader["islock"].ToString().Trim();
                    reader.Close();
                    string place = "";
                    string text7 = "";
                    string ip    = "";
                    if ((base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null) && (base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim() != ""))
                    {
                        ip    = base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim();
                        place = MyFunc.GetPlace(db, MyFunc.ChgIP(base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim()));
                    }
                    ip = ip + "|" + base.Request.UserHostAddress.ToString().Trim();
                    MyFunc.WriteUserEvent(db, this.Session.Contents["adminuserid"].ToString(), this.Session.Contents["adminusername"].ToString(), base.Request.UserHostAddress.Trim(), this.Session.Contents["adminclassid"].ToString(), "1");
                    text7 = MyFunc.GetPlace(db, MyFunc.ChgIP(base.Request.UserHostAddress.ToString().Trim()));
                    db.Dispose();
                    MyTeam.OnlineList.OnlineList.NewUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.SessionID.ToString().Trim(), DateTime.Now.ToString(), ip, this.Session.Contents["adminclassid"].ToString().Trim(), place + "|" + text7);
                    if (text5 == "1")
                    {
                        base.Response.Redirect("rep.htm");
                    }
                    else
                    {
                        base.Response.Redirect("frmindex.aspx");
                    }
                    base.Response.End();
                }
            }
        }
Пример #7
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if ((!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1)) && (!MyFunc.CheckUserLogin(2) || !MyTeam.OnlineList.OnlineList.isUserLogin(2)))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         if (!this.Page.IsPostBack)
         {
             this.startTime.Value = DateTime.Today.ToString("yyyy-MM-dd");
             this.endTime.Value   = DateTime.Today.ToString("yyyy-MM-dd");
             DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
             SqlDataReader reader = base2.ExecuteReader("select count(*) as rowcounts from ball_order where isjs = 0 and iscancel = 0 and datediff(day,'" + DateTime.Today.ToShortDateString() + "',updatetime) = 0 and zdlid='" + this.Session["adminuserid"].ToString() + "'");
             reader.Read();
             if (reader["rowcounts"].ToString() == "0")
             {
                 this.showTime2.Text = "[" + DateTime.Today.ToString("yyyy-MM-dd") + "]";
                 this.showNo.Text    = "[全部注单已结算完毕]";
             }
             else
             {
                 this.showTime2.Text = "[" + DateTime.Today.ToString("yyyy-MM-dd") + "]";
                 this.showNo.Text    = "[<a href='reportShowNoJs.aspx'><font color=red>" + reader["rowcounts"].ToString() + "注注单未结算</font></a>]";
             }
             reader.Close();
             reader = base2.ExecuteReader("select count(*) as rowcounts from ball_order where tzType = '8' AND isjs = 0 and iscancel = 0 and datediff(day,'" + DateTime.Today.ToShortDateString() + "',updatetime) = 0 and zdlid='" + this.Session["adminuserid"].ToString() + "'");
             reader.Read();
             if (reader["rowcounts"].ToString() != "0")
             {
                 this.showNo.Text = this.showNo.Text + "[<a href='reportShowNoJs.aspx?tztype=8'><font color=red>特别号</font></a>][<a href='reportShowNoJs.aspx?tztype=all'><font color=red>全部</font></a>]";
             }
             reader.Close();
             reader = base2.ExecuteReader("select * from ball_bf1 order by ballid desc");
             while (reader.Read())
             {
                 string kyglcontent = this.kyglcontent;
                 this.kyglcontent = kyglcontent + " <option value=" + Convert.ToDateTime(reader["balltime"]).ToString("yyyy-MM-dd") + "> 第 " + reader["qishu"].ToString() + " 期  " + Convert.ToDateTime(reader["balltime"]).ToString("yyyy-MM-dd") + "</option>";
             }
             reader.Close();
             base2.Dispose();
         }
         else
         {
             if (base.Request.QueryString["dataday"] != null)
             {
                 if (base.Request.QueryString["dataday"].ToString() == "1")
                 {
                     this.startTime.Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd");
                     this.endTime.Value   = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd");
                 }
                 else if (base.Request.QueryString["dataday"].ToString() == "7")
                 {
                     this.startTime.Value = DateTime.Today.AddDays(-6).ToString("yyyy-MM-dd");
                     this.endTime.Value   = DateTime.Today.ToString("yyyy-MM-dd");
                 }
                 else
                 {
                     int num = Convert.ToInt32(DateTime.Today.DayOfWeek) - 1;
                     if (num == -1)
                     {
                         num = 6;
                     }
                     this.startTime.Value = DateTime.Today.AddDays((double)-num).ToString("yyyy-MM-dd");
                     this.endTime.Value   = DateTime.Today.ToString("yyyy-MM-dd");
                 }
             }
             try
             {
                 DateTime.Parse(this.startTime.Value);
                 DateTime.Parse(this.endTime.Value);
             }
             catch
             {
                 MyFunc.showmsg("请输入真确的日期格式!");
             }
             this.searchDeal();
         }
         this.DataBind();
     }
 }
Пример #8
0
        private void setuserlock(string lockflag, string userid)
        {
            string   sql   = "";
            string   text2 = "";
            string   text3 = "";
            string   text4 = "";
            DataBase base2 = new DataBase(MyFunc.GetConnStr(2));

            sql = "SELECT gdid,zdlid from agence where userid='" + this.Session["adminuserid"].ToString().Trim() + "'";
            SqlDataReader reader = base2.ExecuteReader(sql);

            if (reader.Read())
            {
                text2 = reader["gdid"].ToString();
                text3 = reader["zdlid"].ToString();
                text4 = this.Session["adminuserid"].ToString().Trim();
            }
            reader.Close();
            if (lockflag == "1")
            {
                int num = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text4).ToString());
                if (num > 0)
                {
                    int num2 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE dlsid=" + text4).ToString());
                    if (num < (num2 + 1))
                    {
                        base2.Dispose();
                        MyFunc.showmsg("该代理商的最大会员数为 " + num.ToString() + ",不能再添加新会员");
                        base.Response.End();
                        return;
                    }
                }
                else
                {
                    int num3 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text3).ToString());
                    if (num3 > 0)
                    {
                        int num4 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE zdlid=" + text3).ToString());
                        if (num3 < (num4 + 1))
                        {
                            base2.Dispose();
                            MyFunc.showmsg("您的最大会员数为 " + num.ToString() + ",不能再添加新会员");
                            base.Response.End();
                            return;
                        }
                    }
                    else
                    {
                        int num5 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text2).ToString());
                        if (num5 > 0)
                        {
                            int num6 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE gdid=" + text2).ToString());
                            if (num5 < (num6 + 1))
                            {
                                base2.Dispose();
                                MyFunc.showmsg("该股东的最大会员数为 " + num.ToString() + ",不能再添加新会员");
                                base.Response.End();
                                return;
                            }
                        }
                    }
                }
            }
            base2.ExecuteNonQuery("UPDATE member set isuseable =" + lockflag + " WHERE userid = '" + userid + "'");
            base2.CloseConnect();
            base2.Dispose();
        }
Пример #9
0
        private void getUserLists()
        {
            string sql;
            int    curpage;
            int    start;
            string text     = "";
            string text2    = "";
            string text3    = "";
            int    pagesize = 20;

            try
            {
                curpage = int.Parse(this.selectpage.Value);
            }
            catch
            {
                curpage = 1;
            }
            if (curpage < 1)
            {
                curpage = 1;
            }
            text3 = " order by " + this.sortname.Value.Trim() + " " + this.sortorderby.Value.Trim();
            if (this.sortenable.Value.Trim() != "")
            {
                text2 = "select userid,username,truename,pltype,usertype,usemoney,moneysort,regtime,dlsname,isuseable from member WHERE dlsname='" + this.Session["adminusername"].ToString().Trim() + "' and isuseable =" + this.sortenable.Value + " " + text3;
                sql   = "SELECT COUNT(*) FROM member WHERE dlsname='" + this.Session["adminusername"].ToString().Trim() + "' and isuseable =" + this.sortenable.Value;
            }
            else
            {
                text2 = "select userid,username,truename,pltype,usertype,usemoney,moneysort,regtime,dlsname,isuseable from member where dlsname='" + this.Session["adminusername"].ToString().Trim() + "' " + text3;
                sql   = "SELECT COUNT(*) FROM member WHERE dlsname='" + this.Session["adminusername"].ToString().Trim() + "'";
            }
            text = text + "<table width='755' cellspacing=1 cellpadding=2 border=0 class=tableNoBorder1>\n<tr class='dlsheader'>\n" + "<td>会员帐号</td><td>会员名称</td><td>代理商</td><td>赔率种类</td><td>现金/信用</td><td>使用币种</td><td>信用额度</td><td>新增时间</td><td>状态</td><td>功能</td></tr>";
            DataBase base2       = new DataBase(MyFunc.GetConnStr(2));
            int      totalrecord = int.Parse(base2.ExecuteScalar(sql).ToString());

            if (totalrecord == 0)
            {
                start = 0;
            }
            else
            {
                if (((curpage - 1) * pagesize) >= totalrecord)
                {
                    curpage = 1;
                }
                start = (curpage - 1) * pagesize;
            }
            DataSet set = base2.ExecuteDataSet(text2, start, pagesize, "member");

            for (int i = 0; i < set.Tables[0].Rows.Count; i++)
            {
                if (set.Tables[0].Rows[i]["isuseable"].ToString().ToLower() == "true")
                {
                    if ((i % 2) == 0)
                    {
                        text = text + "<tr align=center bgColor='#FFFFFF' height=22 onmouseover=light_bar(this,'ovr') onmouseout=light_bar(this,'out')>";
                    }
                    else
                    {
                        text = text + "<tr align=center bgColor='#efefef' height=22 onmouseover=light_bar(this,'ovr') onmouseout=light_bar(this,'out')>";
                    }
                    string text5 = text;
                    text = ((((((((((((text5 + "<td><a href='mgruser_reportlist.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "&username="******"username"].ToString().Trim() + "'>" + set.Tables[0].Rows[i]["username"].ToString() + "</a></td>") + "<td>" + set.Tables[0].Rows[i]["truename"].ToString() + "</td>") + "<td>" + this.Session["adminusername"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["pltype"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["usertype"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["moneysort"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["usemoney"].ToString() + "</td>") + "<td align=center nowrap>" + DateTime.Parse(set.Tables[0].Rows[i]["regtime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss") + "</td>") + "<td><font color=blue>正常</font></td>") + "<td align=center><a href=\"javascript:if(confirm('确定停用!')){lockproc('0','" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "');}\">停用</a>&nbsp;/&nbsp;") + "<a href='adduser.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "'>详情</a>&nbsp;/&nbsp;") + "<a href='edituser.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "'>设定</a>") + "</td></tr>";
                }
                else
                {
                    if ((i % 2) == 0)
                    {
                        text = text + "<tr align=center bgColor='#FFFFFF' height=22 onmouseover=light_bar(this,'ovr') onmouseout=light_bar(this,'out')>";
                    }
                    else
                    {
                        text = text + "<tr align=center bgColor='#efefef' height=22 onmouseover=light_bar(this,'ovr') onmouseout=light_bar(this,'out')>";
                    }
                    string text6 = text;
                    text = ((((((((((((text6 + "<td style='color:#666666'><a href='mgruser_reportlist.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "&username="******"username"].ToString().Trim() + "'>" + set.Tables[0].Rows[i]["username"].ToString() + "</a></td>") + "<td style='color:#666666'>" + set.Tables[0].Rows[i]["truename"].ToString() + "</td>") + "<td style='color:#666666'>" + this.Session["adminusername"].ToString() + "</td>") + "<td style='color:#666666'>" + set.Tables[0].Rows[i]["pltype"].ToString() + "</td>") + "<td style='color:#666666'>" + set.Tables[0].Rows[i]["usertype"].ToString() + "</td>") + "<td style='color:#666666'>" + set.Tables[0].Rows[i]["moneysort"].ToString() + "</td>") + "<td style='color:#666666'>" + set.Tables[0].Rows[i]["usemoney"].ToString() + "</td>") + "<td style='color:#666666' align=center nowrap>" + DateTime.Parse(set.Tables[0].Rows[i]["regtime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss") + "</td>") + "<td style='color:#ff0000'>停用</td>") + "<td align=center><a href=\"javascript:if(confirm('确定启用!')){lockproc('1','" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "');}\">启用</a>&nbsp;/&nbsp;") + "<a href='adduser.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "'>详情</a>&nbsp;/&nbsp;") + "<a href='edituser.aspx?userid=" + set.Tables[0].Rows[i]["userid"].ToString().Trim() + "'>设定</a>") + "</td></tr>";
                }
            }
            this.userLists.Rows[0].Cells[0].InnerHtml = text;
            set.Clear();
            base2.CloseConnect();
            base2.Dispose();
            this.setselectpageproc(pagesize, totalrecord, curpage);
        }
Пример #10
0
        private void MainContent()
        {
            string   text  = "";
            string   text2 = "";
            string   sql   = "";
            int      num   = 0;
            TimeSpan span  = Convert.ToDateTime(this.kaisai).Subtract(DateTime.Now);
            int      num2  = ((span.Hours * 0xe10) + (span.Minutes * 60)) + span.Seconds;

            if (num2 > 0)
            {
                if (num2 < 600)
                {
                    this.kyglcontent = "parent.sTime = '" + num2 + "';";
                }
                DataBase base2 = new DataBase(MyFunc.GetConnStr(1));
                sql = "SELECT v1.*,isnull((cl.giveup1sum-cl.giveup2sum)/cl.giveupmoney*giveuppl,0) as give FROM Pl as v1 LEFT JOIN changeleave as cl ON (v1.id = cl.ballid AND cl.gsid = '" + this.Session["usergsid"].ToString() + "') WHERE id>34 and id<84 ORDER BY id asc";
                DataSet set = base2.ExecuteDataSet(sql);
                for (num = 1; num < 11; num++)
                {
                    if (num != 10)
                    {
                        this.kygltable = this.kygltable + "<tr>";
                        for (int i = 0; i < 5; i++)
                        {
                            string text5 = "";
                            if (i == 0)
                            {
                                text5 = "0" + num.ToString();
                            }
                            else
                            {
                                text5 = ((i * 10) + num).ToString();
                            }
                            this.curpl  = this.curpl + double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[((i * 10) + num) - 1]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[((i * 10) + num) - 1]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString() + ",";
                            this.ballid = this.ballid + double.Parse(set.Tables[0].Rows[((i * 10) + num) - 1]["id"].ToString().Trim()).ToString() + ",";
                            text        = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[((i * 10) + num) - 1]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[((i * 10) + num) - 1]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                            text2       = double.Parse(set.Tables[0].Rows[((i * 10) + num) - 1]["id"].ToString().Trim()).ToString();
                            string kygltable = this.kygltable;
                            this.kygltable = kygltable + "<TD class=ball_td align=middle background=" + MyFunc.GetRGB(text5.ToString()) + " height=27><FONT style=\"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FILTER: glow(color=#000000,strength=1); PADDING-BOTTOM: 2px; COLOR: #000000; PADDING-TOP: 2px; HEIGHT: 10px\">" + text5 + "</FONT></TD>\n";
                            this.kygltable = this.kygltable + " <TD class=radio_set align=middle><FONT style=\"FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #cc0000\">" + text + "</FONT></TD>\n";
                            string   text8      = this.kygltable;
                            string[] textArray2 = new string[] { text8, " <TD align=middle><INPUT onkeypress=\"return CheckKey();\" onblur=\"return CountGold(this,'blur','", ((i * 10) + num).ToString(), "');\" onkeyup=\"return CountGold(this,'keyup','", ((i * 10) + num).ToString(), "');\" onfocus=\"CountGold(this,'focus','", ((i * 10) + num).ToString(), "');this.value='';\"   tabIndex=", ((i * 10) + num).ToString(), " size=4 name=", text2, "></TD>\n" };
                            this.kygltable = string.Concat(textArray2);
                        }
                        this.kygltable = this.kygltable + "</tr>";
                    }
                    else
                    {
                        this.kygltable = this.kygltable + "<tr>";
                        for (int j = 0; j < 4; j++)
                        {
                            string text6 = "";
                            text6       = ((j * 10) + num).ToString();
                            this.curpl  = this.curpl + double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[((j * 10) + num) - 1]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[((j * 10) + num) - 1]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString() + ",";
                            this.ballid = this.ballid + double.Parse(set.Tables[0].Rows[((j * 10) + num) - 1]["id"].ToString().Trim()).ToString() + ",";
                            text        = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[((j * 10) + num) - 1]["pl"].ToString().Trim(), this.Session.Contents["ABC1"].ToString().Trim(), set.Tables[0].Rows[((j * 10) + num) - 1]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                            text2       = double.Parse(set.Tables[0].Rows[((j * 10) + num) - 1]["id"].ToString().Trim()).ToString();
                            string text9 = this.kygltable;
                            this.kygltable = text9 + "<TD class=ball_td align=middle background=" + MyFunc.GetRGB(text6.ToString()) + " height=27><FONT style=\"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FILTER: glow(color=#000000,strength=1); PADDING-BOTTOM: 2px; COLOR: #000000; PADDING-TOP: 2px; HEIGHT: 10px\">" + text6 + "</FONT></TD>\n";
                            this.kygltable = this.kygltable + " <TD class=radio_set align=middle><FONT style=\"FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #cc0000\">" + text + "</FONT></TD>\n";
                            string   text10     = this.kygltable;
                            string[] textArray4 = new string[] { text10, " <TD align=middle><INPUT onkeypress=\"return CheckKey();\" onblur=\"return CountGold(this,'blur','", ((j * 10) + num).ToString(), "');\" onkeyup=\"return CountGold(this,'keyup','", ((j * 10) + num).ToString(), "');\" onfocus=\"CountGold(this,'focus','", ((j * 10) + num).ToString(), "');this.value='';\"   tabIndex=", ((j * 10) + num).ToString(), " size=4 name=", text2, "></TD>\n" };
                            this.kygltable = string.Concat(textArray4);
                        }
                        this.kygltable = this.kygltable + " <TD align=middle colSpan=3><INPUT onclick=\"return ChkSubmit();\" type=button value=确定 name=btnSubmit><INPUT onclick=\"location.href='quickinput2.aspx'\" type=reset value=重设 name=btnReset> </TD></tr>";
                    }
                }
                this.ballid = this.ballid.Substring(0, this.ballid.Length - 1);
                this.curpl  = this.curpl.Substring(0, this.curpl.Length - 1);
                base2.Dispose();
                this.gTime = this.kaisai;
            }
        }
Пример #11
0
        private string TableList()
        {
            string        text   = "";
            string        sql    = "SELECT Max(Ball_Order.Username) AS username,MAX(member.userpass) AS userpass,Ball_order.userid,isnull(SUM(Ball_Order.tzMoney),0) AS tzmoney,COUNT(1) AS tzcount,isnull(MAX(member.curMoney),0) AS curmoney,isnull(MAX(member.UseMoney),0) AS usemoney FROM Ball_Order LEFT OUTER JOIN member ON Ball_Order.userid = member.userid WHERE (DATEDIFF(day,ball_order.updatetime,getdate())=0 OR DATEDIFF([day],Ball_Order.balltime,GETDATE()) = 0)  GROUP BY Ball_Order.userid order by ball_order.userid";
            DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
            SqlDataReader reader = base2.ExecuteReader(sql);
            int           num    = 0;
            string        text3  = "";

            if ((base.Request.QueryString["action"] != null) && (base.Request.QueryString["action"].ToString().Trim() != ""))
            {
                text3 = base.Request.QueryString["action"].ToString().Trim();
            }
            text = text + "<tr bgcolor=#FFFFcc>";
            while (reader.Read())
            {
                double num2  = double.Parse(reader["usemoney"].ToString().Trim());
                double num3  = double.Parse(reader["curmoney"].ToString().Trim());
                double num4  = double.Parse(reader["tzmoney"].ToString().Trim());
                string text4 = "1";
                bool   flag  = true;
                if (num2 != (num3 + num4))
                {
                    flag  = false;
                    text4 = "0";
                }
                if (((text3 != "1") || flag) && ((text3 != "2") || !flag))
                {
                    num++;
                    string text6 = text;
                    text = text6 + "<td><a href=MemberResult.aspx?userid=" + reader["userid"].ToString().Trim() + "&flag=" + text4 + ">" + reader["username"].ToString().Trim() + "</a></td><td>" + reader["userpass"].ToString().Trim() + "</td><td>" + reader["tzcount"].ToString().Trim() + "</td><td>" + reader["usemoney"].ToString().Trim() + "</td><td>" + double.Parse(reader["tzmoney"].ToString().Trim()).ToString("F0") + "</td><td>" + reader["curmoney"].ToString().Trim() + "</td><td>";
                    if (flag)
                    {
                        text = text + "正常";
                    }
                    else
                    {
                        string   text7      = text;
                        string[] textArray2 = new string[] { text7, "<a href=watch.aspx?kygl=up&id=", reader["userid"].ToString().Trim(), "&money=", (num2 - num4).ToString(), "><font color=red>不正常</font></a>" };
                        text = string.Concat(textArray2);
                    }
                    text = text + "</td>";
                    if ((num % 2) == 0)
                    {
                        text = text + "</tr>  <tr bgcolor=#FFFFcc>";
                    }
                    else
                    {
                        text = text + "<td>&nbsp;</td>";
                    }
                }
            }
            if ((num % 2) != 0)
            {
                text = text + "<td colspan=7>&nbsp;</td></tr>";
            }
            text = text + "<tr bgcolor=#ffffff align=right><td colspan=15><b>总下注人数:" + num.ToString() + "</b></td></tr>";
            reader.Close();
            base2.Dispose();
            return(text);
        }
Пример #12
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0) || !MyTeam.OnlineList.OnlineList.isUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,tupdatetime,content,qishu,kaisai FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         while (reader.Read())
         {
             this.msg    = this.msg + MyFunc.ConvertStr(reader["content"].ToString().Trim());
             this.qishu  = reader["qishu"].ToString().Trim();
             this.kaisai = reader["tupdatetime"].ToString().Trim();
         }
         reader.Close();
         string sql = "SELECT member.userid,member.username,member.usemoney,member.MoneySort,member.MoneyRate,member.curMoney,member.ABC,";
         sql    = (sql + "userhs.MAXC1,userhs.MAXC2,userhs.MAXC3,userhs.MAXC4,userhs.MAXC5,userhs.MAXC6,userhs.MAXC7,userhs.MAXC8,userhs.MAXC9,userhs.MAXC10,userhs.MAXC11," + "userhs.MAXC12,userhs.MAXC13,userhs.MAXC14,userhs.MAXC15,userhs.MAXC18,userhs.MAXC19,userhs.MAXC20,userhs.MAXC21,userhs.MAXC22,userhs.MAXC23,userhs.MAXC28,userhs.MAXZ1,userhs.MAXZ2,userhs.MAXZ3,userhs.MAXZ4,userhs.MAXZ5,userhs.MAXZ6,userhs.MAXZ7,userhs.MAXZ8,userhs.MAXZ9,userhs.MAXZ10,") + "userhs.MAXZ11,userhs.MAXZ12,userhs.MAXZ13,userhs.MAXZ14,userhs.MAXZ15,userhs.MAXZ18,userhs.MAXZ19,userhs.MAXZ20,userhs.MAXZ21,userhs.MAXZ22,userhs.MAXZ23,userhs.MAXZ28 FROM member LEFT OUTER JOIN userhs ON member.userid = userhs.userid WHERE member.userid = " + this.Session.Contents["userid"].ToString().Trim() + " AND member.isuseable=1";
         reader = base2.ExecuteReader(sql);
         if (!reader.Read())
         {
             this.curmoney   = "0";
             this.singlebet  = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
             this.singlegame = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
             reader.Close();
         }
         else
         {
             this.curmoney  = reader["curmoney"].ToString().Trim();
             this.singlebet = "0";
             for (int i = 0; i < 0x31; i++)
             {
                 this.singlebet = this.singlebet + "," + reader["Maxz1"].ToString().Trim();
             }
             for (int j = 0; j < 0x31; j++)
             {
                 this.singlebet = this.singlebet + reader["Maxz1"].ToString().Trim();
             }
             string singlebet = this.singlebet;
             this.singlebet  = singlebet + reader["Maxz2"].ToString().Trim() + "," + reader["Maxz2"].ToString().Trim() + "," + reader["Maxz3"].ToString().Trim() + "," + reader["Maxz3"].ToString().Trim() + "," + reader["Maxz4"].ToString().Trim() + "," + reader["Maxz4"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim();
             this.singlegame = "0";
             for (int k = 0; k < 0x31; k++)
             {
                 this.singlegame = this.singlegame + "," + reader["Maxc1"].ToString().Trim();
             }
             for (int m = 0; m < 0x31; m++)
             {
                 this.singlegame = this.singlegame + reader["Maxc1"].ToString().Trim();
             }
             string singlegame = this.singlegame;
             this.singlegame = singlegame + reader["Maxc2"].ToString().Trim() + "," + reader["Maxc2"].ToString().Trim() + "," + reader["Maxc3"].ToString().Trim() + "," + reader["Maxc3"].ToString().Trim() + "," + reader["Maxc4"].ToString().Trim() + "," + reader["Maxc4"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim();
             reader.Close();
         }
         for (int n = 0x23; n < 0x54; n++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + n.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         for (int num6 = 1; num6 < 7; num6++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + num6.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         for (int num7 = 0xd4; num7 < 0xd7; num7++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + num7.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         base2.Dispose();
         this.MainContent();
         this.MainContent1();
         this.DataBind();
     }
 }
Пример #13
0
        private string GetOrderList(string start_date, string end_date, string t1, string t2, string isjs, string tztype, string ballid, string gdid, string zdlid, string dlsid, string userid, string username, string orderid, string matchname, string tzmoney, string rr, string iscancel, string iswin)
        {
            int curPage;
            int start;
            int pagesize = 100;

            try
            {
                curPage = int.Parse(base.Request.QueryString["page"].ToString());
            }
            catch
            {
                curPage = 1;
            }
            if (curPage < 1)
            {
                curPage = 1;
            }
            string text  = "SELECT  orderid,userid,username,tzmoney,tztype,curpl,win,lose,truewin,hsuser_w,hsuser_l,content,updatetime,iscancel,balltime,isdanger,tzip,ds FROM Ball_order ";
            string text2 = "WHERE updatetime BETWEEN '" + start_date + " " + t1 + "' AND '" + end_date + " " + t2 + "' ";
            string text3 = "";

            if (orderid != "")
            {
                text2 = text2 + " AND orderid=" + orderid;
            }
            if (tztype != "")
            {
                text2 = text2 + " AND tztype=" + tztype;
            }
            if (ballid != "")
            {
                text2 = text2 + " AND ballid in (" + ballid + ")";
            }
            if (gdid != "")
            {
                text2 = text2 + " AND gdid=" + gdid;
            }
            if (zdlid != "")
            {
                text2 = text2 + " AND zdlid=" + zdlid;
            }
            if (dlsid != "")
            {
                text2 = text2 + " AND dlsid=" + dlsid;
            }
            if ((userid != "") && (username == ""))
            {
                text2 = text2 + " AND userid='" + userid + "'";
            }
            if ((userid == "") && (username != ""))
            {
                text2 = text2 + " AND username='******'";
            }
            if ((isjs != "") && (iscancel == ""))
            {
                text2 = text2 + " AND isjs=" + isjs;
            }
            if ((rr != "") && (rr == "0"))
            {
                text2 = text2 + " AND win-lose=0";
            }
            if (tzmoney != "")
            {
                text2 = text2 + " AND tzmoney>=" + tzmoney;
            }
            if ((iscancel != "") && (iscancel != "0"))
            {
                text2 = text2 + " AND iscancel=" + iscancel;
            }
            if (iswin != "")
            {
                if (iswin == "w")
                {
                    text2 = text2 + " AND win>0";
                }
                if (iswin == "s")
                {
                    text2 = text2 + " AND lose > 0";
                }
            }
            DataBase base2       = new DataBase(MyFunc.GetConnStr(2));
            int      totalRecord = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM Ball_order " + text2).ToString());

            if (totalRecord == 0)
            {
                start = 0;
            }
            else
            {
                start = (curPage - 1) * pagesize;
            }
            DataSet set   = base2.ExecuteDataSet(text + text2 + " ORDER BY orderid DESC", start, pagesize, "ball_order");
            double  num5  = 0;
            double  num6  = 0;
            int     num7  = 0;
            string  text4 = "";

            for (int i = 0; i < set.Tables[0].Rows.Count; i++)
            {
                string text9  = text3;
                string text10 = text9 + "<tr bgcolor=#FFFFFF><td align=\"center\">" + set.Tables[0].Rows[i]["orderid"].ToString().Trim() + "</td><td align=\"center\">" + DateTime.Parse(set.Tables[0].Rows[i]["updatetime"].ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss").ToUpper().Replace(" ", "<br>");
                text3 = text10 + "</td><td align=\"center\">" + set.Tables[0].Rows[i]["username"].ToString().Trim() + "</td><td align=\"center\">" + MyFunc.GettzTypeName(set.Tables[0].Rows[i]["tztype"].ToString().Trim()) + "</td><td align=\"right\">" + set.Tables[0].Rows[i]["content"].ToString().Trim() + "</td><td align=\"right\" valign=\"top\"> </td><td align=\"right\" valign=\"top\">" + MyFunc.NumBerFormat(set.Tables[0].Rows[i]["tzmoney"].ToString().Trim()) + "</td>";
                string text5 = "#ffffff";
                string text6 = "&nbsp;";
                double num9  = double.Parse(set.Tables[0].Rows[i]["truewin"].ToString().Trim());
                double num10 = double.Parse(set.Tables[0].Rows[i]["win"].ToString().Trim());
                double num11 = double.Parse(set.Tables[0].Rows[i]["lose"].ToString().Trim());
                string text7 = set.Tables[0].Rows[i]["ds"].ToString().Trim();
                if ((num10 > 0) && (num9 == 1))
                {
                    text5 = "#FF9B9B";
                    text6 = "全赢";
                }
                else if (num9 == 0.5)
                {
                    text5 = "#A6D5EE";
                    text6 = "和局";
                }
                else if ((num11 > 0) && (num9 == 1))
                {
                    text5 = "#FFFF99";
                    text6 = "全输";
                }
                else if ((num10 > 0) && (num9 == 2))
                {
                    text5 = "#FF9B9B";
                    text6 = text7;
                }
                string text11 = text3;
                text3 = (text11 + "<td align=\"center\" valign=\"top\" style='background-color: " + text5 + ";'>" + text6) + "</td>" + "<td align=\"right\" valign=\"top\">";
                if (set.Tables[0].Rows[i]["isdanger"].ToString().Trim().ToUpper() == "2")
                {
                    text3 = text3 + "<font color=red>危险球取消</font>";
                }
                else if (set.Tables[0].Rows[i]["iscancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    text3 = text3 + "<font color=red>已取消</font>";
                }
                else
                {
                    double num12 = double.Parse(set.Tables[0].Rows[i]["win"].ToString().Trim()) - double.Parse(set.Tables[0].Rows[i]["lose"].ToString().Trim());
                    text3 = text3 + MyFunc.NumBerFormat(num12.ToString());
                }
                text3 = text3 + "</td><td align=center>";
                if ((this.Session.Contents["classid"] != null) && (this.Session.Contents["classid"].ToString().Trim() == "3"))
                {
                    text3 = text3 + "<font color=red>不能操作</font>";
                }
                else if (set.Tables[0].Rows[i]["iscancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    string text12 = text3;
                    text3 = text12 + "<a href=orderlist.aspx?action=resume&orderid=" + set.Tables[0].Rows[i]["orderid"].ToString().Trim() + "&start=" + start_date + "&end=" + end_date + "&flag=" + isjs + "&bid=" + ballid + "&type=" + tztype + "&gid=" + gdid + "&zid=" + zdlid + "&did=" + dlsid + "&uid=" + userid + "&uname=" + username + "&oid=" + orderid + "&t1=" + t1 + "&t2=" + t2 + "&matchname=" + matchname + "&tzmoney=" + tzmoney + "&rr=" + rr + "&isc=" + iscancel + "&isw=" + iswin + "&page=" + curPage.ToString() + " onclick=\"return confirm('确定要恢复该注单吗?')\"><font color=red>恢复</font></a>";
                }
                else
                {
                    string text13 = text3;
                    text3 = text13 + "<a href=orderlist.aspx?action=cancel&orderid=" + set.Tables[0].Rows[i]["orderid"].ToString().Trim() + "&start=" + start_date + "&end=" + end_date + "&flag=" + isjs + "&bid=" + ballid + "&type=" + tztype + "&gid=" + gdid + "&zid=" + zdlid + "&did=" + dlsid + "&uid=" + userid + "&uname=" + username + "&oid=" + orderid + "&t1=" + t1 + "&t2=" + t2 + "&matchname=" + matchname + "&tzmoney=" + tzmoney + "&rr=" + rr + "&isc=" + iscancel + "&isw=" + iswin + "&page=" + curPage.ToString() + " onclick=\"return confirm('确定要取消该注单吗?')\">取消</a>";
                    num5 += double.Parse(set.Tables[0].Rows[i]["tzmoney"].ToString().Trim());
                    num6 += double.Parse(set.Tables[0].Rows[i]["win"].ToString().Trim()) - double.Parse(set.Tables[0].Rows[i]["lose"].ToString().Trim());
                }
                num7++;
                text4 = text4 + set.Tables[0].Rows[i]["orderid"].ToString().Trim() + ",";
            }
            string text14 = text3;

            text3 = (text14 + "<tr class=\"sum\"><form name='form1' method='post' action='OrderList.aspx'><input name='action' type='hidden' value='kygl'><input name='order_list' type='hidden' value='" + text4 + "'><td colspan=\"4\"><input type=submit value='取消本页注单' onclick=\"return confirm('确定要取消本页所有注单吗?')\" class=text></td></form><td>当前笔数:" + num7.ToString() + "</td><td>&nbsp;</td><td>" + MyFunc.NumBerFormat(num5.ToString()) + "</td><td>&nbsp;</td><td>" + MyFunc.NumBerFormat(num6.ToString()) + "</td><td>&nbsp;</td></tr>") + "<tr><td colspan=10 align=right bgcolor=#ffffff>" + MyFunc.MulitPager(totalRecord, pagesize, curPage, "OrderList.aspx?start=" + start_date + "&end=" + end_date + "&flag=" + isjs + "&bid=" + ballid + "&type=" + tztype + "&gid=" + gdid + "&zid=" + zdlid + "&did=" + dlsid + "&uid=" + userid + "&oid=" + orderid + "&t1=" + t1 + "&t2=" + t2 + "&matchname=" + matchname + "&tzmoney=" + tzmoney + "&rr=" + rr + "&isc=" + iscancel + "&isw=" + iswin) + "</td></tr>";
            SqlDataReader reader = base2.ExecuteReader("SELECT ISNULL(COUNT(1),0) AS ordercount,ISNULL(sum(tzmoney),0) AS tzcount,ISNULL(sum(win-lose),0) AS wincount FROM ball_order " + text2);

            if (reader.Read())
            {
                string text15 = text3;
                text3 = text15 + "<tr class=\"sum\"><td colspan=\"4\">&nbsp;</td><td>总笔数:" + reader["ordercount"].ToString().Trim() + "</td><td>&nbsp;</td><td>" + MyFunc.NumBerFormat(reader["tzcount"].ToString()) + "</td><td>&nbsp;</td><td>" + MyFunc.NumBerFormat(reader["wincount"].ToString()) + "</td><td>&nbsp;</td></tr>";
            }
            reader.Close();
            base2.Dispose();
            return(text3);
        }
Пример #14
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         if (((base.Request.QueryString["action"] != null) && (base.Request.QueryString["id"] != null)) && (base.Request.QueryString["id"].ToString().Trim() != ""))
         {
             if (base.Request.QueryString["action"].ToString().Trim().ToUpper() == "OPEN")
             {
                 this.OpUser("1", base.Request.QueryString["id"].ToString().Trim(), base.Request.QueryString["did"].ToString().Trim());
             }
             else if (base.Request.QueryString["action"].ToString().Trim().ToUpper() == "CLOSE")
             {
                 this.OpUser("0", base.Request.QueryString["id"].ToString().Trim(), base.Request.QueryString["did"].ToString().Trim());
             }
             else
             {
                 if (base.Request.QueryString["action"].ToString().Trim().ToUpper() != "DEL")
                 {
                     return;
                 }
                 this.DelUser(base.Request.QueryString["id"].ToString().Trim(), base.Request.QueryString["did"].ToString().Trim());
             }
         }
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         this.DropDownListGd.Items.Clear();
         this.DropDownListGd.Items.Add(new ListItem("请选择", "0"));
         SqlDataReader reader = base2.ExecuteReader("SELECT userid,username FROM agence WHERE classid=2 AND gdid = '" + this.Session["adminuserid"].ToString() + "'");
         while (reader.Read())
         {
             this.DropDownListGd.Items.Add(new ListItem(reader["username"].ToString().Trim(), reader["userid"].ToString().Trim()));
         }
         reader.Close();
         this.DropDownListGd.SelectedIndex = 0;
         if ((base.Request.QueryString["gdid"] != null) && (base.Request.QueryString["gdid"].ToString().Trim() != ""))
         {
             this.DropDownListGd.SelectedValue = base.Request.QueryString["gdid"].ToString().Trim();
         }
         this.ZdlList();
         if ((base.Request.QueryString["zid"] != null) && (base.Request.QueryString["zid"].ToString().Trim() != ""))
         {
             this.DropDownListZdl.SelectedValue = base.Request.QueryString["zid"].ToString().Trim();
         }
         this.DlsList();
         if ((base.Request.QueryString["did"] != null) && (base.Request.QueryString["did"].ToString().Trim() != ""))
         {
             this.DropDownListDls.SelectedValue = base.Request.QueryString["did"].ToString().Trim();
         }
         if ((base.Request.QueryString["flag"] != null) && (base.Request.QueryString["flag"].ToString().Trim() != ""))
         {
             this.DropDownListAccountStatus.SelectedValue = base.Request.QueryString["flag"].ToString().Trim();
         }
         this.PageList(this.DropDownListAccountStatus.SelectedValue);
         this.DataGrid1.PageSize = this.pagesize;
         this.DataGridDataBind(this.DropDownListAccountStatus.SelectedValue, this.TextBoxSortField.Text, int.Parse(this.DropDownListPage.SelectedValue));
         base2.Dispose();
     }
 }
Пример #15
0
 private void ButtonSave_Click(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), this.Session.Contents["adminclassid"].ToString().Trim(), 1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         string text          = "";
         string text2         = this.TextBoxUserID.Text.Trim();
         string text3         = this.TextBoxNewpass1.Text.Trim();
         string text4         = this.TextBoxNewpass2.Text.Trim();
         string input         = this.TextBoxTrueName.Text.Trim();
         string text8         = "1";
         string text6         = this.TextBoxTel.Text.Trim().Replace("'", "").Replace("%", "");
         string s             = this.TextBoxUseMoney.Text.Trim();
         string text10        = this.Session.Contents["adminuserid"].ToString().Trim();
         string text11        = this.Session.Contents["adminusername"].ToString().Trim();
         string text9         = this.TextBoxDlsid.Text.Trim();
         string text12        = this.DropDownListRate.SelectedItem.Text;
         string selectedValue = this.DropDownListRate.SelectedValue;
         string text14        = this.DropDownListPlType.SelectedValue;
         string text15        = this.RadioButton1.Checked ? "信用" : "现金";
         string text16        = this.DropDownListABC.SelectedValue;
         if ((((text2 == "") || (input == "")) || ((text8 == "") || (s == ""))) || ((((text10 == "") || (text11 == "")) || ((text14 == "") || (text15 == ""))) || (((text16 == "") || (text12 == "")) || (selectedValue == ""))))
         {
             MyFunc.showmsg("请输入会员帐号,名称,信用额度");
             base.Response.End();
         }
         else
         {
             Regex regex  = new Regex("[^'*%=\"<>/|]");
             Regex regex2 = new Regex("[^'*%=\"<>/|]");
             if (!regex2.IsMatch(input))
             {
                 MyFunc.showmsg("会员名称里含有非法字符");
                 base.Response.End();
             }
             else
             {
                 if ((text3 != "") && (text4 != ""))
                 {
                     if (text3 != text4)
                     {
                         MyFunc.showmsg("输入的密码不相同");
                         return;
                     }
                     text = ",userpass='******'";
                 }
                 if (input.Length > 8)
                 {
                     MyFunc.showmsg("会员名称不能大于8个字符(4个汉字)");
                     base.Response.End();
                 }
                 else
                 {
                     try
                     {
                         int num = (int)(int.Parse(s) * float.Parse(selectedValue));
                         if (num >= 0)
                         {
                             DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
                             int      num2  = int.Parse(base2.ExecuteScalar("SELECT usemoney FROM agence WHERE userid=" + text9).ToString());
                             int      num3  = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(usemoney),0) FROM member WHERE dlsid=" + text9 + " AND userid<>" + text2).ToString());
                             int      num4  = num2 - num3;
                             if (int.Parse(s) > num4)
                             {
                                 base2.Dispose();
                                 MyFunc.showmsg("信用度额不能大于总代理可用信用度额");
                                 base.Response.End();
                             }
                             else
                             {
                                 double num5 = double.Parse(base2.ExecuteScalar("SELECT ISNULL(usemoney-curmoney,0) FROM member WHERE userid=" + text2).ToString());
                                 text = text + ",curmoney=" + ((double.Parse(s) - num5)).ToString();
                                 int num6 = (int)base2.ExecuteScalar("SELECT COUNT(*) FROM member WHERE userid=" + text2);
                                 if (num6 < 1)
                                 {
                                     base2.Dispose();
                                     MyFunc.showmsg("没有该会员帐号!");
                                     base.Response.End();
                                 }
                                 else
                                 {
                                     if (text16.ToString().Trim().ToUpper() != base2.ExecuteScalar("select abc from member where userid ='" + text2 + "'").ToString().Trim().ToUpper())
                                     {
                                         base2.ExecuteNonQuery("DELETE FROM userhs where userid = '" + text2 + "'");
                                         base2.ExecuteNonQuery("insert userhs select  '" + text2.ToString().Trim() + "',w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,maxC1,maxC2,maxC3,maxC4,maxC5,maxC6,maxC7,maxC8,maxC9,maxC10,maxC11,maxC12,maxC13,maxC14,maxC15,maxZ1,maxZ2,maxZ3,maxZ4,maxZ5,maxZ6,maxZ7,maxZ8,maxZ9,maxZ10,maxZ11,maxZ12,maxZ13,maxZ14,maxZ15,W28,L28,maxC28,maxZ28,maxZ18,maxZ19,maxZ20,maxZ21,maxZ22,maxZ23,maxZ24,maxC18,maxC19,maxC20,maxC21,maxC22,maxC23,maxC24,w18,w19,w20,w21,w22,w23,w24,l18,l19,l20,l21,l22,l23,l24 from hs join agence on hs.userid = agence.userid where hs.userid='" + text9 + "' and hs.type='" + text16 + "'");
                                     }
                                     if (base2.ExecuteNonQuery("UPDATE member SET truename='" + input + "'" + text + ",tel='" + text6 + "',usemoney=" + s + ",moneysort='" + text12 + "',moneyrate=" + selectedValue + ",pltype='" + text14 + "',usertype='" + text15 + "',abc='" + text16 + "' WHERE userid=" + text2 + " AND gdid=" + text10) > 0)
                                     {
                                         base2.Dispose();
                                         MyFunc.JumpPage("修改会员成功!", "userlist.aspx");
                                     }
                                     else
                                     {
                                         base2.Dispose();
                                         MyFunc.showmsg("修改会员失败!");
                                     }
                                 }
                             }
                         }
                         else
                         {
                             MyFunc.showmsg("请输入正确的信用额度");
                             base.Response.End();
                         }
                     }
                     catch
                     {
                         MyFunc.showmsg("请输入正确的信用额度");
                         base.Response.End();
                     }
                 }
             }
         }
     }
 }
Пример #16
0
        private string GameList(string sday)
        {
            DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
            SqlDataReader reader = base2.ExecuteReader("SELECT * FROM Ball_BF WHERE isBK = 0 AND datediff(day,sortballtime,'" + sday + "')=0 ORDER BY sortballtime");
            string        text   = "";
            string        text2  = "";
            string        text3  = "";

            for (int i = 0; reader.Read(); i++)
            {
                if (reader["balltime"].ToString().Trim().ToLower().IndexOf("<br>") != -1)
                {
                    text3 = reader["balltime"].ToString().Trim().ToLower().Replace("<br>", " ").Split(new char[] { ' ' })[1];
                }
                else
                {
                    text3 = reader["balltime"].ToString().Trim();
                }
                if ((i % 2) == 0)
                {
                    text2 = "#FFFFFF";
                }
                else
                {
                    text2 = "#EBEBEB";
                }
                string text5 = text;
                string text6 = text5 + "<tr bgcolor=\"" + text2 + "\" OnMouseOut=\"this.bgColor='" + text2 + "';\" onMouseOver=\"this.bgColor='#cccccc';\"><td align=\"center\">" + text3 + "</td><td align=\"center\">" + reader["ballid"].ToString().Trim() + "</td><td>" + reader["matchname"].ToString().Trim() + "</td>";
                text = text6 + "<td>" + reader["team1"].ToString().Trim() + "</td><td>" + reader["team2"].ToString().Trim() + "</td><td align=\"center\">";
                if (reader["fen1"].ToString().Trim() == "")
                {
                    text = text + "<SPAN style=\"CURSOR: hand;\" onMouseOver=\"this.className='oo'\" onMouseOut=\"this.className='oo1'\" onclick=\"javascript:show_win('" + reader["ballid"].ToString().Trim() + "','1','','')\">未输入</span>";
                }
                else
                {
                    string text7 = text;
                    text = text7 + "<SPAN style=\"CURSOR: hand;\" onMouseOver=\"this.className='oo'\" onMouseOut=\"this.className='oo1'\" onclick=\"javascript:show_win('" + reader["ballid"].ToString().Trim() + "','1','" + reader["fen1"].ToString().Trim().Split(new char[] { ':' })[0] + "','" + reader["fen1"].ToString().Trim().Split(new char[] { ':' })[1] + "')\">" + reader["fen1"].ToString().Trim() + "</span>";
                }
                text = text + "</td><td align=\"center\">";
                if (reader["fen2"].ToString().Trim() == "")
                {
                    text = text + "<SPAN style=\"CURSOR: hand;\" onMouseOver=\"this.className='oo'\" onMouseOut=\"this.className='oo1'\" onclick=\"javascript:show_win('" + reader["ballid"].ToString().Trim() + "','2','','')\">未输入</span>";
                }
                else
                {
                    string text8 = text;
                    text = text8 + "<SPAN style=\"CURSOR: hand;\" onMouseOver=\"this.className='oo'\" onMouseOut=\"this.className='oo1'\" onclick=\"javascript:show_win('" + reader["ballid"].ToString().Trim() + "','2','" + reader["fen2"].ToString().Trim().Split(new char[] { ':' })[0] + "','" + reader["fen2"].ToString().Trim().Split(new char[] { ':' })[1] + "')\">" + reader["fen2"].ToString().Trim() + "</span>";
                }
                text = text + "</td><td align=center>";
                if (reader["ishtcancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    string text9 = text;
                    text = text9 + "<a href=gamefen.aspx?action=open1&ballid=" + reader["ballid"].ToString().Trim() + "&selday=" + sday + " onclick=\"return confirm('确定恢复下半场赛事?将恢复本赛所有已取消的事订单!');\">恢复半场</a>";
                }
                else
                {
                    string text10 = text;
                    text = text10 + "<a href=gamefen.aspx?action=close1&ballid=" + reader["ballid"].ToString().Trim() + "&selday=" + sday + " onclick=\"return confirm('确定取消下半场赛事?将取消本赛事所有对应的订单!');\">取消半场</a>";
                }
                text = text + "</td><td align=center>";
                if (reader["iscancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    string text11 = text;
                    text = text11 + "<a href=gamefen.aspx?action=open&ballid=" + reader["ballid"].ToString().Trim() + "&selday=" + sday + " onclick=\"return confirm('确定恢复赛事?将恢复本赛所有已取消的事订单!');\">恢复赛事</a>";
                }
                else
                {
                    string text12 = text;
                    text = text12 + "<a href=gamefen.aspx?action=close&ballid=" + reader["ballid"].ToString().Trim() + "&selday=" + sday + " onclick=\"return confirm('确定取消赛事?将取消所有本赛事订单!');\">取消赛事</a>";
                }
                text = text + "</td><td align=center>";
                if (reader["iscancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    text = text + "<font color=red>全场取消</font>";
                }
                else if (reader["ishtcancel"].ToString().Trim().ToUpper() == "TRUE")
                {
                    text = text + "<font color=red>半场取消</font>";
                }
                else
                {
                    text = text + "&nbsp;";
                }
                text = text + "</td></tr>";
            }
            reader.Close();
            base2.Dispose();
            return(text);
        }
Пример #17
0
        private void setShowContent()
        {
            int           curpage;
            int           start;
            string        sql        = this.GetSqlStr();
            string        sumSqlStr  = this.GetSumSqlStr();
            string        tzTypeName = MyFunc.GettzTypeName(this.tzType.Value);
            int           num        = 0;
            double        num2       = 0;
            double        num3       = 0;
            double        num4       = 0;
            StringBuilder builder    = new StringBuilder();
            DataBase      base2      = new DataBase(MyFunc.GetConnStr(2));
            int           pagesize   = 100;

            try
            {
                curpage = int.Parse(this.thePages.SelectedValue);
            }
            catch
            {
                curpage = 1;
            }
            if (curpage < 1)
            {
                curpage = 1;
            }
            builder.Append("<table border=0 cellspacing=1 cellpadding=0 width=100% class=tableBorder1>\n");
            builder.Append("<tr class='dlsheader'><td width=10%>时间</td><td width=15%>会员(win/lose)</td><td width=10%>方式</td><td width=25%>详情</td><td width=10%>注额</td><td width=10%>成数</td><td width=10%>注额(成数)</td><td width=10%>结果</td></tr>\n");
            int totalrecord = int.Parse(base2.ExecuteScalar(sumSqlStr).ToString());

            if (totalrecord == 0)
            {
                start = 0;
            }
            else
            {
                start = (curpage - 1) * pagesize;
            }
            DataSet set  = base2.ExecuteDataSet(sql, start, pagesize, "ball_order");
            int     num9 = 0;

            for (int i = 1; num9 < set.Tables[0].Rows.Count; i++)
            {
                builder.Append("<tr bgcolor=#ffffff align=right>");
                builder.Append("<td align=center>");
                builder.Append(DateTime.Parse(set.Tables[0].Rows[num9]["updatetime"].ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss").ToUpper().Replace(" ", "<br>"));
                builder.Append("</td><td align=center nowrap><table border=0 cellpadding=1 cellspacing=0 width=100%><tr><td><font color=red>");
                builder.Append(set.Tables[0].Rows[num9]["abc"].ToString());
                builder.Append("</font>&nbsp;");
                builder.Append(set.Tables[0].Rows[num9]["username"].ToString());
                builder.Append("&nbsp;</td><td nowrap><font color=red>");
                builder.Append(Convert.ToDouble(set.Tables[0].Rows[num9]["hsuser_w"]).ToString("F2"));
                builder.Append("</font>/<font color=red>");
                builder.Append(Convert.ToDouble(set.Tables[0].Rows[num9]["hsuser_l"]).ToString("F2"));
                builder.Append("</font></td></tr></table></td>");
                builder.Append("<td align=center><font color=blue>");
                builder.Append(tzTypeName);
                builder.Append("</td><td>");
                builder.Append(set.Tables[0].Rows[num9]["content"].ToString());
                builder.Append("</td><td>");
                builder.Append(MyFunc.NumBerFormat(set.Tables[0].Rows[num9]["tzmoney"].ToString()));
                builder.Append("</td><td>");
                builder.Append(Convert.ToDouble(set.Tables[0].Rows[num9]["csgd"]).ToString("F1"));
                builder.Append("</td><td>");
                builder.Append(MyFunc.NumBerFormat(set.Tables[0].Rows[num9]["csres"].ToString()));
                builder.Append("</td><td>");
                builder.Append(MyFunc.NumBerFormat(set.Tables[0].Rows[num9]["result"].ToString()));
                builder.Append("</td></tr>\n");
                num++;
                num2 += double.Parse(set.Tables[0].Rows[num9]["tzmoney"].ToString());
                num3 += double.Parse(set.Tables[0].Rows[num9]["csres"].ToString());
                num4 += double.Parse(set.Tables[0].Rows[num9]["result"].ToString());
                num9++;
            }
            if (set.Tables[0].Rows.Count == 0)
            {
                builder.Append("<tr bgcolor=#ffffff><td colspan=9 align=center height=30><marquee align=middle behavior=alternate width=200><font color=red size=2><b>没有资料</b></font></marquee></td></tr>\n");
            }
            else
            {
                builder.Append("<tr bgcolor=#dfefff height=22 class=reportTotalnum><td colspan=4 align=right>");
                builder.Append(num.ToString());
                builder.Append("</td><td align=right>");
                builder.Append(num2.ToString());
                builder.Append("</td><td align=right>&nbsp;");
                builder.Append("</td><td align=right>");
                builder.Append(num3.ToString());
                builder.Append("</td><td align=right >");
                builder.Append(num4.ToString());
                builder.Append("</td></tr>");
            }
            builder.Append("</table>\n");
            set.Clear();
            base2.CloseConnect();
            base2.Dispose();
            this.showContent.Rows[0].Cells[0].InnerHtml = builder.ToString();
            this.setselectpageproc(pagesize, totalrecord, curpage);
        }
Пример #18
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         DateTime now = DateTime.Now;
         this.datetime = now.Year.ToString() + "-" + now.Month.ToString() + "-" + now.Day.ToString();
         string sql   = "";
         string text2 = "";
         text2         = MyFunc.GetConnStr(2).ToLower();
         text2         = text2.Substring(text2.IndexOf("catalog=", 0) + 8, (text2.IndexOf(";user", 0) - text2.IndexOf("catalog=", 0)) - 8);
         this.kyglName = this.Session.Contents["adminusername"].ToString().Trim();
         if ((base.Request.QueryString["date"] != null) && (base.Request.QueryString["date"].ToString().Trim() != ""))
         {
             this.kyglTT = "结果";
             try
             {
                 DateTime.Parse(base.Request.QueryString["date"].ToString().Trim());
             }
             catch
             {
                 return;
             }
             sql = "SELECT updatetime,tztype,orderid,content,tzmoney,(win-lose) AS result,iscancel,isdanger,zdmoney,GetDate() as thisdatetime FROM ball_order2 WHERE userid=" + this.Session.Contents["adminuserid"].ToString().Trim() + " AND datediff(day,balltime,'" + base.Request.QueryString["date"].ToString().Trim() + "')=0 AND isjs=1 ORDER BY updatetime DESC";
         }
         else
         {
             this.kyglTT = "可嬴金额";
             sql         = "SELECT updatetime,tztype,orderid,content,tzmoney,(tzmoney*curpl) AS result,iscancel,isdanger,zdmoney,GetDate() as thisdatetime FROM ball_order2 WHERE userid=" + this.Session.Contents["adminuserid"].ToString().Trim() + " AND isjs=0 ORDER BY updatetime DESC";
         }
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT convert(nvarchar,updatetime,11) as updatetime,content FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         this.msg = "<div class=hover>";
         while (reader.Read())
         {
             this.msg = this.msg + reader["content"].ToString().Trim();
         }
         this.msg = this.msg + "</div>";
         reader.Close();
         SqlDataReader reader2 = base2.ExecuteReader(sql);
         double        num     = 0;
         double        num2    = 0;
         for (int i = 1; reader2.Read(); i++)
         {
             double num4     = Math.Round(double.Parse(reader2["tzmoney"].ToString().Trim()), 2);
             double num5     = Math.Round(double.Parse(reader2["result"].ToString().Trim()), 2);
             string kyglList = this.kyglList;
             this.kyglList = kyglList + "<TR><td style='text-align:center'>" + reader2["updatetime"].ToString().Trim() + "</td><TD>" + reader2["orderid"].ToString().Trim() + "</TD><TD style=\"TEXT-ALIGN: center\">" + MyFunc.GettzTypeName(reader2["tztype"].ToString().Trim());
             this.kyglList = this.kyglList + "</TD>";
             this.kyglList = this.kyglList + "<TD class='details' noWrap style=\"TEXT-ALIGN: right\">" + reader2["content"].ToString().Trim() + "</TD>";
             if ((reader2["isdanger"].ToString().Trim() == "2") || (num4 == 0))
             {
                 this.kyglList = this.kyglList + "<TD class='tdR'><font color=red>-</font></TD><TD class='tdR'>";
             }
             else
             {
                 this.kyglList = this.kyglList + "<TD class='tdR'>" + num4.ToString("F0") + "</TD><TD class='tdR'>";
             }
             if ((ConfigurationSettings.AppSettings["UserDanger"] == "1") && (reader2["isdanger"].ToString().Trim() == "2"))
             {
                 this.kyglList = this.kyglList + "<br><font color=red>危险球<br>取消</font>";
             }
             else if (reader2["iscancel"].ToString().Trim().ToUpper() == "TRUE")
             {
                 this.kyglList = this.kyglList + "<font color=red>取消</font>";
             }
             else
             {
                 this.kyglList = this.kyglList + num5;
                 num          += num4;
                 num2         += num5;
             }
             this.kyglList = this.kyglList + "</TD></TR>";
         }
         reader2.Close();
         base2.Dispose();
         this.kyglList = this.kyglList + "<TR style='BACKGROUND-COLOR: #e9e9e9'><TD class='tdR' colSpan='4'><IMG src='../user/images/print.gif' border='0'> <A href='javascript:window.print()'> 打印</A>&nbsp;</TD>";
         object obj2 = this.kyglList;
         this.kyglList = string.Concat(new object[] { obj2, "<TD class='tdR' style='VERTICAL-ALIGN: middle' bgColor='lightyellow'><B style='FONT-SIZE: 14px; COLOR: brown'>", num, "</B>&nbsp;</TD>" });
         this.kyglList = this.kyglList + "<TD class='tdR' style='VERTICAL-ALIGN: middle' bgColor='lightyellow'><B style='FONT-SIZE: 14px; COLOR: brown'>" + num2.ToString("F2") + "</B>&nbsp;</TD></TR>";
         this.DataBind();
     }
 }
Пример #19
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0) || !MyTeam.OnlineList.OnlineList.isUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         DataBase      db      = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader  = db.ExecuteReader("SELECT convert(nvarchar,updatetime,11) as updatetime,content FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         SqlDataReader reader2 = null;
         int           num     = 0;
         double        num2    = 0;
         string        text    = "";
         this.msg = "<div class=hover>";
         while (reader.Read())
         {
             this.msg = this.msg + reader["content"].ToString().Trim();
         }
         this.msg = this.msg + "</div>";
         reader.Close();
         string text2 = db.ExecuteScalar("SELECT ISNULL(jsdatetime,'') FROM member WHERE userid=" + this.Session.Contents["userid"].ToString().Trim()).ToString().Trim();
         double num3  = 0;
         double num4  = 0;
         reader2 = db.ExecuteReader("SELECT top 1 * FROM ball_bf1  ORDER BY balltime DESC");
         if (reader2.Read())
         {
             DateTime time = Convert.ToDateTime(reader2["balltime"].ToString().Trim());
             TimeSpan span = DateTime.Now.Subtract(time);
             num  = ((span.Days * 0x5a0) + (span.Hours * 60)) + span.Minutes;
             text = reader2["qishu"].ToString().Trim();
         }
         reader2.Close();
         string  s     = "";
         string  text4 = "";
         string  text5 = "";
         string  text6 = "";
         string  text7 = "";
         DataSet set   = db.ExecuteDataSet("select * from ball_bf1 where ballid in (select top 3 ballid from ball_bf1 order by ballid desc) order by ballid");
         for (int i = 0; i < 3; i++)
         {
             s     = set.Tables[0].Rows[i]["balltime"].ToString().Trim().Split(new char[] { ' ' })[0].ToString();
             text4 = s.Split(new char[] { '-' })[0].ToString();
             text6 = s.Split(new char[] { '-' })[1].ToString();
             text5 = s.Split(new char[] { '-' })[2].ToString();
             text7 = MyFunc.DayToWeek(DateTime.Parse(s));
             string sql = "SELECT COUNT(1) AS tzcount, ISNULL(SUM(tzmoney),0) AS tzmoney,ISNULL(SUM(ROUND(win-lose,2)),0) AS result FROM ball_order WHERE DateDiff(day,balltime,'" + s + "')=0 AND  isjs=1 AND userid=" + this.Session.Contents["userid"].ToString().Trim();
             if (text2 != "")
             {
                 sql = sql + " AND updatetime>'" + text2 + "'";
             }
             reader2 = db.ExecuteReader(sql);
             reader2.Read();
             double num6 = Math.Round(double.Parse(reader2["tzmoney"].ToString()), 2);
             double num7 = Math.Round(double.Parse(reader2["result"].ToString()), 2);
             this.kyglList = this.kyglList + "<TR class=\"b_rig\"><TD class=\"b_fwn\">";
             if (int.Parse(text5) < 10)
             {
                 text5 = "0" + text5;
             }
             if (int.Parse(text6) < 10)
             {
                 text6 = "0" + text6;
             }
             if (int.Parse(reader2["tzcount"].ToString().Trim()) != 0)
             {
                 string kyglList = this.kyglList;
                 this.kyglList = kyglList + "<a href=bets-enquiry.aspx?date=" + s + "><font color=#CC0000>" + text6 + "-" + text5 + "  " + text7 + "</font></a>";
             }
             else
             {
                 string text10 = this.kyglList;
                 this.kyglList = text10 + "<font color=#CC0000>" + text6 + "-" + text5 + " " + text7 + "</font>";
             }
             reader2.Close();
             num2  = 0;
             num2  = double.Parse(MyFunc.usermsg(this.Session.Contents["userid"].ToString().Trim(), db, "0")[2].ToString()) - num6;
             num3 += num6;
             num4 += num7;
             object obj2 = this.kyglList;
             this.kyglList = string.Concat(new object[] { obj2, "</TD><TD class='tdR'>", set.Tables[0].Rows[i]["qishu"].ToString().Trim(), "</td><TD class='tdR'>", num6, "</TD><TD class='tdR'>", num7, "</TD><TD class='tdR'>", num2, "</TD></TR>" });
         }
         db.Dispose();
         string text11 = this.kyglList;
         this.kyglList = text11 + "<TR style='BACKGROUND-COLOR: #e9e9e9' class=\"b_rig\"><TD class=\"b_fwn\" >小计</TD><td class='list_rig'></td><TD class='list_rig' bgColor='lightyellow'><B style='FONT-SIZE: 14px; COLOR: brown'>" + num3.ToString("F2") + "</B></TD><TD class='list_rig' bgColor='lightyellow'><B style='FONT-SIZE: 14px; COLOR: brown'>" + num4.ToString("F2") + "</B></TD><td bgColor=#990000><FONT color=#ffffff></FONT></td></TR>";
         this.DataBind();
     }
 }
Пример #20
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            string text9  = "";
            string text8  = this.TextBoxGdID.Text.Trim();
            string input  = this.TextBoxUserName.Text.Trim();
            string text2  = this.TextBoxNewpass1.Text.Trim();
            string text3  = this.TextBoxNewpass2.Text.Trim();
            string text4  = this.TextBoxTrueName.Text.Trim();
            string s      = this.DropDownListBL.SelectedValue.Trim();
            string text6  = MyFunc.DefaultValue(base.Request.Form["DropDownListGsGd"], "");
            string text7  = this.TextBoxUseMoney.Text.Trim();
            string text10 = this.TextBoxMaxMem.Text.Trim();

            if ((((text8 == "") || (input == "")) || ((text4 == "") || (s == ""))) || ((text10 == "") || (text6 == "")))
            {
                MyFunc.showmsg("请输入股东帐号,名称,成数和最大会员数");
                base.Response.End();
            }
            else
            {
                Regex regex  = new Regex("[^'*%=\"<>/|]");
                Regex regex2 = new Regex("[^'*%=\"<>/|]");
                if (!regex.IsMatch(input) || !regex2.IsMatch(text4))
                {
                    MyFunc.showmsg("股东帐号或股东名里含有非法字符");
                    base.Response.End();
                }
                else
                {
                    if ((text2 != "") && (text3 != ""))
                    {
                        if (text2 != text3)
                        {
                            MyFunc.showmsg("输入的密码不相同");
                            return;
                        }
                        text9 = ",userpass='******'";
                    }
                    if (text4.Length > 8)
                    {
                        MyFunc.showmsg("股东名称不能大于8个字符(4个汉字)");
                        base.Response.End();
                    }
                    else
                    {
                        try
                        {
                            int num = int.Parse(s);
                            if (((num % 10) == 0) && ((num >= 0) || (num <= 100)))
                            {
                                try
                                {
                                    int num2 = int.Parse(text6);
                                    if ((num2 >= int.Parse(s)) || (num2 <= 100))
                                    {
                                        try
                                        {
                                            if (int.Parse(text7) >= 0)
                                            {
                                                try
                                                {
                                                    int.Parse(text10);
                                                }
                                                catch
                                                {
                                                    MyFunc.showmsg("请输入正确的最大会员数");
                                                    base.Response.End();
                                                    return;
                                                }
                                                DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
                                                int      num9  = 100 - int.Parse(text6);
                                                if (int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM agence WHERE gdid=" + text8 + " AND bl+zdlbl>" + num9.ToString()).ToString()) > 0)
                                                {
                                                    MyFunc.showmsg("不能修改股东成数,该股东下有总代理和代理商的成数和大于" + ((100 - int.Parse(s))).ToString());
                                                    base.Response.End();
                                                }
                                                else if (int.Parse(base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE userid=" + text8).ToString()) < 1)
                                                {
                                                    base2.Dispose();
                                                    MyFunc.showmsg("没有该股东");
                                                }
                                                else
                                                {
                                                    int num4 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(usemoney),0) FROM agence WHERE gdid=" + this.TextBoxGdID.Text + " AND isuseable=1 AND classid = 3").ToString());
                                                    int num5 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(usemoney),0) FROM agence WHERE gdid=" + this.TextBoxGdID.Text + " AND isuseable=0 AND classid = 3").ToString());
                                                    int num6 = (int.Parse(this.TextBoxUseMoney.Text) - num4) - num5;
                                                    if (num6 < 0)
                                                    {
                                                        base2.Dispose();
                                                        MyFunc.showmsg("信用额度一定要大于已用额度:" + ((num4 + num5)).ToString());
                                                        base.Response.End();
                                                    }
                                                    else
                                                    {
                                                        int num7 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE gdid=" + text8).ToString());
                                                        if ((num7 > int.Parse(text10)) && (int.Parse(text10) != 0))
                                                        {
                                                            base2.Dispose();
                                                            MyFunc.showmsg("该股东已有 " + num7.ToString() + " 个会员,设置的最大会员数最小为" + num7.ToString());
                                                            base.Response.End();
                                                        }
                                                        else if (base2.ExecuteNonQuery("UPDATE agence SET truename='" + text4 + "'" + text9 + ",gsbl=" + s + ",maxmem=" + text10 + ",usemoney=" + text7 + " WHERE userid=" + text8) > 0)
                                                        {
                                                            int num8 = int.Parse(text6) - int.Parse(s);
                                                            base2.ExecuteNonQuery("UPDATE agence SET gsbl=" + s + " WHERE gdid=" + text8 + " AND classid=4");
                                                            base2.ExecuteNonQuery("UPDATE agence SET gdbl=100-bl-zdlbl-gsbl WHERE gdid=" + text8 + " AND classid=4");
                                                            base2.Dispose();
                                                            MyFunc.JumpPage("修改股东成功!", "gdlist.aspx");
                                                        }
                                                        else
                                                        {
                                                            base2.Dispose();
                                                            MyFunc.showmsg("修改股东失败!");
                                                        }
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                MyFunc.showmsg("请输入正确的信用额度");
                                                base.Response.End();
                                            }
                                        }
                                        catch
                                        {
                                            MyFunc.showmsg("请输入正确的信用额度");
                                            base.Response.End();
                                        }
                                    }
                                    else
                                    {
                                        MyFunc.showmsg("请选择正确的公司+股东成数");
                                        base.Response.End();
                                    }
                                }
                                catch
                                {
                                    MyFunc.showmsg("请选择正确的公司+股东成数");
                                    base.Response.End();
                                }
                            }
                            else
                            {
                                MyFunc.showmsg("请选择正确的公司成数");
                                base.Response.End();
                            }
                        }
                        catch
                        {
                            MyFunc.showmsg("请选择正确的公司成数");
                            base.Response.End();
                        }
                    }
                }
            }
        }
Пример #21
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            string   input;
            string   s;
            string   text6;
            string   text7;
            string   text8;
            string   text9;
            string   text11;
            string   text12;
            string   text13;
            string   text14;
            string   text15;
            string   text16;
            DataBase base2;
            int      num7;

            if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "1", 1))
            {
                MyFunc.goToLoginPage();
                base.Response.End();
            }
            else
            {
                text11 = "";
                text12 = "";
                text13 = "";
                text14 = "";
                text15 = "";
                text7  = this.TextBoxDlsID.Text.Trim();
                string text  = this.TextBoxUserName.Text.Trim();
                string text2 = this.TextBoxNewpass1.Text.Trim();
                string text3 = this.TextBoxNewpass2.Text.Trim();
                input = this.TextBoxTrueName.Text.Trim();
                s     = this.TextBoxUseMoney.Text.Trim();
                text6 = this.DropDownListIsUseAble.SelectedValue.Trim();
                text9 = this.TextBoxZdlID.Text.Trim();
                string text10 = this.TextBoxGdId.Text.Trim();
                text8  = this.TextBoxTel.Text.Trim();
                text14 = this.DropDownListZdlBl.SelectedValue.Trim();
                text15 = this.DropDownListDlsBl.SelectedValue.Trim();
                text16 = this.TextBoxMaxMem.Text.Trim();
                if ((((text == "") || (input == "")) || ((text6 == "") || (s == ""))) || (((text14 == "") || (text15 == "")) || (text16 == "")))
                {
                    MyFunc.showmsg("请输入代理商帐号,密码,名称,即时注单状态,信用额度");
                    base.Response.End();
                }
                else
                {
                    Regex regex  = new Regex("[^'*%=\"<>/|]");
                    Regex regex2 = new Regex("[^'*%=\"<>/|]");
                    if (!regex.IsMatch(text) || !regex2.IsMatch(input))
                    {
                        MyFunc.showmsg("代理商帐号或名称里含有非法字符");
                        base.Response.End();
                    }
                    else if (input.Length > 8)
                    {
                        MyFunc.showmsg("代理商名称不能大于8个字符(4个汉字)");
                        base.Response.End();
                    }
                    else
                    {
                        if ((text2 != "") && (text3 != ""))
                        {
                            if (text2 != text3)
                            {
                                MyFunc.showmsg("输入的密码不相同");
                                return;
                            }
                            text11 = ",userpass='******'";
                        }
                        try
                        {
                            if (int.Parse(s) >= 0)
                            {
                                try
                                {
                                    int.Parse(text16);
                                }
                                catch
                                {
                                    MyFunc.showmsg("请输入正确的最大会员数");
                                    base.Response.End();
                                    return;
                                }
                                base2  = new DataBase(MyFunc.GetConnStr(2));
                                text12 = base2.ExecuteScalar("SELECT gdbl FROM agence WHERE userid=" + text10).ToString();
                                text13 = base2.ExecuteScalar("SELECT gsbl FROM agence WHERE userid=" + text10).ToString();
                                if ((int.Parse(text14) + int.Parse(text15)) > (100 - int.Parse(text12)))
                                {
                                    MyFunc.showmsg("总代理,代理商的比例相加不能大于" + ((100 - int.Parse(text12))).ToString());
                                    base.Response.End();
                                    return;
                                }
                                text12 = (((100 - int.Parse(text15)) - int.Parse(text14)) - int.Parse(text13)).ToString();
                                int num2 = (int)base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE userid=" + text7);
                                if (num2 < 1)
                                {
                                    base2.Dispose();
                                    MyFunc.showmsg("没有该代理商");
                                    return;
                                }
                                int num3 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text9).ToString());
                                if (num3 > 0)
                                {
                                    int num4 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE dlsid=" + text7).ToString());
                                    if (num4 > int.Parse(text16))
                                    {
                                        base2.Dispose();
                                        MyFunc.showmsg("该代理商已有 " + num4.ToString() + " 个会员,设置的最大会员数最小为 " + num4.ToString());
                                        base.Response.End();
                                    }
                                    else
                                    {
                                        num4 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(maxmem),0) FROM agence WHERE zdlid=" + text9 + " AND classid=4 AND userid<>" + text7).ToString());
                                        if ((num4 + int.Parse(text16)) <= num3)
                                        {
                                            goto Label_05B5;
                                        }
                                        base2.Dispose();
                                        object[] objArray = new object[] { "该代理商的总代理最大会员数为 ", num3, " ,现在代理商最大会员数最大可设为 ", (num3 - num4).ToString() };
                                        MyFunc.showmsg(string.Concat(objArray));
                                        base.Response.End();
                                    }
                                    return;
                                }
                                int num5 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + text10).ToString());
                                if (num5 > 0)
                                {
                                    int num6 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(maxmem),0) FROM agence WHERE gdid=" + text10 + " AND classid=4 AND userid<>" + text7).ToString());
                                    if ((num6 + int.Parse(text16)) > num5)
                                    {
                                        base2.Dispose();
                                        object[] objArray2 = new object[] { "该代理商的股东的最大会员数为 ", num5, " ,现在代理商最大会员数最大可设为 ", (num5 - num6).ToString() };
                                        MyFunc.showmsg(string.Concat(objArray2));
                                        base.Response.End();
                                        return;
                                    }
                                }
                                goto Label_05B5;
                            }
                            MyFunc.showmsg("请输入正确的信用额度");
                            base.Response.End();
                        }
                        catch
                        {
                            MyFunc.showmsg("请输入正确的信用额度");
                            base.Response.End();
                        }
                    }
                }
            }
            return;

Label_05B5:
            num7 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(usemoney,0) FROM agence WHERE userid=" + text9).ToString());
            int num8 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(usemoney),0) FROM agence WHERE zdlid=" + text9).ToString());
            int num9 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(usemoney,0) FROM agence WHERE userid=" + text7).ToString());

            if (int.Parse(s) > ((num7 - num8) + num9))
            {
                base2.Dispose();
                MyFunc.showmsg("代理商信用额度不能大于总代理可用信用额度");
                base.Response.End();
            }
            else if (base2.ExecuteNonQuery("UPDATE agence SET truename='" + input + "'" + text11 + ",usemoney=" + s + ",isuseable=" + text6 + ",tel='" + text8 + "',bl=" + text15 + ",gsbl=" + text13 + ",gdbl=" + text12 + ",zdlbl=" + text14 + ",maxmem=" + text16 + " WHERE userid=" + text7) > 0)
            {
                base2.Dispose();
                MyFunc.JumpPage("修改代理商成功!", "dlslist.aspx");
            }
            else
            {
                base2.Dispose();
                MyFunc.showmsg("修改代理商失败!");
            }
        }
Пример #22
0
        private void Jsgg(string type, string td)
        {
            DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
            DataBase      base3  = new DataBase(MyFunc.GetConnStr(2));
            SqlDataReader reader = base2.ExecuteReader("SELECT * FROM ball_order WHERE tztype=" + type + " AND datediff(day,updatetime,'" + td + "')=0");

            while (reader.Read())
            {
                bool   isfinish = true;
                double num      = this.JsggPl(reader["orderid"].ToString().Trim(), out isfinish);
                double num2     = 0;
                double num3     = 0;
                double num4     = double.Parse(reader["tzmoney"].ToString().Trim());
                double num5     = double.Parse(reader["hsuser_w"].ToString().Trim());
                double num6     = double.Parse(reader["hsuser_l"].ToString().Trim());
                double num7     = double.Parse(reader["hsdls_w"].ToString().Trim());
                double num8     = double.Parse(reader["hsdls_l"].ToString().Trim());
                double num9     = double.Parse(reader["hszdl_w"].ToString().Trim());
                double num10    = double.Parse(reader["hszdl_l"].ToString().Trim());
                double num11    = double.Parse(reader["hsgd_w"].ToString().Trim());
                double num12    = double.Parse(reader["hsgd_l"].ToString().Trim());
                double num13    = 0;
                double num14    = 0;
                double num15    = 1;
                double num16    = 0;
                if (num > 0)
                {
                    if ((num - 1) > 0)
                    {
                        num2  = num4 * (num - 1);
                        num3  = 0;
                        num13 = num2 + (((num4 * num7) / 100) * num15);
                        num14 = num2 + (((num4 * num9) / 100) * num15);
                        num16 = num2 + (((num4 * num11) / 100) * num15);
                        num2 += ((num4 * num5) / 100) * num15;
                    }
                    else if ((num - 1) == 0)
                    {
                        num2  = 0;
                        num3  = 0;
                        num13 = 0;
                        num14 = 0;
                    }
                    else
                    {
                        num2  = 0;
                        num3  = Math.Abs((double)(num4 * (num - 1)));
                        num13 = -num3 + (((num4 * num8) / 100) * num15);
                        num14 = -num3 + (((num4 * num10) / 100) * num15);
                        num16 = -num3 + (((num4 * num12) / 100) * num15);
                        num3 -= ((num4 * num6) / 100) * num15;
                    }
                }
                else if (num == 0)
                {
                    num2  = 0;
                    num3  = num4 - (((num4 * num6) / 100) * num15);
                    num13 = -num4 + (((num4 * num8) / 100) * num15);
                    num14 = -num4 + (((num4 * num10) / 100) * num15);
                    num16 = -num4 + (((num4 * num12) / 100) * num15);
                }
                if (isfinish)
                {
                    base3.ExecuteNonQuery("UPDATE ball_order SET win=" + num2.ToString() + ",lose=" + num3.ToString() + ",isjs=1,truewin=" + num15.ToString() + ",iscancel=0,mdls=" + num13.ToString() + ",mzdl=" + num14.ToString() + ",mgd=" + num16.ToString() + " WHERE orderid=" + reader["orderid"].ToString().Trim());
                    this.AddCount("0");
                }
            }
            reader.Close();
            base2.Dispose();
            base3.Dispose();
        }
Пример #23
0
        private string SumAllMember()
        {
            string        text2   = "";
            string        text3   = "";
            string        text4   = "";
            int           num     = 0;
            DataBase      base2   = new DataBase(MyFunc.GetConnStr(2));
            DataBase      base3   = new DataBase(MyFunc.GetConnStr(1));
            SqlDataReader reader  = null;
            SqlDataReader reader2 = null;
            DataSet       set     = null;

            string[] textArray = "单,双,大,小,红波,绿波,蓝波".Split(new char[] { ',' });
            reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,content,qishu,kaisai FROM affiche WHERE le=1 ORDER BY updatetime DESC");
            if (reader.Read())
            {
                DateTime time = Convert.ToDateTime(reader["kaisai"].ToString().Trim());
                TimeSpan span = DateTime.Now.Subtract(time);
                int      num3 = ((span.Days * 0x5a0) + (span.Hours * 60)) + span.Minutes;
                if (num3 < 360)
                {
                    object obj2 = text2;
                    text2 = string.Concat(new object[] { obj2, "<tr bgcolor='#FFFFFF' ><td rowspan=10>", reader["kaisai"].ToString().Split(new char[] { ' ' })[0].ToString().Trim(), "<BR>", reader["kaisai"].ToString().Split(new char[] { ' ' })[1].ToString().Trim(), "</td><td rowspan=10 align=center>", reader["qishu"], "</td>" });
                    text4 = reader["kaisai"].ToString();
                    reader.Close();
                    set = base3.ExecuteDataSet("SELECT v1.*,isnull((cl.giveup1sum-cl.giveup2sum)/cl.giveupmoney*giveuppl,0) as give FROM Pl as v1 LEFT JOIN changeleave as cl ON (v1.id = cl.ballid AND cl.gsid = '" + this.Session["usergsid"].ToString() + "')  where ((id>10 and id<35 )or (id>132 and id <151)) order by id asc");
                    for (int i = 0; i < 7; i++)
                    {
                        string text5;
                        if (i < 2)
                        {
                            text5 = "6";
                        }
                        else if ((i > 1) && (i < 4))
                        {
                            text5 = "7";
                        }
                        else
                        {
                            text5 = "10";
                        }
                        if (i > 3)
                        {
                            this.Session.Contents["ABC"] = "0";
                        }
                        if (i != 0)
                        {
                            text2 = text2 + "<tr bgcolor='#FFFFFF' >";
                        }
                        text2 = text2 + "<td align=center>" + textArray[i] + "</td>";
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text7 = text2;
                            text2 = text7 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td> ";
                        }
                        num++;
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text8 = text2;
                            text2 = text8 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td> ";
                        }
                        num++;
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text9 = text2;
                            text2 = text9 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td> ";
                        }
                        num++;
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text10 = text2;
                            text2 = text10 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td> ";
                        }
                        num++;
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text11 = text2;
                            text2 = text11 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td> ";
                        }
                        num++;
                        reader2.Close();
                        if (this.Session["sessionSelectStaticCS"].ToString() == "全部")
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid asc");
                        }
                        else
                        {
                            reader2 = base2.ExecuteReader("select max(tztype) as tztype,max(tzteam) as tzteam,count(1) as orderno,isnull(sum(tzmoney*csdls),0) as summoney from ball_order where DATEDIFF(dd, GETDATE(), updatetime)=0 and dlsid = '" + this.Session["adminuserid"].ToString() + "' and ballid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + " group by ballid order by ballid desc");
                        }
                        text3 = double.Parse(MyFunc.GetPlType(set.Tables[0].Rows[num]["pl"].ToString().Trim(), this.Session.Contents["ABC"].ToString().Trim(), set.Tables[0].Rows[num]["give"].ToString().Trim(), "H", "0").ToString("F2")).ToString();
                        if (reader2.Read())
                        {
                            string text12 = text2;
                            text2 = text12 + "<td align=center class=tznumer>" + text3 + "   <br>  <a href='tzinfo.aspx?gameid=" + set.Tables[0].Rows[num]["id"].ToString().Trim() + "&tztype=" + text5 + "&marker=C'>  <font color=#000088>" + double.Parse(reader2["summoney"].ToString()).ToString() + "</font></a></td></tr> ";
                        }
                        else
                        {
                            text2 = text2 + "<td align=center class=tznumer>" + text3 + "   <br>    <font color=#000088>0</font></a></td></tr> ";
                        }
                        num++;
                        reader2.Close();
                    }
                    set.Dispose();
                }
            }
            reader.Close();
            base3.CloseConnect();
            base3.Dispose();
            base2.CloseConnect();
            base2.Dispose();
            return(text2 + "\n</table></form></body></html>");
        }
Пример #24
0
        private void JsRq(string ballid, string type)
        {
            DataBase base2 = new DataBase(MyFunc.GetConnStr(2));

            string[] textArray = this.UpdateBallMsg(ballid, base2);
            if (textArray != null)
            {
                int    num      = 0;
                int    num2     = 0;
                string iscancel = "0";
                if (type == "18")
                {
                    if ((textArray[15] == "1") || (textArray[0x12] == "1"))
                    {
                        iscancel = "1";
                    }
                    else if (textArray[10].IndexOf(":") > 0)
                    {
                        num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                        num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                    }
                    else
                    {
                        base2.Dispose();
                        return;
                    }
                }
                if (type == "22")
                {
                    if (textArray[15] == "1")
                    {
                        iscancel = "1";
                    }
                    else if (textArray[10].IndexOf(":") > 0)
                    {
                        num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                        num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                    }
                    else
                    {
                        base2.Dispose();
                        return;
                    }
                }
                if (type == "25")
                {
                    if ((textArray[15] == "1") || (textArray[0x12] == "1"))
                    {
                        iscancel = "1";
                    }
                    else if (textArray[10].IndexOf(":") > 0)
                    {
                        num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                        num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                    }
                    else
                    {
                        base2.Dispose();
                        return;
                    }
                }
                DataBase      base3  = new DataBase(MyFunc.GetConnStr(2));
                string        sql    = "SELECT * FROM ball_order WHERE ballid=" + ballid + " AND tztype=" + type + " AND iscancel=0";
                SqlDataReader reader = base2.ExecuteReader(sql);
                while (reader.Read())
                {
                    string text3 = reader["rqteam"].ToString().Trim();
                    double num3  = 0;
                    double num4  = 0;
                    double num5  = 1;
                    double num6  = 0;
                    double num7  = double.Parse(reader["rqc"].ToString().Trim());
                    double num8  = double.Parse(reader["curpl"].ToString().Trim());
                    double num9  = double.Parse(reader["tzmoney"].ToString().Trim());
                    double num10 = double.Parse(reader["hsuser_w"].ToString().Trim());
                    double num11 = double.Parse(reader["hsuser_l"].ToString().Trim());
                    double num12 = double.Parse(reader["hsdls_w"].ToString().Trim());
                    double num13 = double.Parse(reader["hsdls_l"].ToString().Trim());
                    double num14 = double.Parse(reader["hszdl_w"].ToString().Trim());
                    double num15 = double.Parse(reader["hszdl_l"].ToString().Trim());
                    double num16 = double.Parse(reader["hsgd_w"].ToString().Trim());
                    double num17 = double.Parse(reader["hsgd_l"].ToString().Trim());
                    double num18 = 0;
                    double num19 = 0;
                    double num20 = 0;
                    if (iscancel != "1")
                    {
                        if (reader["tzteam"].ToString().Trim().ToUpper() == "H")
                        {
                            if (reader["rqteam"].ToString().Trim().ToUpper() == "H")
                            {
                                num6 = (num - num2) - num7;
                            }
                            else
                            {
                                num6 = (num - num2) + num7;
                            }
                        }
                        else if (reader["rqteam"].ToString().Trim().ToUpper() == "H")
                        {
                            num6 = (num2 - num) + num7;
                        }
                        else
                        {
                            num6 = (num2 - num) - num7;
                        }
                        if (num6 == 0)
                        {
                            num3 = 0;
                            num4 = 0;
                        }
                        if (num6 >= 0.5)
                        {
                            num3 = num8 * num9;
                        }
                        if (num6 == 0.25)
                        {
                            num3 = (num8 * num9) / 2;
                            num5 = 0.5;
                        }
                        if (num6 == -0.25)
                        {
                            num4 = num9 / 2;
                            num5 = 0.5;
                        }
                        if (num6 <= -0.5)
                        {
                            num4 = num9;
                        }
                        if (num3 > 0)
                        {
                            num18 = num3 + (((num9 * num12) / 100) * num5);
                            num19 = num3 + (((num9 * num14) / 100) * num5);
                            num20 = num3 + (((num9 * num16) / 100) * num5);
                            num3 += ((num9 * num10) / 100) * num5;
                        }
                        if (num4 > 0)
                        {
                            num18 = -num4 + (((num9 * num13) / 100) * num5);
                            num19 = -num4 + (((num9 * num15) / 100) * num5);
                            num20 = -num4 + (((num9 * num17) / 100) * num5);
                            num4 -= ((num9 * num11) / 100) * num5;
                        }
                        if ((num3 == 0) && (num4 == 0))
                        {
                            num5 = 0;
                        }
                    }
                    else
                    {
                        num3  = 0;
                        num4  = 0;
                        num5  = 0;
                        num18 = 0;
                        num19 = 0;
                        num20 = 0;
                    }
                    base3.ExecuteNonQuery("UPDATE ball_order SET win=" + num3.ToString() + ",lose=" + num4.ToString() + ",isjs=1,truewin=" + num5.ToString() + ",iscancel=" + iscancel + ",mdls=" + num18.ToString() + ",mzdl=" + num19.ToString() + ",mgd=" + num20.ToString() + " WHERE orderid=" + reader["orderid"].ToString().Trim());
                    this.AddCount(iscancel);
                }
                reader.Close();
                base2.Dispose();
                base3.Dispose();
            }
        }
Пример #25
0
 private void ButtonSave_Click(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), this.Session.Contents["adminclassid"].ToString().Trim(), 1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         string text9  = "";
         string text7  = this.TextBoxZdlID.Text.Trim();
         string input  = this.TextBoxUserName.Text.Trim();
         string text2  = this.TextBoxNewpass1.Text.Trim();
         string text3  = this.TextBoxNewpass2.Text.Trim();
         string text4  = this.TextBoxTrueName.Text.Trim();
         string s      = this.TextBoxUseMoney.Text.Trim();
         string text10 = this.TextBoxMaxMem.Text.Trim();
         string text8  = this.TextBoxTel.Text.Trim().Replace("'", "").Replace(" ", "").Replace("%", "");
         string text6  = this.DropDownListIsUseAble.SelectedValue.Trim();
         if (((input == "") || (text4 == "")) || (((text6 == "") || (s == "")) || (text10 == "")))
         {
             MyFunc.showmsg("请输入总代理帐号,密码,名称,即时注单状态,信用额度,最大会员数");
             base.Response.End();
         }
         else
         {
             Regex regex  = new Regex("[^'*%=\"<>/|]");
             Regex regex2 = new Regex("[^'*%=\"<>/|]");
             if (!regex.IsMatch(input) || !regex2.IsMatch(text4))
             {
                 MyFunc.showmsg("总代理帐号或名称里含有非法字符");
                 base.Response.End();
             }
             else if (text4.Length > 8)
             {
                 MyFunc.showmsg("股东名称不能大于8个字符(4个汉字)");
                 base.Response.End();
             }
             else
             {
                 if ((text2 != "") && (text3 != ""))
                 {
                     if (text2 != text3)
                     {
                         MyFunc.showmsg("输入的密码不相同");
                         return;
                     }
                     text9 = ",userpass='******'";
                 }
                 try
                 {
                     if (int.Parse(s) >= 0)
                     {
                         try
                         {
                             int.Parse(text10);
                         }
                         catch
                         {
                             MyFunc.showmsg("请输入正确的最大会员数");
                             base.Response.End();
                             return;
                         }
                         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
                         int      num2  = (int)base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE userid=" + text7 + " AND gdid=" + this.Session.Contents["adminuserid"].ToString().Trim());
                         if (num2 < 1)
                         {
                             base2.Dispose();
                             MyFunc.showmsg("没有该总代理");
                             base.Response.End();
                         }
                         else
                         {
                             int num3 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(usemoney,0) FROM agence WHERE userid=" + this.Session.Contents["adminuserid"].ToString().Trim()).ToString());
                             int num4 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(usemoney),0) FROM agence WHERE gdid=" + this.Session.Contents["adminuserid"].ToString().Trim() + " and classid = 3").ToString());
                             int num5 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(usemoney,0) FROM agence WHERE userid=" + text7).ToString());
                             if (int.Parse(s) > ((num3 - num4) + num5))
                             {
                                 base2.Dispose();
                                 MyFunc.showmsg("总代理信用额度不能大于股东可用信用额度");
                                 base.Response.End();
                             }
                             else
                             {
                                 int num6 = int.Parse(base2.ExecuteScalar("SELECT maxmem FROM agence WHERE userid=" + this.Session.Contents["adminuserid"].ToString().Trim()).ToString());
                                 if (num6 > 0)
                                 {
                                     int num7 = int.Parse(base2.ExecuteScalar("SELECT COUNT(1) FROM member WHERE zdlid=" + text7).ToString());
                                     if (num7 > int.Parse(text10))
                                     {
                                         base2.Dispose();
                                         MyFunc.showmsg("该总代理已有 " + num7.ToString() + " 个会员,设置的最大会员数最小为 " + num7.ToString());
                                         base.Response.End();
                                         return;
                                     }
                                     num7 = int.Parse(base2.ExecuteScalar("SELECT ISNULL(SUM(maxmem),0) FROM agence WHERE gdid=" + this.Session.Contents["adminuserid"].ToString().Trim() + " AND classid=3 AND userid<>" + text7).ToString());
                                     if ((num7 + int.Parse(text10)) > num6)
                                     {
                                         base2.Dispose();
                                         object[] objArray = new object[] { "股东最大会员数为 ", num6, " ,现在总代理最大会员数最大可设为 ", (num6 - num7).ToString() };
                                         MyFunc.showmsg(string.Concat(objArray));
                                         base.Response.End();
                                         return;
                                     }
                                 }
                                 if (base2.ExecuteNonQuery("UPDATE agence SET truename='" + text4 + "'" + text9 + ",usemoney=" + s + ",isuseable=" + text6 + ",tel='" + text8 + "',maxmem=" + text10 + " WHERE userid=" + text7 + " AND gdid=" + this.Session.Contents["adminuserid"].ToString().Trim()) > 0)
                                 {
                                     base2.Dispose();
                                     MyFunc.JumpPage("修改总代理成功!", "zdllist.aspx");
                                 }
                                 else
                                 {
                                     base2.Dispose();
                                     MyFunc.showmsg("修改总代理失败!");
                                 }
                             }
                         }
                     }
                     else
                     {
                         MyFunc.showmsg("请输入正确的信用额度");
                         base.Response.End();
                     }
                 }
                 catch
                 {
                     MyFunc.showmsg("请输入正确的信用额度");
                     base.Response.End();
                 }
             }
         }
     }
 }
Пример #26
0
        private void JsDs(string ballid, string type)
        {
            DataBase base2 = new DataBase(MyFunc.GetConnStr(2));

            string[] textArray = this.UpdateBallMsg(ballid, base2);
            if (textArray != null)
            {
                int    num      = 0;
                int    num2     = 0;
                string iscancel = "0";
                if (type == "24")
                {
                    if (textArray[15] == "1")
                    {
                        iscancel = "1";
                    }
                    if (textArray[10].IndexOf(":") <= 0)
                    {
                        base2.Dispose();
                        return;
                    }
                    num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                    num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                }
                else if (type == "27")
                {
                    if ((textArray[15] != "1") && (textArray[0x12] != "1"))
                    {
                        if (textArray[10].IndexOf(":") <= 0)
                        {
                            base2.Dispose();
                            return;
                        }
                        num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                        num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                    }
                    else
                    {
                        iscancel = "1";
                    }
                }
                else
                {
                    if (textArray[10].IndexOf(":") > 0)
                    {
                        num  = int.Parse(textArray[10].Split(new char[] { ':' })[0]);
                        num2 = int.Parse(textArray[10].Split(new char[] { ':' })[1]);
                    }
                    else
                    {
                        base2.Dispose();
                        return;
                    }
                    if ((textArray[15] == "1") || (textArray[0x12] == "1"))
                    {
                        iscancel = "1";
                    }
                }
                string        sql    = "SELECT * FROM ball_order WHERE ballid=" + ballid + " AND tztype=" + type + " AND iscancel=0";
                SqlDataReader reader = base2.ExecuteReader(sql);
                DataBase      base3  = new DataBase(MyFunc.GetConnStr(2));
                while (reader.Read())
                {
                    double num3  = 0;
                    double num4  = 0;
                    double num5  = 1;
                    double num6  = num + num2;
                    string text3 = reader["ds"].ToString().Trim();
                    double num7  = double.Parse(reader["curpl"].ToString().Trim());
                    double num8  = double.Parse(reader["tzmoney"].ToString().Trim());
                    double num9  = double.Parse(reader["hsuser_w"].ToString().Trim());
                    double num10 = double.Parse(reader["hsuser_l"].ToString().Trim());
                    double num11 = double.Parse(reader["hsdls_w"].ToString().Trim());
                    double num12 = double.Parse(reader["hsdls_l"].ToString().Trim());
                    double num13 = double.Parse(reader["hszdl_w"].ToString().Trim());
                    double num14 = double.Parse(reader["hszdl_l"].ToString().Trim());
                    double num15 = double.Parse(reader["hsgd_w"].ToString().Trim());
                    double num16 = double.Parse(reader["hsgd_l"].ToString().Trim());
                    double num17 = 0;
                    double num18 = 0;
                    double num19 = 0;
                    if (iscancel != "1")
                    {
                        switch (text3)
                        {
                        case "1":
                            if ((num6 % 2) != 0)
                            {
                                num3 = num7 * num8;
                            }
                            else
                            {
                                num4 = num8;
                            }
                            break;

                        case "2":
                            if ((num6 % 2) == 0)
                            {
                                num3 = num7 * num8;
                            }
                            else
                            {
                                num4 = num8;
                            }
                            break;
                        }
                        if (num3 > 0)
                        {
                            num17 = num3 + (((num8 * num11) / 100) * num5);
                            num18 = num3 + (((num8 * num13) / 100) * num5);
                            num19 = num3 + (((num8 * num15) / 100) * num5);
                            num3 += ((num8 * num9) / 100) * num5;
                        }
                        if (num4 > 0)
                        {
                            num17 = -num4 + (((num8 * num12) / 100) * num5);
                            num18 = -num4 + (((num8 * num14) / 100) * num5);
                            num19 = -num4 + (((num8 * num16) / 100) * num5);
                            num4 -= ((num8 * num10) / 100) * num5;
                        }
                        if ((num3 == 0) && (num4 == 0))
                        {
                            num5 = 0;
                        }
                    }
                    else
                    {
                        num3  = 0;
                        num4  = 0;
                        num5  = 0;
                        num17 = 0;
                        num18 = 0;
                        num19 = 0;
                    }
                    base3.ExecuteNonQuery(string.Concat(new object[] { "UPDATE ball_order SET win=", num3.ToString(), ",lose=", num4.ToString(), ",isjs=1,truewin=", num5.ToString(), ",iscancel=", iscancel, ",mdls=", num17.ToString(), ",mzdl=", num18, ",mgd=", num19.ToString(), " WHERE orderid=", reader["orderid"].ToString().Trim() }));
                    this.AddCount(iscancel);
                }
                reader.Close();
                base2.Dispose();
                base3.Dispose();
            }
        }
Пример #27
0
        private void Deal(string sql, string sumSql)
        {
            int      curpage;
            int      start;
            string   text  = "";
            int      num   = 0;
            double   num2  = 0;
            double   num3  = 0;
            double   num4  = 0;
            DataBase base2 = new DataBase(MyFunc.GetConnStr(2));

            text = "<table border=0 cellspacing=1 cellpadding=0 width=100% class=tableNoBorder1>\n";
            text = text + "<tr class=dlsheader><td width=10%>时间</td><td width=15%>会员 (win/lose)</td><td width=10%>投注方式</td><td width=25%>详情</td><td width=10%>注额</td><td width=10%>成数</td><td width=10%>注额(成数)</td><td width=10%>结果</td></tr>\n";
            int pagesize = 100;

            try
            {
                curpage = int.Parse(this.selectpage.Value);
            }
            catch
            {
                curpage = 1;
            }
            if (curpage < 1)
            {
                curpage = 1;
            }
            int totalrecord = int.Parse(base2.ExecuteScalar(sumSql).ToString());

            if (totalrecord == 0)
            {
                start = 0;
            }
            else
            {
                if (((curpage - 1) * pagesize) >= totalrecord)
                {
                    curpage = 1;
                }
                start = (curpage - 1) * pagesize;
            }
            DataSet set = base2.ExecuteDataSet(sql, start, pagesize, "ball_order");

            for (int i = 0; i < set.Tables[0].Rows.Count; i++)
            {
                num++;
                string text2 = (((text + "<tr bgcolor=white align=right height=22>") + "<td align=center>" + DateTime.Parse(set.Tables[0].Rows[i]["updatetime"].ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss").ToUpper().Replace(" ", "<br>") + "</td>") + "<td align=center nowrap><table border=0 cellspacing=0 cellpadding=0><tr><td><font color=red>" + set.Tables[0].Rows[i]["abc"].ToString() + "</font>&nbsp;</td>") + "<td align=center nowrap>&nbsp;" + set.Tables[0].Rows[i]["username"].ToString() + "&nbsp;</td>";
                text = (((((text2 + "<td nowrap>&nbsp;<font color=red>" + set.Tables[0].Rows[i]["hsuser_w"].ToString() + "</font>/<font color=red>" + set.Tables[0].Rows[i]["hsuser_l"].ToString() + "</font></td></tr></table></td>") + "<td align=center>" + set.Tables[0].Rows[i]["tzTypeName"].ToString() + "</td>") + "<td>" + set.Tables[0].Rows[i]["content"].ToString() + "</td>") + "<td>" + Convert.ToDouble(set.Tables[0].Rows[i]["tzmoney"]).ToString() + "</td>") + "<td>" + Convert.ToDouble(set.Tables[0].Rows[i]["cszdl"]).ToString("F1") + "</td>") + "<td>" + MyFunc.NumBerFormat(set.Tables[0].Rows[i]["csres"].ToString()) + "</td>";
                if (set.Tables[0].Rows[i]["iscancel"].ToString().ToLower() == "true")
                {
                    if (set.Tables[0].Rows[i]["isdanger"].ToString().ToLower() == "2")
                    {
                        text = text + "<td><font color='red'>危险球取消</font></td>";
                    }
                    else
                    {
                        text = text + "<td><font color='red'>取消</font></td>";
                    }
                }
                else
                {
                    text = text + "<td>" + MyFunc.NumBerFormat(set.Tables[0].Rows[i]["result"].ToString()) + "</td>";
                }
                text  = text + "</tr>\n";
                num2 += double.Parse(set.Tables[0].Rows[i]["tzmoney"].ToString());
                num3 += double.Parse(set.Tables[0].Rows[i]["csres"].ToString());
                num4 += double.Parse(set.Tables[0].Rows[i]["result"].ToString());
            }
            set.Clear();
            base2.Dispose();
            this.setselectpageproc(pagesize, totalrecord, curpage);
            text = ((((((text + "<tr align=right height=22 class=reportTotalnum><td colspan=3>&nbsp;</td>") + "<td>" + num.ToString() + "</td>") + "<td>" + num2.ToString() + "</td>") + "<td colspan=3>" + MyFunc.NumBerFormat(num4.ToString()) + "</td></tr>") + "</table>\n" + "<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor=#eeeeee>\n") + "<tr><td width=100% height=12></td></tr>\n</table>\n" + "<table border=0 cellspacing=1 cellpadding=0 class=tableNoBorder1 width=100%>\n") + "<tr class=dlsreport1><td width=30%>总代理</td><td width=10%>笔数</td><td width=18%>投注额</td><td width=18%>注额(成数)</td><td width=18%>结果</td></tr>\n" + "<tr class=reportTotalnum align=right height=22>";
            if ((this.Session.Contents["adminsubid"] != null) && (this.Session.Contents["adminsubid"].ToString() != ""))
            {
                text = text + "<td>" + this.Session.Contents["adminsubname"].ToString() + "</td>";
            }
            else
            {
                text = text + "<td>" + this.Session.Contents["adminusername"].ToString() + "</td>";
            }
            text = (((text + "<td>" + num.ToString() + "</td>") + "<td>" + num2.ToString() + "</td>") + "<td>" + num3.ToString() + "</td>") + "<td>" + MyFunc.NumBerFormat(num4.ToString()) + "</td></tr></table>";
            this.tableCredit.Rows[0].Cells[0].InnerHtml = text;
        }
Пример #28
0
 private void UpdateOrder1(string type, string ballid, string bf, string iscancel)
 {
     if (iscancel == "1")
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         base2.ExecuteNonQuery("UPDATE ball_order1 SET winpl=1 WHERE ballid=" + ballid + " AND tztype=" + type);
         base2.Dispose();
     }
     else if (bf.IndexOf(":") >= 0)
     {
         int      num   = int.Parse(bf.Split(new char[] { ':' })[0]);
         int      num2  = int.Parse(bf.Split(new char[] { ':' })[1]);
         DataBase base3 = new DataBase(MyFunc.GetConnStr(2));
         if (type == "21")
         {
             string   text       = "";
             string   text2      = "";
             string   text3      = text;
             string[] textArray  = new string[] { text3, "UPDATE ball_order1 SET winpl=1,fen1=", num.ToString(), ",fen2=", num2.ToString(), " WHERE ballid=", ballid, " AND tztype=21 AND tzteam='1' AND rqteam='H' AND rq=", (num - num2).ToString(), ";" };
             string   text4      = string.Concat(textArray);
             string[] textArray2 = new string[10];
             textArray2[0] = text4;
             textArray2[1] = "UPDATE ball_order1 SET winpl=pl,fen1=";
             textArray2[2] = num.ToString();
             textArray2[3] = ",fen2=";
             textArray2[4] = num2.ToString();
             textArray2[5] = " WHERE ballid=";
             textArray2[6] = ballid;
             textArray2[7] = " AND tztype=21 AND tzteam='1' AND rqteam='H' AND rq<=";
             textArray2[8] = ((num - num2) - 0.5).ToString();
             textArray2[9] = ";";
             string   text5      = string.Concat(textArray2);
             string[] textArray3 = new string[10];
             textArray3[0] = text5;
             textArray3[1] = "UPDATE ball_order1 SET winpl=(pl-1)/2+1,fen1=";
             textArray3[2] = num.ToString();
             textArray3[3] = ",fen2=";
             textArray3[4] = num2.ToString();
             textArray3[5] = " WHERE ballid=";
             textArray3[6] = ballid;
             textArray3[7] = " AND tztype=21 AND tzteam='1' AND rqteam='H' AND rq=";
             textArray3[8] = ((num - num2) - 0.25).ToString();
             textArray3[9] = ";";
             string   text6      = string.Concat(textArray3);
             string[] textArray4 = new string[10];
             textArray4[0] = text6;
             textArray4[1] = "UPDATE ball_order1 SET winpl=0.5,fen1=";
             textArray4[2] = num.ToString();
             textArray4[3] = ",fen2=";
             textArray4[4] = num2.ToString();
             textArray4[5] = " WHERE ballid=";
             textArray4[6] = ballid;
             textArray4[7] = " AND tztype=21 AND tzteam='1' AND rqteam='H' AND rq=";
             textArray4[8] = ((num - num2) + 0.25).ToString();
             textArray4[9] = ";";
             string   text7      = string.Concat(textArray4);
             string[] textArray5 = new string[10];
             textArray5[0] = text7;
             textArray5[1] = "UPDATE ball_order1 SET winpl=0,fen1=";
             textArray5[2] = num.ToString();
             textArray5[3] = ",fen2=";
             textArray5[4] = num2.ToString();
             textArray5[5] = " WHERE ballid=";
             textArray5[6] = ballid;
             textArray5[7] = " AND tztype=21 AND tzteam='1' AND rqteam='H' AND rq>=";
             textArray5[8] = ((num - num2) + 0.5).ToString();
             textArray5[9] = ";";
             string   text8      = string.Concat(textArray5);
             string[] textArray6 = new string[10];
             textArray6[0] = text8;
             textArray6[1] = "UPDATE ball_order1 SET winpl=1,fen1=";
             textArray6[2] = num.ToString();
             textArray6[3] = ",fen2=";
             textArray6[4] = num2.ToString();
             textArray6[5] = " WHERE ballid=";
             textArray6[6] = ballid;
             textArray6[7] = " AND tztype=21 AND tzteam='2' AND rqteam='H' AND rq=";
             textArray6[8] = (num - num2).ToString();
             textArray6[9] = ";";
             string   text9      = string.Concat(textArray6);
             string[] textArray7 = new string[10];
             textArray7[0] = text9;
             textArray7[1] = "UPDATE ball_order1 SET winpl=pl,fen1=";
             textArray7[2] = num.ToString();
             textArray7[3] = ",fen2=";
             textArray7[4] = num2.ToString();
             textArray7[5] = " WHERE ballid=";
             textArray7[6] = ballid;
             textArray7[7] = " AND tztype=21 AND tzteam='2' AND rqteam='H' AND rq>=";
             textArray7[8] = ((num - num2) + 0.5).ToString();
             textArray7[9] = ";";
             string   text10     = string.Concat(textArray7);
             string[] textArray8 = new string[10];
             textArray8[0] = text10;
             textArray8[1] = "UPDATE ball_order1 SET winpl=(pl-1)/2+1,fen1=";
             textArray8[2] = num.ToString();
             textArray8[3] = ",fen2=";
             textArray8[4] = num2.ToString();
             textArray8[5] = " WHERE ballid=";
             textArray8[6] = ballid;
             textArray8[7] = " AND tztype=21 AND tzteam='2' AND rqteam='H' AND rq=";
             textArray8[8] = ((num - num2) + 0.25).ToString();
             textArray8[9] = ";";
             string   text11     = string.Concat(textArray8);
             string[] textArray9 = new string[10];
             textArray9[0] = text11;
             textArray9[1] = "UPDATE ball_order1 SET winpl=0.5,fen1=";
             textArray9[2] = num.ToString();
             textArray9[3] = ",fen2=";
             textArray9[4] = num2.ToString();
             textArray9[5] = " WHERE ballid=";
             textArray9[6] = ballid;
             textArray9[7] = " AND tztype=21 AND tzteam='2' AND rqteam='H' AND rq=";
             textArray9[8] = ((num - num2) - 0.25).ToString();
             textArray9[9] = ";";
             string   text12      = string.Concat(textArray9);
             string[] textArray10 = new string[10];
             textArray10[0] = text12;
             textArray10[1] = "UPDATE ball_order1 SET winpl=0,fen1=";
             textArray10[2] = num.ToString();
             textArray10[3] = ",fen2=";
             textArray10[4] = num2.ToString();
             textArray10[5] = " WHERE ballid=";
             textArray10[6] = ballid;
             textArray10[7] = " AND tztype=21 AND tzteam='2' AND rqteam='H' AND rq<=";
             textArray10[8] = ((num - num2) - 0.5).ToString();
             textArray10[9] = ";";
             text           = string.Concat(textArray10);
             string   text13      = text2;
             string[] textArray11 = new string[10];
             textArray11[0] = text13;
             textArray11[1] = "UPDATE ball_order1 SET winpl=1,fen1=";
             textArray11[2] = num.ToString();
             textArray11[3] = ",fen2=";
             textArray11[4] = num2.ToString();
             textArray11[5] = " WHERE ballid=";
             textArray11[6] = ballid;
             textArray11[7] = " AND tztype=21 AND tzteam='1' AND rqteam='C' AND rq=";
             textArray11[8] = (num2 - num).ToString();
             textArray11[9] = ";";
             string   text14      = string.Concat(textArray11);
             string[] textArray12 = new string[10];
             textArray12[0] = text14;
             textArray12[1] = "UPDATE ball_order1 SET winpl=pl,fen1=";
             textArray12[2] = num.ToString();
             textArray12[3] = ",fen2=";
             textArray12[4] = num2.ToString();
             textArray12[5] = " WHERE ballid=";
             textArray12[6] = ballid;
             textArray12[7] = " AND tztype=21 AND tzteam='1' AND rqteam='C' AND rq>=";
             textArray12[8] = ((num2 - num) + 0.5).ToString();
             textArray12[9] = ";";
             string   text15      = string.Concat(textArray12);
             string[] textArray13 = new string[10];
             textArray13[0] = text15;
             textArray13[1] = "UPDATE ball_order1 SET winpl=(pl-1)/2+1,fen1=";
             textArray13[2] = num.ToString();
             textArray13[3] = ",fen2=";
             textArray13[4] = num2.ToString();
             textArray13[5] = " WHERE ballid=";
             textArray13[6] = ballid;
             textArray13[7] = " AND tztype=21 AND tzteam='1' AND rqteam='C' AND rq=";
             textArray13[8] = ((num2 - num) + 0.25).ToString();
             textArray13[9] = ";";
             string   text16      = string.Concat(textArray13);
             string[] textArray14 = new string[10];
             textArray14[0] = text16;
             textArray14[1] = "UPDATE ball_order1 SET winpl=0.5,fen1=";
             textArray14[2] = num.ToString();
             textArray14[3] = ",fen2=";
             textArray14[4] = num2.ToString();
             textArray14[5] = " WHERE ballid=";
             textArray14[6] = ballid;
             textArray14[7] = " AND tztype=21 AND tzteam='1' AND rqteam='C' AND rq=";
             textArray14[8] = ((num2 - num) - 0.25).ToString();
             textArray14[9] = ";";
             string   text17      = string.Concat(textArray14);
             string[] textArray15 = new string[10];
             textArray15[0] = text17;
             textArray15[1] = "UPDATE ball_order1 SET winpl=0,fen1=";
             textArray15[2] = num.ToString();
             textArray15[3] = ",fen2=";
             textArray15[4] = num2.ToString();
             textArray15[5] = " WHERE ballid=";
             textArray15[6] = ballid;
             textArray15[7] = " AND tztype=21 AND tzteam='1' AND rqteam='C' AND rq<=";
             textArray15[8] = ((num2 - num) - 0.5).ToString();
             textArray15[9] = ";";
             string   text18      = string.Concat(textArray15);
             string[] textArray16 = new string[10];
             textArray16[0] = text18;
             textArray16[1] = "UPDATE ball_order1 SET winpl=1,fen1=";
             textArray16[2] = num.ToString();
             textArray16[3] = ",fen2=";
             textArray16[4] = num2.ToString();
             textArray16[5] = " WHERE ballid=";
             textArray16[6] = ballid;
             textArray16[7] = " AND tztype=21 AND tzteam='2' AND rqteam='C' AND rq=";
             textArray16[8] = (num2 - num).ToString();
             textArray16[9] = ";";
             string   text19      = string.Concat(textArray16);
             string[] textArray17 = new string[10];
             textArray17[0] = text19;
             textArray17[1] = "UPDATE ball_order1 SET winpl=pl,fen1=";
             textArray17[2] = num.ToString();
             textArray17[3] = ",fen2=";
             textArray17[4] = num2.ToString();
             textArray17[5] = " WHERE ballid=";
             textArray17[6] = ballid;
             textArray17[7] = " AND tztype=21 AND tzteam='2' AND rqteam='C' AND rq<=";
             textArray17[8] = ((num2 - num) - 0.5).ToString();
             textArray17[9] = ";";
             string   text20      = string.Concat(textArray17);
             string[] textArray18 = new string[10];
             textArray18[0] = text20;
             textArray18[1] = "UPDATE ball_order1 SET winpl=(pl-1)/2+1,fen1=";
             textArray18[2] = num.ToString();
             textArray18[3] = ",fen2=";
             textArray18[4] = num2.ToString();
             textArray18[5] = " WHERE ballid=";
             textArray18[6] = ballid;
             textArray18[7] = " AND tztype=21 AND tzteam='2' AND rqteam='C' AND rq=";
             textArray18[8] = ((num2 - num) - 0.25).ToString();
             textArray18[9] = ";";
             string   text21      = string.Concat(textArray18);
             string[] textArray19 = new string[10];
             textArray19[0] = text21;
             textArray19[1] = "UPDATE ball_order1 SET winpl=0.5,fen1=";
             textArray19[2] = num.ToString();
             textArray19[3] = ",fen2=";
             textArray19[4] = num2.ToString();
             textArray19[5] = " WHERE ballid=";
             textArray19[6] = ballid;
             textArray19[7] = " AND tztype=21 AND tzteam='2' AND rqteam='C' AND rq=";
             textArray19[8] = ((num2 - num) + 0.25).ToString();
             textArray19[9] = ";";
             string   text22      = string.Concat(textArray19);
             string[] textArray20 = new string[10];
             textArray20[0] = text22;
             textArray20[1] = "UPDATE ball_order1 SET winpl=0,fen1=";
             textArray20[2] = num.ToString();
             textArray20[3] = ",fen2=";
             textArray20[4] = num2.ToString();
             textArray20[5] = " WHERE ballid=";
             textArray20[6] = ballid;
             textArray20[7] = " AND tztype=21 AND tzteam='2' AND rqteam='C' AND rq>=";
             textArray20[8] = ((num2 - num) + 0.5).ToString();
             textArray20[9] = ";";
             base3.ExecuteNonQuery(text + string.Concat(textArray20));
             base3.Dispose();
         }
     }
 }
Пример #29
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (base.Request.QueryString["username"].Trim() == "")
     {
         MyFunc.showmsg("出错了!");
         base.Response.End();
     }
     else
     {
         int curPage;
         int pagesize = 10;
         try
         {
             curPage = int.Parse(base.Request.QueryString["page"].ToString());
         }
         catch
         {
             curPage = 1;
         }
         if (curPage < 1)
         {
             curPage = 1;
         }
         if (!base.IsPostBack)
         {
             int start;
             this.UserEventTable.Rows[0].Cells[0].InnerHtml = "<font color=red>" + base.Request.QueryString["username"].Trim() + "</font>的登陆日志";
             string   sql         = "SELECT * FROM event WHERE username='******' ORDER BY id DESC";
             DataBase base2       = new DataBase(MyFunc.GetConnStr(2));
             int      totalRecord = int.Parse(base2.ExecuteScalar("SELECT COUNT(*) FROM event WHERE username='******'").ToString());
             if (totalRecord == 0)
             {
                 start = 0;
             }
             else
             {
                 start = (curPage - 1) * pagesize;
             }
             DataSet set   = base2.ExecuteDataSet(sql, start, pagesize, "event");
             string  text2 = "<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#999999'><tr class=blueheader><td width='22%'>来源IP</td><td width='28%'>登陆时间</td><td width='30%'>离开时间</td><td width='20%'>停留时间</td></tr>";
             for (int i = 0; i < set.Tables[0].Rows.Count; i++)
             {
                 string text3 = text2;
                 text2 = text3 + "<tr bgcolor='#FFFFFF'><td>" + set.Tables[0].Rows[i]["ip"].ToString().Trim() + "</td><td>" + set.Tables[0].Rows[i]["logintime"].ToString().Trim() + "</td><td>";
                 if (set.Tables[0].Rows[i]["lefttime"].ToString().Trim() == "")
                 {
                     text2 = text2 + "未知</td><td>未知</td></tr>";
                 }
                 else
                 {
                     TimeSpan span  = (TimeSpan)(DateTime.Parse(set.Tables[0].Rows[i]["lefttime"].ToString().Trim()) - DateTime.Parse(set.Tables[0].Rows[i]["logintime"].ToString().Trim()));
                     string   text4 = text2;
                     text2 = text4 + set.Tables[0].Rows[i]["lefttime"].ToString().Trim() + "</td><td>" + span.TotalMinutes.ToString("F") + "&nbsp;分钟</td></tr>";
                 }
             }
             base2.Dispose();
             text2 = text2 + "</table>";
             this.UserEventTable.Rows[1].Cells[0].InnerHtml = text2;
             this.UserEventTable.Rows[2].Cells[0].InnerHtml = MyFunc.MulitPager(totalRecord, pagesize, curPage, "MgrOnlineMsg.aspx?username="******"username"].Trim());
             this.DataBind();
         }
     }
 }
Пример #30
0
        private void Page_Load(object sender, EventArgs e)
        {
            DataBase base2;

            MyFunc.isRefUrl();
            if (!base.IsPostBack)
            {
                base2 = new DataBase(MyFunc.GetConnStr(1));
                try
                {
                    if (base.Request.Form["autoID"].ToString().Trim() == "")
                    {
                        goto Label_00FB;
                    }
                    if (base.Request.Form["pl"].ToString().Trim() != "")
                    {
                        base2.ExecuteNonQuery("UPDATE pl SET pl = '" + base.Request.Form["pl"].ToString().Trim() + "' WHERE ID = '" + base.Request.Form["autoID"].ToString().Trim() + "'");
                        goto Label_00FB;
                    }
                    MyFunc.showmsg("请输入陪率!");
                }
                catch
                {
                }
            }
            return;

Label_00FB:
            try
            {
                if (base.Request.Form["autoID1"].ToString().Trim() == "")
                {
                    goto Label_01DA;
                }
                if (base.Request.Form["pl"].ToString().Trim() != "")
                {
                    base2.ExecuteNonQuery("UPDATE pl SET pl = '" + base.Request.Form["pl"].ToString().Trim() + "' WHERE tztype in ( " + base.Request.Form["autoID1"].ToString().Trim() + ")");
                    goto Label_01DA;
                }
                MyFunc.showmsg("请输入陪率!");
            }
            catch
            {
            }
            return;

Label_01DA:
            base2.Dispose();
            this.type = base.Request.QueryString["type"].ToString();
            if (this.type == "8")
            {
                this.TxtOdds.Visible     = true;
                this.BtnSingle.Visible   = true;
                this.BtnTwin.Visible     = true;
                this.BtnOver.Visible     = true;
                this.BtnUnder.Visible    = true;
                this.BtnRed.Visible      = true;
                this.BtnGreen.Visible    = true;
                this.BtnBlue.Visible     = true;
                this.BtnHeDang.Visible   = true;
                this.BtnHeShuang.Visible = true;
                this.btnSub.Visible      = true;
                this.btnAdd.Visible      = true;
            }
            this.kyglContent = this.MatchList(this.type);
            this.DataBind();
        }