private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmCategory o1 = new frmCategory();

            o1.Hide();
            frmSubCategory o2 = new frmSubCategory();

            o2.Hide();
            frmProduct o3 = new frmProduct();

            o3.Hide();

            frmSuppliersRecord o8 = new frmSuppliersRecord();

            o8.Hide();
            frmExpenseRecord1 o9 = new frmExpenseRecord1();

            o9.Hide();
            frmSalesRecord2 o10 = new frmSalesRecord2();

            o10.Hide();
            frmLogin frm = new frmLogin();

            frm.Show();
            frm.txtUserName.Text     = "";
            frm.txtPassword.Text     = "";
            frm.ProgressBar1.Visible = false;
            frm.txtUserName.Focus();
        }
        private void frmProductsRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmProduct frm = new frmProduct();

            frm.Show();
        }
        private void frmMainMenu_FormClosing(object sender, FormClosingEventArgs e)
        {
            //this.Dispose();
            this.Hide();
            frmCategory o1 = new frmCategory();

            o1.Hide();
            frmSubCategory o2 = new frmSubCategory();

            o2.Hide();
            frmProduct o3 = new frmProduct();

            o3.Hide();

            frmSuppliersRecord o8 = new frmSuppliersRecord();

            o8.Hide();
            frmExpenseRecord1 o9 = new frmExpenseRecord1();

            o9.Hide();
            frmSalesRecord2 o10 = new frmSalesRecord2();

            o10.Hide();
            frmLogin frm = new frmLogin();

            frm.Show();
            frm.txtUserName.Text     = "";
            frm.txtPassword.Text     = "";
            frm.ProgressBar1.Visible = false;
            frm.txtUserName.Focus();
        }
Example #4
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmProduct frm = new frmProduct();
                frm.Show();
                frm.txtProductID.Text     = dr.Cells[0].Value.ToString();
                frm.txtProductName.Text   = dr.Cells[1].Value.ToString();
                frm.txtCategoryID.Text    = dr.Cells[2].Value.ToString();
                frm.cmbCategory.Text      = dr.Cells[3].Value.ToString();
                frm.txtSubCategoryID.Text = dr.Cells[4].Value.ToString();
                frm.cmbSubCategory.Text   = dr.Cells[5].Value.ToString();
                frm.txtFeatures.Text      = dr.Cells[6].Value.ToString();
                frm.txtPrice.Text         = dr.Cells[7].Value.ToString();
                byte[]       data = (byte[])dr.Cells[8].Value;
                MemoryStream ms   = new MemoryStream(data);
                frm.pictureBox1.Image = Image.FromStream(ms);
                frm.btnUpdate.Enabled = true;
                frm.btnDelete.Enabled = true;
                frm.btnSave.Enabled   = false;
                frm.txtProductName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #5
0
        private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmCategory o1 = new frmCategory();

            o1.Hide();
            frmSubCategory o2 = new frmSubCategory();

            o2.Hide();
            frmProduct o3 = new frmProduct();

            o3.Hide();
            frmRegisteredUsersDetails o4 = new frmRegisteredUsersDetails();

            o4.Hide();
            frmRegistration o5 = new frmRegistration();

            o5.Hide();
            frmStockRecord o6 = new frmStockRecord();

            o6.Hide();
            frmCustomersRecord o7 = new frmCustomersRecord();

            o7.Hide();
            frmSuppliersRecord o8 = new frmSuppliersRecord();

            o8.Hide();
            frmProductsRecord2 o9 = new frmProductsRecord2();

            o9.Hide();
            frmSalesRecord2 o10 = new frmSalesRecord2();

            o10.Hide();
            frmLogin frm = new frmLogin();

            frm.Show();
            frm.txtUserName.Text     = "";
            frm.txtPassword.Text     = "";
            frm.ProgressBar1.Visible = false;
            frm.txtUserName.Focus();
        }
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmProduct frm = new frmProduct();
                frm.Show();
                frm.txtProductName.Text = dr.Cells[0].Value.ToString();
                frm.textBox1.Text       = dr.Cells[0].Value.ToString();
                frm.cmbCategory.Text    = dr.Cells[1].Value.ToString();
                frm.cmbCompany.Text     = dr.Cells[2].Value.ToString();
                frm.btnUpdate.Enabled   = true;
                frm.btnDelete.Enabled   = true;
                frm.btnSave.Enabled     = false;
                frm.txtProductName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void productsToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmProduct frm = new frmProduct();

            frm.Show();
        }
Example #8
0
        private void button4_Click(object sender, EventArgs e)
        {
            frmProduct frm = new frmProduct();

            frm.Show();
        }