Exemplo n.º 1
0
 private void btnDeletedEmployee_Click(object sender, System.EventArgs e)
 {
     if (delete == 0)
     {
         //			btnAdd.Visible = false;
         //			btnDelete.Visible = false;
         btnRestore.Visible         = true;
         checkEmployeeDeleted       = true;
         btnPermanentDelete.Visible = false;
         delete = 1;// chon tim kiem theo danh sach nhan vien nghi
         //btnPermanentDelete.Visible = true;
         EmployeeDO employeeDO = new EmployeeDO();
         dsEmployee = employeeDO.GetDeletedEmployeeInsurance((int)departmentTreeView.SelectedNode.Tag);
         PopulateEmployeeListView();
     }
     else if (delete == 1)
     {
         checkEmployeeDeleted = false;
         delete = 0;
         departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
         departmentTreeView.BuildTree();
         departmentTreeView.SelectedNode = departmentTreeView.TopNode;
         EmployeeDO employeeDO = new EmployeeDO();
         dsEmployee = employeeDO.GetEmployeeByDepartmentInsurance((int)departmentTreeView.SelectedNode.Tag);
         Refresh();
         btnRestore.Visible         = false;
         btnPermanentDelete.Visible = true;
     }
 }
Exemplo n.º 2
0
        private void departmentTreeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            //checkEmployeeDeleted = false;
            departmentTreeView.ExpandNodes(true);
            //delete = 0;// chon tim kiem theo danh sach nhan vien dang lam viec
            if (delete == 0)
            {
                dsEmployee = employeeDO.GetEmployeeByDepartmentInsurance((int)departmentTreeView.SelectedNode.Tag);
            }
            else if (delete == 1)
            {
                dsEmployee = employeeDO.GetDeletedEmployeeInsurance((int)departmentTreeView.SelectedNode.Tag);
            }
            PopulateEmployeeListView();

//			btnAdd.Visible = true;
//			btnDelete.Visible = true;
//			btnRestore.Visible = false;
//			btnPermanentDelete.Visible = false;
        }