private void UserSignIn_Click(object sender, EventArgs e)
        {
            string s;

            if (this.checkOK())
            {
                //string id = "00";
                DataBase db = new DataBase();
                if (db.Email_Verification(this.UserEmail.Text))
                {
                    this.Hide();
                    Logic  lo       = new Logic();
                    string passhash = lo.hash1(this.UserPassword.Text).ToString();
                    db.AddUser(this.UserFirstName.Text, this.UserLastName.Text, this.UserPhoneNumber.Text, this.UserEmail.Text, passhash);

                    int    id;
                    string status;

                    //MessageBox.Show(passhash);
                    string st = db.Check_Who(this.UserEmail.Text, passhash, out id, out status);
                    //User u1 = new User(id,this.UserFirstName.Text, this.UserLastName.Text, this.UserPhoneNumber.Text, this.UserEmail.Text);
                    MemberDashBoard m1 = new MemberDashBoard(l, id);
                    m1.Show();
                }
                else
                {
                    MessageBox.Show("User Already Exist!!!");
                }
            }
            else
            {
                MessageBox.Show("Fill Up The Form Properly!!!");
            }
        }
Beispiel #2
0
 public PlaceOrder1(MemberDashBoard p, LogIn ll, int u)
 {
     this.dash = p;
     this.l    = ll;
     this.id   = u;
     InitializeComponent();
 }
 public ConfirmOrder(OrderHistory p, MemberDashBoard m, LogIn l, int id)
 {
     //this.o = t;
     this.back = p;
     this.dash = m;
     this.l    = l;
     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();
                //
            }
        }
Beispiel #5
0
        public OrderHistory(MemberDashBoard m, LogIn i, string s)
        {
            this.par    = m;
            this.l      = i;
            this.userid = s;
            DataBase  db = new DataBase();
            DataTable dt = db.Get_User_OrderHistory(userid);

            InitializeComponent();
            OrderHistoryGrid.DataSource = dt;
        }
 public PlaceOrder2(PlaceOrder1 p, MemberDashBoard m1, LogIn l1, int i, string pa, string pc, string ra, string rc)
 {
     this.parent        = p;
     this.dash          = m1;
     this.l             = l1;
     this.id            = i;
     this.pickupaddress = pa;
     this.pickupcity    = pc;
     this.rcvaddress    = ra;
     this.rcvcity       = rc;
     InitializeComponent();
 }
Beispiel #7
0
        public PlaceOrder3(PlaceOrder2 p, MemberDashBoard m, LogIn l1, int i, string r, string rc, string pa, string pc, string n, string c)
        {
            this.id          = i;
            this.pickaddress = r;
            this.pickupcity  = rc;
            this.rcvaddress  = pa;
            this.rcvcity     = pc;
            this.rname       = n;
            this.rphone      = c;
            this.parent      = p;
            this.dash        = m;
            this.l           = l1;

            InitializeComponent();
        }
Beispiel #8
0
 public Notification(MemberDashBoard m1, LogIn l1)
 {
     this.m = m1;
     this.l = l1;
     InitializeComponent();
 }