Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if ((textBox2.Text == "") || (textBox1.Text == ""))
            {
                MessageBox.Show("Plz Insert User Name & Password");
            }
            else if (textBox2.Text != "manager")
            {
                MessageBox.Show("Incorrect User Name");
            }
            else if (textBox1.Text != "manager123")
            {
                MessageBox.Show("Incorrect Password");
            }
            else if ((textBox2.Text != "manager") || (textBox1.Text != "manager123"))
            {
                MessageBox.Show("Incorrect User Name & Password");
            }

            else if ((textBox2.Text == "manager") || (textBox1.Text == "manager123"))
            {
                this.Hide();
                frmInvoice frm = new frmInvoice();
                frm.Show();
            }
        }
Beispiel #2
0
        private void frmCustomersRecord1_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmInvoice frm = new frmInvoice();

            frm.label6.Text = label1.Text;
            frm.Show();
        }
Beispiel #3
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try{
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmInvoice frm = new frmInvoice();
                frm.Show();
                frm.txtCustomerID.Text   = dr.Cells[0].Value.ToString();
                frm.txtCustomerName.Text = dr.Cells[1].Value.ToString();
                frm.label6.Text          = label1.Text;
            }

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

            frm.Show();
        }