Exemplo n.º 1
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,content,qishu,kaisai,isclose FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         if (reader.Read())
         {
             this.msg     = this.msg + MyFunc.ConvertStr(reader["content"].ToString().Trim());
             this.qishu   = reader["qishu"].ToString().Trim();
             this.kaisai  = reader["kaisai"].ToString().Trim();
             this.isclose = reader["isclose"].ToString();
         }
         reader.Close();
         base2.Dispose();
         this.AHHTContent();
         this.DataBind();
     }
 }
Exemplo n.º 2
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if ((!base.IsPostBack && (base.Request.QueryString["userid"] != null)) && (base.Request.QueryString["userid"].ToString().Trim() != ""))
     {
         string        text   = base.Request.QueryString["userid"].ToString().Trim().Replace(" ", "").Replace("'", "");
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT * FROM PLUSER WHERE userid=" + text);
         if (reader.Read())
         {
             this.TextBoxUserName.Text  = reader["username"].ToString().Trim();
             this.TextBoxUserPass1.Text = "";
             this.TextBoxUserPass2.Text = "";
             this.TextBoxUserid.Text    = reader["userid"].ToString().Trim();
             this.TextBoxTrueName.Text  = reader["truename"].ToString().Trim();
             this.DropDownListIsuseable.SelectedValue = (reader["isuseable"].ToString().Trim().ToUpper() == "TRUE") ? "1" : "0";
             reader.Close();
             base2.Dispose();
         }
         else
         {
             reader.Close();
             base2.Dispose();
             MyFunc.showmsg("没有该用户");
             base.Response.End();
         }
     }
 }
Exemplo n.º 3
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)
     {
         int      num   = 0;
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         this.DropDownListGd.Items.Clear();
         this.DropDownListGd.Items.Add(new ListItem("请选择", "00"));
         SqlDataReader reader = base2.ExecuteReader("SELECT userid,username FROM agence WHERE classid=2");
         while (reader.Read())
         {
             num++;
             this.DropDownListGd.Items.Add(new ListItem(reader["username"].ToString().Trim(), reader["userid"].ToString().Trim()));
         }
         reader.Close();
         this.DropDownListGd.SelectedIndex = 0;
         base2.Dispose();
         if (num == 0)
         {
             MyFunc.showmsg("还没有股东,请先添加股东!");
             base.Response.End();
         }
     }
 }
Exemplo n.º 4
0
 private void Page_Load(object sender, EventArgs e)
 {
     this.startTime = DateTime.Now;
     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["action"].ToString().Trim() != ""))
         {
             string ballid = base.Request.QueryString["ballid"].ToString().Trim().Replace(" ", "").Replace("'", "").Replace("%", "");
             if (base.Request.QueryString["action"].ToString().Trim() == "stop")
             {
                 this.StopGame(ballid);
             }
             else if (base.Request.QueryString["action"].ToString().Trim() == "open")
             {
                 this.OpenGame(ballid);
             }
         }
         string sql = "SELECT Ball_PL1.ballid,Ball_PL1.balltime,Ball_PL1.matchname,Ball_PL1.matchcolor,Ball_PL1.team1,Ball_PL1.team2, Ball_PL1.homeway,Ball_PL1.isautoshow,Ball_PL1.iszd,";
         sql = sql + "Ball_PL1.iscurzd,Ball_PL1.iszdclose,Ball_PL1.iszddt,Ball_BF.isshow,Ball_BF.isclose,Ball_BF.iscancel FROM Ball_BF RIGHT OUTER JOIN Ball_PL1 ON Ball_BF.ballid = Ball_PL1.ballid WHERE (Ball_PL1.isautoshow = 1)";
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader(sql);
         while (reader.Read())
         {
             string kyglContent = this.kyglContent;
             this.kyglContent = kyglContent + "<tr bgcolor=\"#FFFFFF\"><td>" + reader["balltime"].ToString().Trim() + "</td><td><span style=\"background-color:" + reader["matchcolor"].ToString().Trim() + "; color: '#ffffff';\">" + reader["matchname"].ToString().Trim() + "</font></td><td>" + reader["team1"].ToString().Trim() + "&nbsp;<font color=red>" + reader["homeway"].ToString().Trim() + "</font><br>" + reader["team2"].ToString().Trim() + "</td><td>";
             if (reader["iscurzd"].ToString().Trim().ToUpper() == "TRUE")
             {
                 this.kyglContent = this.kyglContent + "当前走地";
             }
             else if (reader["iszd"].ToString().Trim().ToUpper() == "TRUE")
             {
                 this.kyglContent = this.kyglContent + "走地";
             }
             else
             {
                 this.kyglContent = this.kyglContent + "&nbsp;";
             }
             this.kyglContent = this.kyglContent + "</td><td>";
             if (reader["isshow"].ToString().Trim().ToUpper() == "TRUE")
             {
                 this.kyglContent = this.kyglContent + "收单";
             }
             else
             {
                 this.kyglContent = this.kyglContent + "停止";
             }
             string text4 = this.kyglContent;
             this.kyglContent = text4 + "</td><td><a href=mgrgame.aspx?action=stop&ballid=" + reader["ballid"].ToString().Trim() + ">停押</a> / <a href=mgrgame.aspx?action=open&ballid=" + reader["ballid"].ToString().Trim() + ">启用</a></td></tr>";
         }
         reader.Close();
         base2.Dispose();
         this.DataBind();
     }
 }
