Ejemplo n.º 1
0
        public AdminOrderStatus(AdminDashBoard d, LogIn i)
        {
            l    = i;
            dash = d;
            InitializeComponent();
            DataBase db = new DataBase();

            this.OrderGrid.DataSource = db.get_AllOrder();
        }
Ejemplo n.º 2
0
        public DBlist(AdminDashBoard d, LogIn l)
        {
            dash   = d;
            this.l = l;
            InitializeComponent();
            DataBase  db = new DataBase();
            DataTable dt = db.Get_All_DeliveryBoy();

            this.dbgrid.DataSource = dt;
        }
        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();
                //
            }
        }
        public Assign_Delivery_Boy(AdminNewOrder a, int id, AdminDashBoard dash, LogIn i, string p, string r, DataGridView dg)
        {
            this.back    = a;
            this.l       = i;
            this.OrderId = id;
            this.dash    = dash;
            this.rloc    = r;
            this.ploc    = p;
            this.dg      = dg;
            InitializeComponent();
            this.richTextBox1.Text = ploc;
            this.richTextBox2.Text = rloc;
            DataBase  db = new DataBase();
            DataTable dt = db.Get_DeliveryBoy_Details();

            this.DeliveryBoyGrid.DataSource = dt;
        }
 public NewDeliveryBoyRequest(AdminDashBoard p, LogIn i)
 {
     this.par = p;
     this.l   = i;
     InitializeComponent();
 }
 public AdminNewOrder(AdminDashBoard d, LogIn i)
 {
     this.dash = d;
     this.l    = i;
     InitializeComponent();
 }
 public ViewAllUser(AdminDashBoard d, LogIn i)
 {
     this.dash = d;
     this.l    = i;
     InitializeComponent();
 }