Esempio n. 1
0
        private void processDutyOrgNode(int parentID, TreeNode node)
        {
            string    nodeName = "";
            TreeNode  currentNode;
            ArrayList nodeList = CustomerOrgStruct.getInctance().getNodesFormParentID(parentID);

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

                nodeName = CustomerType.getInctance().getCustomerTypeNameFromPkey(record.value);

                currentNode = m_tree.addNode(node, nodeName, 0, 1, Convert.ToString(record.value));
                processDutyOrgNode(record.pkey, currentNode);
            }
        }
Esempio n. 2
0
        private void addCustomerType()
        {
            CustomerTypeTable customerType = new CustomerTypeTable();

            customerType.name = this.textBoxCustomerGroupName.Text.ToString();
            customerType.desc = this.textBoxCustomerGroupDesc.Text.ToString();

            if (customerType.name.Length == 0)
            {
                MessageBoxExtend.messageWarning("组名称不能为空,请重新填写!");
                return;
            }

            CustomerType.getInctance().insert(customerType);


            // 客户组织结构
            CustomerOrgStructTable customerOrgInfo = new CustomerOrgStructTable();

            customerOrgInfo.parentPkey = CustomerOrgStruct.getInctance().getPkeyFromValue(m_customerGroupPkey);
            customerOrgInfo.value      = CustomerType.getInctance().getMaxPkey();
            CustomerOrgStruct.getInctance().insert(customerOrgInfo);
        }