Exemplo n.º 5
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
     {
         string table = "";
         string url   = "";
         if ((base.Request.Form["action"] != null) && (base.Request.Form["action"].ToString().Trim() != ""))
         {
             this.kygl = base.Request.Form["action"].ToString().Trim();
             if (base.Request.Form["fr_league"] != null)
             {
                 this.SetSessionLeague(base.Request.Form["action"].ToString().Trim(), base.Request.Form["fr_league"].ToString().Trim());
                 url = this.GetUrl((base.Request.Form["action"].ToString().Trim() == "") ? "AH" : base.Request.Form["action"].ToString().Trim());
                 base.Response.Redirect(url);
             }
         }
         if ((base.Request.QueryString["kygl"] != null) && (base.Request.QueryString["kygl"].ToString().Trim() != ""))
         {
             this.kygl = base.Request.QueryString["kygl"].ToString().Trim().ToUpper();
             table     = this.GetTableName(this.kygl);
             this.MainTable.Rows[1].Cells[0].InnerHtml = this.GetLeague(table, this.kygl);
             this.DataBind();
         }
     }
 }
Exemplo n.º 6
0
 private void Page_Load(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
     }
     else if (!base.IsPostBack)
     {
         string text;
         string text2;
         if (((base.Request.QueryString["date_start"] != null) && (base.Request.QueryString["date_start"].ToString().Trim() != "")) && ((base.Request.QueryString["date_end"] != null) && (base.Request.QueryString["date_end"].ToString().Trim() != "")))
         {
             text  = base.Request.QueryString["date_start"].ToString().Trim();
             text2 = base.Request.QueryString["date_end"].ToString().Trim();
         }
         else
         {
             text  = DateTime.Now.ToShortDateString();
             text2 = DateTime.Now.ToShortDateString();
         }
         DataSet set = new DataBase(MyFunc.GetConnStr(2)).ExecuteDataSet("SELECT ballid,matchname,team1,team2,sortballtime FROM ball_bf WHERE sortballtime between '" + text + " 00:00:00' and '" + text2 + " 23:59:59' ORDER BY sortballtime");
         this.DataGrid1.DataSource = set;
         this.DataGrid1.DataBind();
         for (int i = 0; i < set.Tables[0].Rows.Count; i++)
         {
             ((CheckBox)this.DataGrid1.Items[i].FindControl("cbxStatus")).Attributes["OnClick"] = "AddToList(this,'" + set.Tables[0].Rows[i]["ballid"].ToString().Trim() + "');";
         }
     }
 }
