示例#1
0
 private void Inventory_Click(object sender, EventArgs e)
 {
     /*Login m1 = new Login("Inventory");
      * m1.Show();
      * this.Hide();*/
     SubInterface.Inventory.InventorySub ins = new SubInterface.Inventory.InventorySub("");
     ins.Show();
     this.Hide();
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string query = "select count(*) from admins where Username='******'  and  Password='******' and Position='" + position.Text + "'";
                con.Open();
                cmd             = con.CreateCommand();
                cmd.CommandType = CommandType.Text;
                cmd.CommandText = query;

                int x = Convert.ToInt32(cmd.ExecuteScalar());
                con.Close();

                if (x == 1)
                {
                    if (position.Text == "Sales Manager")
                    {
                        SalesSub s1 = new SalesSub(textBox1.Text);
                        s1.Show();
                        this.Hide();
                    }
                    else if (position.Text == "HR Manager")
                    {
                        HarasaraSystem.SubInterface.Employee.EmployeeSub e1 = new HarasaraSystem.SubInterface.Employee.EmployeeSub(textBox1.Text);
                        e1.Show();
                        this.Hide();
                    }
                    else if (position.Text == "Adminstration")
                    {
                        HarasaraSystem.SubInterface.Administration.AdministrationSub a1 = new SubInterface.Administration.AdministrationSub(textBox1.Text);
                        a1.Show();
                        this.Hide();
                    }
                    else if (position.Text == "Finance")
                    {
                        HarasaraSystem.SubInterface.Finance.FinanceSub f1 = new SubInterface.Finance.FinanceSub(textBox1.Text);
                        f1.Show();
                        this.Hide();
                    }
                    else if (position.Text == "Products")
                    {
                        HarasaraSystem.SubInterface.Production.ProductionSub p1 = new SubInterface.Production.ProductionSub(textBox1.Text);
                        p1.Show();
                        this.Hide();
                    }
                    else if (position.Text == "Inventory")
                    {
                        HarasaraSystem.SubInterface.Inventory.InventorySub i1 = new SubInterface.Inventory.InventorySub(textBox1.Text);
                        i1.Show();
                        this.Hide();
                    }

                    else
                    {
                            << << << < HEAD
                            Transport.Main t1 = new Transport.Main();