Exemplo n.º 1
0
 public ChangeP(Form obj, Userinfo ui)
 {
     InitializeComponent();
     this.obj = obj;
     this.ui  = ui;
     check    = 0;
 }
Exemplo n.º 2
0
        public Userinfo getUser(string x)
        {
            User     u  = new User();
            Userinfo ui = new Userinfo();

            try
            {
                var str = from a in cntx.Users
                          where a.UserName == x
                          select a;
                u          = str.First();
                ui.UName   = u.UserName;
                ui.Pword   = u.Password;
                ui.Igc     = u.IGC;
                ui.UID     = u.UserId;
                ui.Em      = u.Email;
                ui.Picpath = u.Picture;
                ui.Abouts  = u.AboutSelf;
            }
            catch
            {
                ui.UName = null;
            }

            return(ui);
        }
Exemplo n.º 3
0
        private void textBox2_Leave(object sender, EventArgs e)
        {
            if (textBox2.Text == "")
            {
                textBox2.Text = "Enter Your Username";
            }
            ui = ul.getUser(textBox2.Text);

            if (textBox2.Text == "Enter Your Username")
            {
                label1.Visible = true;
                label1.Text    = "Enter Valid Username";
                flag           = 1;
                pictureBox1.BackgroundImage = Image.FromFile(@"F:\Important Documents\Project\Red_x.png");
            }
            else if (ui.UName != null)
            {
                label1.Visible = true;
                label1.Text    = "Username In Use";
                flag           = 1;
                pictureBox1.BackgroundImage = Image.FromFile(@"F:\Important Documents\Project\Red_x.png");
            }
            else
            {
                flag           = 0;
                label1.Visible = false;
                pictureBox1.BackgroundImage = Image.FromFile(@"F:\Important Documents\Project\check.png");
            }
        }
Exemplo n.º 4
0
        public PredictionHistory(Form obj, Userinfo ui)
        {
            cntx = new MyDBDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=F:\Important Documents\Project\Solution1\OOP2\DotaDB.mdf;Integrated Security=True;Connect Timeout=30");

            InitializeComponent();
            this.obj = obj;
            this.ui  = ui;
        }
Exemplo n.º 5
0
 public UserBet(Form obj, string x, string y, DateTime d, Userinfo ui)
 {
     InitializeComponent();
     this.obj          = obj;
     radioButton1.Text = x;
     radioButton2.Text = y;
     this.ui           = ui;
     this.MatchID      = ul.getMatchID(x, y, d);
 }
Exemplo n.º 6
0
        public void InsertUser(Userinfo ui)
        {
            User u = new User();

            u.UserName = ui.UName;
            u.Password = ui.Pword;
            u.IGC      = ui.Igc;
            u.Email    = ui.Em;

            cntx.Users.InsertOnSubmit(u);
            cntx.SubmitChanges();
        }
Exemplo n.º 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            UpdateDBLin ul = new UpdateDBLin();


            string pass;

            if (textBox1.Text.StartsWith("Admin") == true)
            {
                ai   = ul.getAdmin(textBox1.Text);
                pass = ul.getAdminPass(textBox1.Text);

                if (textBox2.Text == pass)
                {
                    AdminHome h = new AdminHome(ai);
                    h.Show();
                    this.Visible = false;
                }
                else
                {
                    MessageBox.Show("Wrong Password or Username", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                ui   = ul.getUser(textBox1.Text);
                pass = ul.getPassword(textBox1.Text);

                if (textBox2.Text == pass)
                {
                    HomeUser h = new HomeUser(ui);
                    h.Show();
                    this.Visible = false;
                }
                else
                {
                    MessageBox.Show("Wrong Password or Username", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
 public MatchResult(Form obj, Userinfo ui, MResult mr, MatchP mp, int w1, int w2, int w3, int bs1, int bs2, int bs3, int bx)
 {
     InitializeComponent();
     this.obj      = obj;
     this.ui       = ui;
     this.mp       = mp;
     this.mr       = mr;
     this.bs1      = bs1;
     this.bs2      = bs2;
     this.bs3      = bs3;
     this.w1       = w1;
     this.w2       = w2;
     this.w3       = w3;
     textBox1.Text = bs1.ToString();
     textBox2.Text = bs2.ToString();
     textBox3.Text = bs3.ToString();
     textBox4.Text = w1.ToString();
     textBox5.Text = w2.ToString();
     textBox6.Text = w3.ToString();
     textBox7.Text = bx.ToString();
     textBox8.Text = ui.Igc.ToString();
 }
 public Profile(Form n, Userinfo ui)
 {
     InitializeComponent();
     this.f  = n;
     this.ui = ui;
 }
Exemplo n.º 10
0
 public HomeUser(Userinfo ui)
 {
     InitializeComponent();
     this.ui = ui;
 }