Exemplo n.º 7
0
 private void UpdateAllBallMsg()
 {
     if (!MyFunc.CheckUserLogin(0) || ((this.Session.Contents["classid"].ToString().Trim() != "1") && (this.Session.Contents["classid"].ToString().Trim() != "2")))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         string text3 = base.Request.Form["maxc1"].ToString().Trim();
         string text4 = base.Request.Form["maxc2"].ToString().Trim();
         string text2 = base.Request.Form["plvalue"].ToString().Trim();
         string sql   = "SELECT bk.ballid,bk.balltime,bk.matchname,bk.team1,bk.team2,bk.homeway,bk.isautoshow,bf.isshow,bf.isclose,bf.iscancel,bf.isauto,bf.serverlist,bf.maxc1,bf.maxc2 ";
         sql = sql + "FROM Ball_BF as bf RIGHT OUTER JOIN BK_Ball_PL1 as bk ON bf.ballid = bk.ballid WHERE bf.isbk = 1 AND " + text2 + " = convert(numeric(6,3),bk.giveup1) + convert(numeric(6,3),bk.giveup2) and bk.isautoshow = 1 AND DATEDIFF(d,bf.sortballtime,getdate()) = 0 ORDER BY bf.sortballtime";
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         DataBase      base3  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader(sql);
         while (reader.Read())
         {
             string text = reader["ballid"].ToString().Trim();
             base3.ExecuteNonQuery("UPDATE ball_bf SET maxc1=" + text3 + ",maxc2=" + text4 + " WHERE isbk = 1 AND ballid=" + text);
         }
         base2.Dispose();
         base3.Dispose();
         base.Response.Redirect("basketballlist.aspx");
     }
 }
Exemplo n.º 8
0
 private void del_Click(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "1", 1))
     {
         MyFunc.goToLoginPage("../");
         base.Response.End();
     }
     else if (this.username.Text.Trim() == "")
     {
         MyFunc.showmsg("请输入要删除的用户帐号!");
         base.Response.End();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         if (this.selects.SelectedItem.Value == "1")
         {
             string userId = this.GetUserId(this.username.Text.Trim());
             string dlsId  = this.GetDlsId(this.username.Text.Trim());
             base2.ExecuteNonQuery("delete userhs where userid = '" + userId + "'");
             base2.ExecuteNonQuery("delete ball_order where username = '******'");
             base2.ExecuteNonQuery("delete member where username = '******'");
             base2.ExecuteNonQuery("update agence set memcount = memcount-1 where userid = '" + dlsId + "'");
             base.Response.Write("<script>alert('成功删除会员" + this.username.Text + "和该会员的注单');</script>");
         }
         else if (this.selects.SelectedItem.Value == "2")
         {
             int num = 0;
             num = base2.ExecuteNonQuery("delete ball_order where username = '******' and updatetime between '" + this.starTime.Text.Trim() + "' and '" + this.endTime.Text.Trim() + "'");
             base.Response.Write("<script>alert('共删除会员" + this.username.Text + "的" + num.ToString() + "个注单');</script>");
         }
         base2.CloseConnect();
         base2.Dispose();
     }
 }
Exemplo n.º 9
0
 private void UpdateBf(string ballid, string btype, string fen1, string fen2)
 {
     if (!MyFunc.CheckUserLogin(0) || ((this.Session.Contents["classid"].ToString().Trim() != "1") && (this.Session.Contents["classid"].ToString().Trim() != "2")))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT fen1,fen2 FROM ball_bf WHERE ballid=" + ballid);
         string        sql    = "";
         if (reader.Read())
         {
             if (btype == "2")
             {
                 reader.Close();
                 sql = "UPDATE ball_bf SET fen2='" + fen1 + ":" + fen2 + "' WHERE ballid  = " + ballid + "  AND isBK = 1";
                 base2.ExecuteNonQuery(sql);
                 base2.Dispose();
             }
         }
         else
         {
             reader.Close();
             base2.Dispose();
         }
     }
 }
