Пример #1
0
        private void Page_Load(object sender, EventArgs e)
        {
            DataProviders providers = new DataProviders();

            this.lblonlineplayer.Text = providers.ExecScalarOne("select sum(1) from mhcmember..logintable");
            this.Label1.Text          = providers.ExecScalarOne("select sum(gold) as gold from web_log where type='代理發放金幣' and convert(char(10),date,120)=convert(char(10),getdate(),120)");
        }
Пример #2
0
        private void btnread_Click(object sender, EventArgs e)
        {
            DataProviders providers = new DataProviders();

            this.lblonlineplayer.Text = providers.ExecScalarOne("select sum(1) from mhcmember..logintable");
            this.lblregister.Text     = providers.ExecScalarOne("select sum(1) from mhcmember..chr_log_info");
            this.lblmale.Text         = providers.ExecScalarOne("select sum(1) from mhcmember..chr_log_info where websex='帥哥'");
            this.lblfemale.Text       = providers.ExecScalarOne("select sum(1) from mhcmember..chr_log_info where websex='美女'");
            this.lblvip.Text          = providers.ExecScalarOne("select sum(1) from mhcmember..chr_log_info where weblevel=1");
            this.lbl2lvpet.Text       = providers.ExecScalarOne("select sum(1) from mhgame..tb_petinfo where grade=2");
            this.lbl3lvpet.Text       = providers.ExecScalarOne("select sum(1) from mhgame..tb_petinfo where grade=3");
            this.lblbank.Text         = providers.ExecScalarOne("select sum(webbank) from mhcmember..chr_log_info");
            this.lblplayergold.Text   = string.Format("{0:N}", providers.ExecScalarOne("select sum(webgold) from mhcmember..chr_log_info"));
            this.lblagentgold.Text    = providers.ExecScalarOne("select sum(gold) from mhcmember..web_agent");
            this.lblallcharacter.Text = providers.ExecScalarOne("select sum(1) from mhgame..tb_character");
        }