private void Form4_Load(object sender, EventArgs e)
 {
     try
     {
         cashiers     oilviewobj = new cashiers();
         DataGridView v          = dataGridView1;
         oilviewobj.viewemployee(v);
     }
     catch (Exception ex)
     {
         MessageBox.Show("ERROR " + ex);
     }
     // TODO: This line of code loads data into the 'logInDataDataSet.EmployeesRecord' table. You can move, or remove it, as needed.
 }
Beispiel #2
0
        private void Delete_Click(object sender, EventArgs e)
        {
            string b = delete_id_boxs.Text;

            if (b == "" || b == "Enter Id ")
            {
                label2.Visible = true;
            }
            else
            {
                employeelist l1 = new cashiers(b);
                l1.delete();
                MessageBox.Show("Record Deleted!!");
                delete_id_boxs.Text = null;
            }
        }
Beispiel #3
0
        private void salary_update_Click(object sender, EventArgs e)
        {
            string n = id_check.Text;
            string k = new_salary_box.Text;

            if (n == "" || k == "" || n == "Enter Id" || k == "Enter new salary")
            {
                label1.Visible = true;
            }
            else
            {
                employeelist L1 = new cashiers(n, k);
                L1.update();
                MessageBox.Show("Salary Updated!!");
                id_check.Text       = null;
                new_salary_box.Text = null;
            }
        }
        private void Add_Click(object sender, EventArgs e)
        {
            string a = Post_Boxs.Text;
            string b = ID_BOXS.Text;
            string c = Name_Boxs.Text;
            string d = number_boxs.Text;
            string g = salary_boxs.Text;

            if (a == "" || b == "" || c == "" || d == "" || g == "" || c == "Enter Name")
            {
                label1.Visible = true;
            }
            else
            {
                employeelist L1 = new cashiers(a, b, c, d, g);
                L1.add();
                MessageBox.Show("Record Added!!");
                Post_Boxs.Text   = null;
                ID_BOXS.Text     = null;
                Name_Boxs.Text   = null;
                number_boxs.Text = null;
                salary_boxs.Text = null;
            }
        }