private void lblAllBranch_Click(object sender, EventArgs e) { AdminShowForm adminShow = new AdminShowForm(dataAccess.GetData <Branch>(""), (int)Entities.Show.AdminShow.allBranch, userTable); adminShow.Show(); this.Hide(); }
private void delete() { string id = EmployeeTable.Rows[0].Field <int>("User_id").ToString(); int rowsAffected = dataAccess.Delete("Employee", "User_id", id); if (rowsAffected > 0) { rowsAffected = dataAccess.Delete("Users", "Id", id); if (rowsAffected > 0) { MessageBox.Show("Account Deleted Successfully"); DataTable EmployeeTable = dataAccess.GetData <Employee>(""); AdminShowForm AdminShow = new AdminShowForm(EmployeeTable, (int)Entities.Show.AdminShow.workerList, userTable); AdminShow.Show(); this.Hide(); } else { MessageBox.Show("Something Went Wrong!!!"); } } else { MessageBox.Show("Something Went Wrong!!!"); } }
private void lblBack_Click(object sender, EventArgs e) { AdminShowForm AdminShow = new AdminShowForm(showTable, (int)Entities.Show.AdminShow.workerList, userTable); AdminShow.Show(); this.Hide(); }
private void update() { Employee employee = setEmployee(); int rowsAffected = dataAccess.Insert <Employee>(employee, true); if (rowsAffected > 0) { MessageBox.Show("Profile updated of the worker"); AdminShowForm AdminShow = new AdminShowForm(dataAccess.GetData <Employee>(""), (int)Entities.Show.AdminShow.allBranch, userTable); AdminShow.Show(); this.Hide(); } else { MessageBox.Show("Something Went Wrong!!!"); } }