Exemplo n.º 10
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if ((!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1)) || !MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "1", 1))
     {
         MyFunc.goToLoginPage();
     }
     else if (!base.IsPostBack)
     {
         if ((base.Request.QueryString["ballid"] != null) && (base.Request.QueryString["ballid"].ToString().Trim() != ""))
         {
             this.kyglBallid = base.Request.QueryString["ballid"].ToString().Trim();
             if ((base.Request.QueryString["jstype"] != null) && (base.Request.QueryString["jstype"].ToString().Trim() != ""))
             {
                 this.kyglJstype = base.Request.QueryString["jstype"].ToString().Trim();
             }
             if ((base.Request.QueryString["thisdate"] != null) && (base.Request.QueryString["thisdate"].ToString().Trim() != ""))
             {
                 this.kyglThisdate = base.Request.QueryString["thisdate"].ToString().Trim();
             }
             this.DataBind();
         }
         else
         {
             MyFunc.showmsg("请选择要结算的球赛");
             base.Response.End();
         }
     }
 }
Exemplo n.º 11
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["takeOut"] != "") && (base.Request.QueryString["takeOut"] != null))
         {
             MyTeam.OnlineList.OnlineList.DelUser(base.Request.QueryString["takeOut"]);
         }
         if (!base.IsPostBack)
         {
             if ((base.Request.QueryString["kygl"] != null) && (base.Request.QueryString["kygl"].ToString().Trim() != ""))
             {
                 this.DropDownListShowType.SelectedValue = base.Request.QueryString["kygl"].ToString().Trim();
             }
             this.kyglClass = this.DropDownListShowType.SelectedValue;
             string[][] onlineLists = MyTeam.OnlineList.OnlineList.GetOnlineList();
             this.OnlineListTable.Rows[1].Cells[0].InnerHtml = this.printOnlineUserTable(onlineLists, "", this.DropDownListShowType.SelectedValue, "");
             this.DropDownListShowType.AutoPostBack          = true;
             this.OnlineListTable.Rows[2].Cells[0].InnerHtml = "<font color=red><div align=left>共有" + MyTeam.OnlineList.OnlineList.CountUser().ToString() + "人在线</div></font>";
             this.DataBind();
         }
     }
 }
Exemplo n.º 12
0
 private void BfUserMod(string userid, int flag)
 {
     if (!MyFunc.CheckUserLogin(0) || ((this.Session.Contents["classid"].ToString().Trim() != "1") && (this.Session.Contents["classid"].ToString().Trim() != "2")))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!MyFunc.CheckUserLogin(0) || ((this.Session.Contents["classid"].ToString().Trim() != "1") && (this.Session.Contents["classid"].ToString().Trim() != "2")))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         if (flag == 1)
         {
             base2.ExecuteNonQuery("UPDATE Pluser SET isuseable=1 WHERE userid=" + userid + " and classid=3");
         }
         else
         {
             base2.ExecuteNonQuery("UPDATE Pluser SET isuseable=0 WHERE userid=" + userid + " and classid=3");
         }
         base2.Dispose();
     }
 }
Exemplo n.º 13
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)
     {
         if (base.Request.QueryString["search"] != null)
         {
             if (base.Request["search"].ToString() != "")
             {
                 this.GetValue();
                 this.PrintBarTitle();
                 this.SetShowPage();
             }
         }
         else
         {
             base.Response.Write("查询页面出错,请检测你的查询条件!");
             base.Response.End();
         }
     }
 }
