Beispiel #1
0
 public Modify_RENT(string carID, string clientID, AdminPanel adminpanel)
 {
     InitializeComponent();
     this.clientID = clientID;
     this.carID = Convert.ToInt32(carID);
     this.adminpanel = adminpanel;
 }
Beispiel #2
0
 public Modify_SALE(string carID, string clientID, AdminPanel adminpanel)
 {
     //initialize Modify_SELL class
     InitializeComponent();
     this.clientID = clientID;
     this.carID = Convert.ToInt32(carID);
     this.adminpanel = adminpanel;
 }
Beispiel #3
0
        //check if username and password are correct
        private void button1_Click(object sender, EventArgs e)
        {
            SqlCeCommand cm = new SqlCeCommand("SELECT COUNT(*) FROM Password WHERE UserName=@user AND Password=@pas ", Form1.con );
            cm.Parameters.AddWithValue("@user", textBox1.Text);
            cm.Parameters.AddWithValue("@pas", EncryptSHA512Managed(textBox2.Text));

            if ((int)cm.ExecuteScalar() == 1)
            {
                AdminPanel adminpanel = new AdminPanel(textBox1.Text);
                adminpanel.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Wrong username or password!");
            }
        }
Beispiel #4
0
 public AddNew_CAR(AdminPanel adminpanel)
 {
     InitializeComponent();
     this.adminpanel = adminpanel;
 }
Beispiel #5
0
 public Modify_CAR(String id, AdminPanel form4)
 {
     InitializeComponent();
     this.id = Convert.ToInt32(id);
     this.adminpanel = form4;
 }
Beispiel #6
0
 public Modify_CLIENT(string id, AdminPanel adminpanel)
 {
     InitializeComponent();
     this.id = id;
     this.adminpanel = adminpanel;
 }