public RequestForm(DeliverDashboard d, LogIn i, int iss)
 {
     this.l    = i;
     this.dash = d;
     this.id   = iss;
     InitializeComponent();
 }
 public OrderHistoryForm(DeliverDashboard d, LogIn s, int id)
 {
     this.dash = d;
     this.l    = s;
     this.id   = id;
     InitializeComponent();
 }
 public Details(DeliverDashboard d, LogIn i, int s)
 {
     this.dash = d;
     this.l    = i;
     this.id   = s;
     InitializeComponent();
 }
        private void UserLogInbutton_Click(object sender, EventArgs e)
        {
            string uname = UsernameTextbox.Text;
            string pass  = PasswordUserTextbox.Text;

            //MessageBox.Show(uname);
            if (uname == "" && pass == "")
            {
                MessageBox.Show("Username And Password Fields are empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (uname == "")
            {
                MessageBox.Show("Username Field is empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (pass == "")
            {
                MessageBox.Show("Password Field is empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                //Temporary Fix
                //MemberDashBoard m = new MemberDashBoard(this,)
                DataBase db = new DataBase();
                int      id;
                string   status;
                Logic    lo       = new Logic();
                string   hashpass = lo.hash1(pass).ToString();
                string   s        = db.Check_Who(uname, hashpass, out id, out status);
                ///MessageBox.Show("Username: "******" ID: " + id);
                if (s == "U" && status == "Y")
                {
                    MemberDashBoard m = new MemberDashBoard(this, id);
                    m.Show();
                    this.Hide();
                }
                else if (s == "A" && status == "Y")
                {
                    AdminDashBoard n = new AdminDashBoard(this);
                    n.Show();
                    this.Hide();
                }
                else if (s == "D" && status == "Y")
                {
                    DeliverDashboard d = new DeliverDashboard(this, id);
                    d.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Incorrect Id Or Password", "Errror");
                }
                //m.Show();
                //
            }
        }
Esempio n. 5
0
 public OrderDetailsRequest(DeliverDashboard d)
 {
     dash = d;
     InitializeComponent();
 }