Exemplo n.º 14
0
 private void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         MyFunc.isRefUrl();
         if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
         {
             MyFunc.goToLoginPage();
         }
         else if ((base.Request.QueryString["id"] != null) && (base.Request.QueryString["id"].ToString().Trim() != ""))
         {
             this.TextBoxBorder(true);
             DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
             SqlDataReader reader = base2.ExecuteReader("SELECT userid,username,userpass,truename,usemoney,maxmem FROM agence WHERE userid=" + base.Request.QueryString["id"].ToString().Trim());
             if (reader.Read())
             {
                 this.TextBoxGsID.Text     = reader["userid"].ToString().Trim();
                 this.pubshowpass          = reader["userpass"].ToString().Trim();
                 this.TextBoxUserName.Text = reader["username"].ToString().Trim();
                 this.TextBoxTrueName.Text = reader["truename"].ToString().Trim();
                 this.TextBoxUseMoney.Text = reader["usemoney"].ToString().Trim();
                 this.TextBoxMaxMem.Text   = reader["maxmem"].ToString().Trim();
                 reader.Close();
                 base2.Dispose();
             }
             else
             {
                 reader.Close();
                 base2.Dispose();
                 MyFunc.showmsg("没有该公司! ");
             }
         }
     }
 }
Exemplo n.º 15
0
 public void DelDls(string id, string zdlid)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), this.Session.Contents["adminclassid"].ToString().Trim(), 1))
     {
         MyFunc.goToLoginPage();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         int      num   = (int)base2.ExecuteScalar("SELECT COUNT(*) FROM member WHERE dlsid=" + id);
         if (num > 0)
         {
             base2.Dispose();
             MyFunc.showmsg("该代理商下还有会员,不能删除该代理商");
             base.Response.End();
         }
         else if (base2.ExecuteNonQuery("DELETE FROM agence WHERE userid=" + id + " AND classid=4") > 0)
         {
             base2.ExecuteNonQuery("UPDATE agence SET memcount=memcount-1 WHERE userid=" + zdlid);
             base2.Dispose();
             MyFunc.JumpPage("删除该代理商成功", "dlslist.aspx");
             base.Response.End();
         }
         else
         {
             base2.Dispose();
             MyFunc.showmsg("删除代理商失败");
             base.Response.End();
         }
     }
 }
Exemplo n.º 16
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 (!this.Page.IsPostBack)
     {
         this.setstartdatagrid();
     }
     else if (base.Request.Form["submitflag"].ToString() != "")
     {
         if (this.subid.Value != "")
         {
             this.editdeal();
         }
         else
         {
             this.adddeal();
         }
         this.submitflag.Value = "";
         this.subid.Value      = "";
         this.editsubdiv.Style.Add("DISPLAY", "none");
         this.setstartdatagrid();
     }
 }
Exemplo n.º 17
0
 private void Page_Load(object sender, EventArgs e)
 {
     if ((this.Session.Contents["adminsubid"] != null) && (this.Session.Contents["adminsubid"].ToString() != ""))
     {
         if (!MyFunc.CheckUserLogin(2) || !MyTeam.OnlineList.OnlineList.isUserLogin(2))
         {
             MyFunc.goToLoginPage();
             base.Response.End();
             return;
         }
     }
     else if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
         return;
     }
     if (base.Request.QueryString["search"] != null)
     {
         if (base.Request["search"].ToString() != "")
         {
             this.GetValue();
             this.SetShowPage();
         }
     }
     else
     {
         base.Response.Write("查询页面出错,请检测你的查询条件!");
         base.Response.End();
     }
 }
Exemplo n.º 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)
     {
         if ((base.Request.QueryString["id"] != null) && (base.Request.QueryString["id"].ToString().Trim() != ""))
         {
             string   text = base.Request.QueryString["id"].ToString().Trim();
             DataBase db   = new DataBase(MyFunc.GetConnStr(2));
             this.DropDownListRate.Items.Clear();
             SqlDataReader reader = db.ExecuteReader("SELECT * FROM rate");
             while (reader.Read())
             {
                 this.DropDownListRate.Items.Add(new ListItem(reader["type"].ToString().Trim(), reader["rate"].ToString().Trim()));
             }
             reader.Close();
             this.LabelGd.Text       = this.Session.Contents["adminusername"].ToString().Trim();
             this.LabelUseMoney.Text = "";
             SqlDataReader reader2 = db.ExecuteReader("SELECT userid,username,userpass,zdlid,zdlname,dlsid,dlsname,usemoney,moneysort,usertype,pltype,tel,truename,abc FROM member WHERE userid=" + text);
             if (!reader2.Read())
             {
                 reader2.Close();
                 db.Dispose();
                 MyFunc.showmsg("没有该会员");
                 base.Response.End();
                 return;
             }
             this.LabelZdl.Text                    = reader2["zdlname"].ToString().Trim();
             this.LabelDls.Text                    = reader2["dlsname"].ToString().Trim();
             this.TextBoxDlsid.Text                = reader2["dlsid"].ToString().Trim();
             this.TextBoxUserName.Text             = reader2["username"].ToString().Trim();
             this.pubshowpass                      = reader2["userpass"].ToString().Trim();
             this.TextBoxTrueName.Text             = reader2["truename"].ToString().Trim();
             this.TextBoxTel.Text                  = reader2["tel"].ToString().Trim();
             this.DropDownListABC.SelectedValue    = reader2["abc"].ToString().Trim().ToUpper();
             this.DropDownListPlType.SelectedValue = reader2["pltype"].ToString().Trim();
             if (reader2["usertype"].ToString().Trim() == "信用")
             {
                 this.RadioButton1.Checked = true;
             }
             else
             {
                 this.RadioButton2.Checked = true;
             }
             this.DropDownListRate.Items.FindByText(reader2["moneysort"].ToString().Trim().ToUpper()).Selected = true;
             this.TextBoxUseMoney.Text = reader2["usemoney"].ToString().Trim();
             this.TextBoxUserID.Text   = reader2["userid"].ToString().Trim();
             reader2.Close();
             this.DlsUseMoney(db);
             db.Dispose();
         }
         this.TextBoxUseMoney.Attributes["OnKeyUp"]   = "setCurrentCreditLocal()";
         this.DropDownListRate.Attributes["OnChange"] = "setCurrentCreditLocal()";
     }
 }
Exemplo n.º 19
0
 private void adddeal()
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "0", 1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         string        sql    = "SELECT subid FROM subAgence WHERE subname = '" + base.Request.Form["subname"].ToString().Trim() + "' and classid = '10' union SELECT userid FROM agence WHERE username ='******'";
         SqlDataReader reader = base2.ExecuteReader(sql);
         if (reader.Read())
         {
             reader.Close();
             base2.CloseConnect();
             base2.Dispose();
             MyFunc.showmsg("此帐号已经存在!");
         }
         else
         {
             reader.Close();
             sql = "INSERT INTO subAgence (userid,classid,subname,truename,subpass,regtime,isuseable) VALUES ('" + this.Session["adminuserid"].ToString() + "','10','" + base.Request.Form["subname"].ToString().Trim() + "','" + base.Request.Form["truename"].ToString().Trim() + "','" + base.Request.Form["subpass"].ToString().Trim() + "','" + DateTime.Now.ToString() + "'," + base.Request.Form["isuseable"].ToString().Trim() + ")";
             base2.ExecuteNonQuery(sql);
             base2.CloseConnect();
             base2.Dispose();
         }
     }
 }
Exemplo n.º 20
0
 public void DelUser(string id, string dlsid)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), "1", 1))
     {
         MyFunc.goToLoginPage();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         int num = (int) base2.ExecuteScalar("SELECT xzcount FROM member WHERE userid=" + id);
         if (num > 0)
         {
             base2.Dispose();
             MyFunc.showmsg("该会员有注单,不能删除该会员");
             base.Response.End();
         }
         else
         {
             string text = base2.ExecuteScalar("SELECT dlsid FROM member WHERE userid=" + id).ToString();
             if (base2.ExecuteNonQuery("DELETE FROM member WHERE userid=" + id) > 0)
             {
                 base2.ExecuteNonQuery("UPDATE agence SET memcount=memcount-1 WHERE dlsid=" + text);
                 base2.Dispose();
                 MyFunc.JumpPage("删除该会员成功", "dlslist.aspx");
                 base.Response.End();
             }
             else
             {
                 base2.Dispose();
                 MyFunc.showmsg("删除会员失败");
                 base.Response.End();
             }
         }
     }
 }
