Ejemplo n.º 1
0
        protected void DeActive_btn_Click(object sender, EventArgs e)
        {
            var business = new Bussiness.PlayerBussiness();
            var player   = business.DisableUser(UserName_tbx.Text, false);

            Button1_Click(sender, e);
        }
Ejemplo n.º 2
0
 protected void DeActive_btn_Click(object sender, EventArgs e)
 {
     var business = new Bussiness.PlayerBussiness();
     var player = business.DisableUser(UserName_tbx.Text, false);
     Button1_Click(sender, e);
    
 }
Ejemplo n.º 3
0
        protected void SendMail_btn_Click(object sender, EventArgs e)
        {
   
            var business = new Bussiness.PlayerBussiness();
            try
            {

                var userid = business.GetUserSingleByNickName(UserName_tbx.Text).ID;

                //business.SendMailAndItemByUserName(Title_tbx.Text, Content_tbx.Text, UserName_tbx.Text,0,0,string.Empty);
                var mail=new MailInfo();
                mail.Title=Title_tbx.Text;
                mail.Content=Content_tbx.Text;
                mail.ReceiverID=userid;
                mail.Sender = "Administrators";
                mail.SenderID = 0;
                mail.Type = 1;
                business.SendMail(mail);
                Error_lbl.Text = "OK";
            }
            catch
            {
                Error_lbl.Text = "User  :";
            }
      
        }
Ejemplo n.º 4
0
        protected void Edit_Click(object sender, EventArgs e)
        {
            var item     = ItemMgr.FindItemTemplate(int.Parse(Template_tbx.Text));
            var business = new Bussiness.PlayerBussiness();

            try
            {
                var userid  = business.GetUserSingleByNickName(UserName_tbx.Text).ID;
                var agility = int.Parse(Agility_tbx.Text);
                var attack  = int.Parse(Attack_tbx.Text);
                var defence = int.Parse(Defence_tbx.Text);
                var luck    = int.Parse(Luck_tbx.Text);

                business.SendMailAndItem("Add Item", "AddItem", userid, int.Parse(Template_tbx.Text), 1, 50, 0, 0, int.Parse(Level_tbx.Text), attack, defence, agility, luck, false);
                Error_lbl.Text = "OK";
            }
            catch
            {
                Error_lbl.Text = "User is not valid or TemplateID is not valid :";
            }
            Template_tbx.Text = string.Empty;
            Level_tbx.Text    = string.Empty;

            return;
        }
Ejemplo n.º 5
0
        protected void Edit_Click(object sender, EventArgs e)
        {
            var item = ItemMgr.FindItemTemplate(int.Parse(Template_tbx.Text));
            var business = new Bussiness.PlayerBussiness();
            try
            {

                var userid = business.GetUserSingleByNickName(UserName_tbx.Text).ID;
                var agility = int.Parse(Agility_tbx.Text);
                var attack = int.Parse(Attack_tbx.Text);
                var defence = int.Parse(Defence_tbx.Text);
                var luck = int.Parse(Luck_tbx.Text);
              
                business.SendMailAndItem("Add Item", "AddItem", userid, int.Parse(Template_tbx.Text), 1,50, 0, 0, int.Parse(Level_tbx.Text), attack, defence, agility,luck, false);
                Error_lbl.Text = "OK";
            }
            catch
            {
                Error_lbl.Text = "User is not valid or TemplateID is not valid :";
            }
            Template_tbx.Text = string.Empty;
            Level_tbx.Text = string.Empty;

            return;
        }
Ejemplo n.º 6
0
 protected void ObjectDataSource1_Updating(object sender, ObjectDataSourceMethodEventArgs e)
 {
     var business = new Bussiness.PlayerBussiness();
     var player = business.GetUserSingleByNickName(UserName_tbx.Text);
     if (player != null)
     {
         player.GiftToken = Int32.Parse(((TextBox)FormView1.FindControl("GiftTokenTextBox")).Text);
         player.Gold = Int32.Parse(((TextBox)FormView1.FindControl("GoldTextBox")).Text);
         player.Money = Int32.Parse(((TextBox)FormView1.FindControl("MoneyTextBox")).Text);
         business.UpdatePlayer(player);
     }
     e.Cancel = true;
 }
Ejemplo n.º 7
0
        protected void ObjectDataSource1_Updating(object sender, ObjectDataSourceMethodEventArgs e)
        {
            var business = new Bussiness.PlayerBussiness();
            var player   = business.GetUserSingleByNickName(UserName_tbx.Text);

            if (player != null)
            {
                player.GiftToken = Int32.Parse(((TextBox)FormView1.FindControl("GiftTokenTextBox")).Text);
                player.Gold      = Int32.Parse(((TextBox)FormView1.FindControl("GoldTextBox")).Text);
                player.Money     = Int32.Parse(((TextBox)FormView1.FindControl("MoneyTextBox")).Text);
                business.UpdatePlayer(player);
            }
            e.Cancel = true;
        }