Exemple #1
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            tbAdminID.Text  = "Gaurav";
            tbPassword.Text = "welcome123";
            pb1.Image       = global::SATSystem.Properties.Resources.star1;
            pb2.Image       = global::SATSystem.Properties.Resources.star1;
            pb3.Image       = global::SATSystem.Properties.Resources.star1;
            pb4.Image       = global::SATSystem.Properties.Resources.star1;
            pb5.Image       = global::SATSystem.Properties.Resources.star1;
            try
            {
                DBConnect DB        = new DBConnect();
                string    strRating = DB.GetRating();
                switch (strRating)
                {
                case "0":
                    pb1.Image = global::SATSystem.Properties.Resources.star1;
                    pb2.Image = global::SATSystem.Properties.Resources.star1;
                    pb3.Image = global::SATSystem.Properties.Resources.star1;
                    pb4.Image = global::SATSystem.Properties.Resources.star1;
                    pb5.Image = global::SATSystem.Properties.Resources.star1;
                    break;

                case "1":
                    pb1.Image = global::SATSystem.Properties.Resources.star;
                    pb2.Image = global::SATSystem.Properties.Resources.star1;
                    pb3.Image = global::SATSystem.Properties.Resources.star1;
                    pb4.Image = global::SATSystem.Properties.Resources.star1;
                    pb5.Image = global::SATSystem.Properties.Resources.star1;
                    break;

                case "2":
                    pb1.Image = global::SATSystem.Properties.Resources.star;
                    pb2.Image = global::SATSystem.Properties.Resources.star;
                    pb3.Image = global::SATSystem.Properties.Resources.star1;
                    pb4.Image = global::SATSystem.Properties.Resources.star1;
                    pb5.Image = global::SATSystem.Properties.Resources.star1;
                    break;

                case "3":
                    pb1.Image = global::SATSystem.Properties.Resources.star;
                    pb2.Image = global::SATSystem.Properties.Resources.star;
                    pb3.Image = global::SATSystem.Properties.Resources.star;
                    pb4.Image = global::SATSystem.Properties.Resources.star1;
                    pb5.Image = global::SATSystem.Properties.Resources.star1;
                    break;

                case "4":
                    pb1.Image = global::SATSystem.Properties.Resources.star;
                    pb2.Image = global::SATSystem.Properties.Resources.star;
                    pb3.Image = global::SATSystem.Properties.Resources.star;
                    pb4.Image = global::SATSystem.Properties.Resources.star;
                    pb5.Image = global::SATSystem.Properties.Resources.star1;
                    break;

                case "5":
                    pb1.Image = global::SATSystem.Properties.Resources.star;
                    pb2.Image = global::SATSystem.Properties.Resources.star;
                    pb3.Image = global::SATSystem.Properties.Resources.star;
                    pb4.Image = global::SATSystem.Properties.Resources.star;
                    pb5.Image = global::SATSystem.Properties.Resources.star;
                    break;
                }
            }
            catch (Exception e1)
            {
                return;
            }
        }