Exemplo n.º 21
0
        private void Page_Load(object sender, EventArgs e)
        {
            if ((this.Session.Contents["adminsubid"] != null) && (this.Session.Contents["adminsubid"].ToString() != ""))
            {
                if (!MyFunc.CheckUserLogin(2) || !MyTeam.OnlineList.OnlineList.isUserLogin(2))
                {
                    MyFunc.goToLoginPage();
                    base.Response.End();
                    return;
                }
            }
            else if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
            {
                MyFunc.goToLoginPage();
                base.Response.End();
                return;
            }
            string flag = "all";

            if (base.Request.QueryString["tztype"] != null)
            {
                flag = base.Request.QueryString["tztype"].ToString();
            }
            this.Deal(flag);
        }
Exemplo n.º 22
0
 private void DelGd(string id)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), this.Session.Contents["adminclassid"].ToString().Trim(), 1))
     {
         MyFunc.goToLoginPage();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         if (((int)base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE gdid=" + id)) > 0)
         {
             base2.Dispose();
             MyFunc.showmsg("该股东下还有总代理,代理商或会员,不能删除股东");
             base.Response.End();
         }
         else if (base2.ExecuteNonQuery("DELETE FROM agence WHERE userid=" + id + " AND classid=2") > 0)
         {
             base2.Dispose();
             MyFunc.JumpPage("删除股东成功!", "gdlist.aspx");
             base.Response.End();
         }
         else
         {
             base2.Dispose();
             MyFunc.showmsg("删除股东失败");
             base.Response.End();
         }
     }
 }
Exemplo n.º 23
0
        private void Page_Load(object sender, EventArgs e)
        {
            string table = "";

            MyFunc.isRefUrl();
            if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
            {
                MyFunc.goToLoginPage();
                base.Response.End();
            }
            else if (!this.Page.IsPostBack)
            {
                if ((base.Request.QueryString["path"] != null) && (base.Request.QueryString["path"].ToString().Trim() != ""))
                {
                    this.pathStr = base.Request.QueryString["path"].ToString().Trim();
                    table        = this.GetTableName(this.pathStr);
                    this.tableSelect.Rows[1].Cells[0].InnerHtml = this.SetBallList(table, this.pathStr);
                }
            }
            else
            {
                this.pathStr = base.Request.QueryString["path"].ToString().Trim();
                if (base.Request.Form["fr_league"] != null)
                {
                    this.SetSessionLeague(this.pathStr, base.Request.Form["fr_league"].ToString().Trim());
                }
                else
                {
                    this.Session.Contents[this.pathStr] = "";
                }
                base.Response.Redirect(this.pathStr);
            }
        }
Exemplo n.º 24
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.Params["MySelDate"] == null)
         {
             if (this.Session.Contents["basketthisDay"] == null)
             {
                 this.Session.Contents["basketthisDay"] = DateTime.Today.ToShortDateString();
             }
         }
         else
         {
             this.Session.Contents["basketthisDay"] = base.Request.Params["MySelDate"];
         }
         this.selday = this.Session.Contents["basketthisDay"].ToString();
         if (!base.IsPostBack)
         {
             for (int i = 0; i < 7; i++)
             {
                 this.SelectDay.Items.Add(new ListItem(DateTime.Today.AddDays((double)-i).ToShortDateString() + " " + MyFunc.DayToWeek(DateTime.Today.AddDays((double)-i)), DateTime.Today.AddDays((double)-i).ToShortDateString()));
             }
         }
         this.FillDataGrid(this.selday);
         this.DataGrid1.DataBind();
     }
 }
