Beispiel #1
0
 private void SuppierGroupDelete_Click(object sender, EventArgs e)
 {
     if (MessageBoxExtend.messageQuestion("确定删除[" + m_staffGroupName + "]部门信息吗?"))
     {
         if (m_staffRecordCount > 0)
         {
             MessageBoxExtend.messageWarning("[" + m_staffGroupName + "] 删除失败,请先删除下属的员工记录然后重试.");
         }
         else
         {
             StaffOrgStruct.getInctance().delete(StaffOrgStruct.getInctance().getPkeyFromValue(m_staffGroupPkey));
             refreshTreeView();
         }
     }
 }
Beispiel #2
0
        private void processDutyOrgNode(int parentID, TreeNode node)
        {
            string    nodeName = "";
            TreeNode  currentNode;
            ArrayList nodeList = StaffOrgStruct.getInctance().getNodesFormParentID(parentID);

            for (int i = 0; i < nodeList.Count; i++)
            {
                StaffOrgStructTable record = (StaffOrgStructTable)nodeList[i];

                nodeName = AuxiliaryMaterial.getInctance().getAuxiliaryMaterialNameFromPkey("BASE_DEPARTMENT_LIST", record.value);

                currentNode = m_tree.addNode(node, nodeName, 0, 1, Convert.ToString(record.value));
                processDutyOrgNode(record.pkey, currentNode);
            }
        }
Beispiel #3
0
        private void SuppierGroupAdd_Click(object sender, EventArgs e)
        {
            ArrayList tables = new ArrayList();

            tables.Add("BASE_DEPARTMENT_LIST");

            FormBaseAuxiliaryMaterial fbam = new FormBaseAuxiliaryMaterial(tables, "部门信息管理", true);

            fbam.ShowDialog();

            StaffOrgStructTable userOrgStructData = new StaffOrgStructTable();

            userOrgStructData.value      = fbam.getSelectRecordPkey();
            userOrgStructData.parentPkey = StaffOrgStruct.getInctance().getPkeyFromValue(m_staffGroupPkey);

            if (userOrgStructData.value != 0)
            {
                StaffOrgStruct.getInctance().insert(userOrgStructData);
                refreshTreeView();
            }
        }
Beispiel #4
0
        private SortedDictionary <int, StaffTable> getCurrentNodeAllChildNodesStaff()
        {
            SortedDictionary <int, StaffTable> staffList       = new SortedDictionary <int, StaffTable>();
            SortedDictionary <int, int>        childNodeValues = StaffOrgStruct.getInctance().getAllChildNodeValue(m_staffGroupPkey);

            if (!childNodeValues.ContainsKey(m_staffGroupPkey))
            {
                childNodeValues.Add(m_staffGroupPkey, m_staffGroupPkey);
            }

            foreach (KeyValuePair <int, int> index in childNodeValues)
            {
                SortedDictionary <int, StaffTable> temp = Staff.getInctance().getStaffInfoFromDepartmentPkey(index.Value);

                foreach (KeyValuePair <int, StaffTable> i in temp)
                {
                    StaffTable staff = new StaffTable();
                    staffList.Add(staffList.Count, (StaffTable)i.Value);
                }
            }

            return(staffList);
        }