コード例 #1
0
        private void FormSupplierEdit_Load(object sender, EventArgs e)
        {
            this.textBoxCredit.Text  = "0";
            this.textBoxVatRate.Text = "17";

            if (!m_isAdd)
            {
                this.buttonAdd.Enabled           = false;
                this.buttonSupplierGroup.Enabled = false;

                if (m_isEditSupplier)
                {
                    m_supplier = Supplier.getInctance().getSupplierInfoFromPkey(m_supplierPkey);
                }
                else
                {
                    m_supplierType    = SupplierType.getInctance().getSupplierTypeInfoFromPkey(m_supplierGroupPkey);
                    m_isSupplierGroup = true;
                }

                setPageActiveState();
                setPageActiveValue();
            }

            // 初始化区域下拉框值
            ComboBoxExtend.initComboBox(this.comboBoxArea, "BASE_AREA_LIST");
        }
コード例 #2
0
        private void modifySupplierType()
        {
            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().update(m_supplierGroupPkey, supplierType);
        }
コード例 #3
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);
        }