Exemplo n.º 25
0
 public void DelZdl(string id)
 {
     if (!MyFunc.CheckUserLogin(this.Session.Contents["adminusername"].ToString().Trim(), this.Session.Contents["adminuserpass"].ToString().Trim(), this.Session.Contents["adminclassid"].ToString().Trim(), 1))
     {
         MyFunc.goToLoginPage();
     }
     else
     {
         DataBase base2 = new DataBase(MyFunc.GetConnStr(2));
         int      num   = (int)base2.ExecuteScalar("SELECT COUNT(*) FROM agence WHERE zdlid=" + id + " AND classid=4 AND gdid=" + this.Session.Contents["adminuserid"].ToString().Trim());
         if (num > 0)
         {
             base2.Dispose();
             MyFunc.showmsg("该总代理下还有代理商个数不为0,不能删除");
             base.Response.End();
         }
         else if (base2.ExecuteNonQuery("DELETE FROM agence WHERE userid=" + id + " AND classid=3 AND gdid=" + this.Session.Contents["adminuserid"].ToString().Trim()) > 0)
         {
             base2.ExecuteNonQuery("UPDATE agence SET memcount=memcount-1 WHERE userid=" + id + " AND gdid=" + this.Session.Contents["adminuserid"].ToString().Trim());
             base2.Dispose();
             MyFunc.JumpPage("删除该总代理成功", "zdllist.aspx");
             base.Response.End();
         }
         else
         {
             base2.Dispose();
             MyFunc.showmsg("删除总代理失败");
             base.Response.End();
         }
     }
 }
Exemplo n.º 26
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)
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT userid,username,gdbl FROM agence WHERE classid=2 AND gdid = '" + this.Session["adminuserid"].ToString() + "'");
         this.DropdownlistGd.Items.Clear();
         this.DropdownlistGd.Items.Add(new ListItem("请选择", "00"));
         while (reader.Read())
         {
             this.DropdownlistGd.Items.Add(new ListItem(reader["username"].ToString().Trim(), reader["userid"].ToString().Trim()));
         }
         reader.Close();
         if (this.DropdownlistGd.Items.Count < 2)
         {
             base2.Dispose();
             MyFunc.showmsg("请先添加股东");
             base.Response.End();
         }
         else
         {
             this.DropdownlistGd.SelectedIndex = 0;
             base2.Dispose();
         }
     }
 }
Exemplo n.º 27
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() != "") && (base.Request.QueryString["did"] != null))) && (base.Request.QueryString["did"].ToString().Trim() != ""))
         {
             if (base.Request.QueryString["action"].ToString().Trim().ToUpper() == "OPEN")
             {
                 this.OpDls("1", base.Request.QueryString["id"].ToString().Trim());
             }
             else if (base.Request.QueryString["action"].ToString().Trim().ToUpper() == "CLOSE")
             {
                 this.OpDls("0", base.Request.QueryString["id"].ToString().Trim());
             }
             else
             {
                 if (base.Request.QueryString["action"].ToString().Trim().ToUpper() != "DEL")
                 {
                     return;
                 }
                 this.DelDls(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");
         while (reader.Read())
         {
             this.DropDownListGd.Items.Add(new ListItem(reader["username"].ToString().Trim(), reader["userid"].ToString().Trim()));
         }
         reader.Close();
         this.DropDownListGd.Items.Add(new ListItem("全部", ""));
         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();
         }
         if ((base.Request.QueryString["flag"] != null) && (base.Request.QueryString["flag"].ToString().Trim() != ""))
         {
             this.DropDownListAccountStatus.SelectedValue = base.Request.QueryString["flag"].ToString().Trim();
         }
         this.countmem();
         this.PageList(this.DropDownListAccountStatus.SelectedValue);
         base2.Dispose();
         this.DataGridDataBind(this.DropDownListAccountStatus.SelectedValue, this.TextBoxSortField.Text, int.Parse(this.DropDownListPage.SelectedValue));
     }
 }
Exemplo n.º 28
0
 private void Page_Load(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(2))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
 }
Exemplo n.º 29
0
 private void Page_Load(object sender, EventArgs e)
 {
     if (!MyFunc.CheckUserLogin(2) || !MyTeam.OnlineList.OnlineList.isUserLogin(2))
     {
         MyFunc.goToLoginPage("../manager/");
         base.Response.End();
     }
 }
Exemplo n.º 30
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();
     }
 }