Exemple #1
0
        private void btn_rsd_Click(object sender, EventArgs e)
        {
            ManageSupplier ms = new ManageSupplier();

            ms.Show();
            Hide();
        }
Exemple #2
0
        private void btn_del_Click(object sender, EventArgs e)
        {
            Suppliers si = new Suppliers()
            {
                supId = index
            };

            si.deleteSup(si);

            ManageSupplier refresh = new ManageSupplier();

            Hide();
            refresh.Show();
            MessageBox.Show("Successfully deleted", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #3
0
        private void btn_up_Click(object sender, EventArgs e)
        {
            Suppliers s = new Suppliers()
            {
                supId       = index,
                supName     = txt_name2.Text,
                supMobile   = txt_mob2.Text,
                supAddress1 = txt_add12.Text,
                supAddress2 = txt_add22.Text,
                supAddress3 = txt_add32.Text
            };

            s.updateSup(s);

            ManageSupplier refresh = new ManageSupplier();

            Hide();
            refresh.Show();
            MessageBox.Show("Successfully Updated", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #4
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_name1.Text) || string.IsNullOrEmpty(txt_mob1.Text) || string.IsNullOrEmpty(txt_add11.Text) || string.IsNullOrEmpty(txt_add21.Text) || string.IsNullOrEmpty(txt_add31.Text))
            {
                MessageBox.Show("One or more fields are empty, please fill", "Add Error");
                return;
            }
            Suppliers suppliers = new Suppliers()
            {
                supName     = txt_name1.Text,
                supAddress1 = txt_add11.Text,
                supAddress2 = txt_add21.Text,
                supAddress3 = txt_add31.Text,
                supMobile   = txt_mob1.Text
            };

            suppliers.addSup(suppliers);

            ManageSupplier refresh = new ManageSupplier();

            Hide();
            refresh.Show();
            MessageBox.Show("Successful", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }