Exemple #1
0
        private void processDutyOrgNodeSupplier(int parentID, TreeNode node)
        {
            string    nodeName = "";
            TreeNode  currentNode;
            ArrayList nodeList = SupplierOrgStruct.getInctance().getNodesFormParentID(parentID);

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

                nodeName = SupplierType.getInctance().getSupplierTypeNameFromPkey(record.value);

                currentNode = m_tree.addNode(node, nodeName, 0, 1, Convert.ToString(record.value));
                processDutyOrgNodeSupplier(record.pkey, currentNode);
            }
        }
Exemple #2
0
        private void addSupplierType()
        {
            SupplierTypeTable supplierType = new SupplierTypeTable();

            supplierType.name = this.textBoxSupplierGroupName.Text.ToString();
            supplierType.desc = this.textBoxSupplierGroupDesc.Text.ToString();

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

            SupplierType.getInctance().insert(supplierType);


            // 供应商组织结构
            SupplierOrgStructTable supplierOrgInfo = new SupplierOrgStructTable();

            supplierOrgInfo.parentPkey = SupplierOrgStruct.getInctance().getPkeyFromValue(m_supplierGroupPkey);
            supplierOrgInfo.value      = SupplierType.getInctance().getMaxPkey();
            SupplierOrgStruct.getInctance().insert(supplierOrgInfo);
        }