public CancelOrderShopkeeper(string id, MenuShopkeepers M) { InitializeComponent(); this.m = M; this.lblidShopkeeper.Text = id; loadGridview(); }
public ViewOrderShopkeeper(string id, string name, string loc, string p, MenuShopkeepers m) { InitializeComponent(); this.lblid.Text = id; this.lblfullname.Text = name; this.lbladdress.Text = loc; this.lblphone.Text = p; this.s1 = m; loadGridview(); }
public shopkeeperchooseSoftDrink(string id, string name, MenuShopkeepers m) { InitializeComponent(); loadGridview(); fillcombo(); this.s1 = m; this.lblId.Text = id; this.lblShopkeepername.Text = name; DateTime d = DateTime.Now.AddMonths(1); dtpHide.Value = d; }
private void log() { string userName = txtUser.Text.ToString(); string password = txtpassword.Text.ToString(); string cmbType = cmbUsertype.Text.ToString(); OracleConnection con = new OracleConnection(constr); con.Open(); /* string query = "Select count(*) From login where username ='******' and password ='******'and usertype ='" + cmbType + "'"; * string query2 = "Select usertype From login where username='******' and password ='******'"; * * OracleDataAdapter oda = new OracleDataAdapter(query,con); * DataTable dt = new DataTable(); * oda.Fill(dt); * * * if (dt.Rows[0][0].ToString() == "1") * { * OracleDataAdapter oda1 = new OracleDataAdapter(query2, con); * DataTable dt1 = new DataTable(); * oda1.Fill(dt1); * if (dt1.Rows[0][0].ToString() == "Delivery Boy") * { * this.Hide(); * MenuDeliveryBoy m = new MenuDeliveryBoy(this.txtUser.Text, this.cmbUsertype.Text, this); * m.Show(); * } * } */ string q11 = "select count(*) from manager where mgr_uname ='" + userName + "' and password ='******'"; OracleDataAdapter oda22 = new OracleDataAdapter(q11, con); DataTable dt22 = new DataTable(); oda22.Fill(dt22); //OracleCommand cmd = new OracleCommand("select mgr_uname from manager",con); // OracleDataReader dr = cmd.ExecuteReader(); // AutoCompleteStringCollection mycollection = new AutoCompleteStringCollection(); // while (dr.Read()) // { // mycollection.Add(dr.GetString(0)); // } if (dt22.Rows[0][0].ToString() == "1") { this.Hide(); MenuManager m = new MenuManager(this.txtUser.Text, this.cmbUsertype.Text, this); m.Show(); } // else if (dt22.Rows[0][0].ToString() == "0") // { // MessageBox.Show("Not Correct"); // } string q1 = "select count(*) from shopkeeper where shpkper_uname ='" + userName + "' and password ='******'"; OracleDataAdapter oda2 = new OracleDataAdapter(q1, con); DataTable dt2 = new DataTable(); oda2.Fill(dt2); if (dt2.Rows[0][0].ToString() == "1") { this.Hide(); MenuShopkeepers m = new MenuShopkeepers(this.txtUser.Text, this); m.Show(); } string q2 = "select count(*) from Customer where cust_uname ='" + userName + "' and password ='******'"; OracleDataAdapter oda3 = new OracleDataAdapter(q2, con); DataTable dt3 = new DataTable(); oda3.Fill(dt3); if (dt3.Rows[0][0].ToString() == "1") { this.Hide(); MenuCustomer m = new MenuCustomer(this.txtUser.Text, this.cmbUsertype.Text, this); m.Show(); } string q5 = "select count(*) from DELIVERYBOY where DELBOY_UNAME ='" + userName + "' and password ='******'"; OracleDataAdapter oda5 = new OracleDataAdapter(q5, con); DataTable dt5 = new DataTable(); oda5.Fill(dt5); if (dt5.Rows[0][0].ToString() == "1") { this.Hide(); MenuDeliveryBoy m = new MenuDeliveryBoy(this.txtUser.Text, this.cmbUsertype.Text, this); m.Show(); } con.Close(); }