Exemplo n.º 1
0
        private void BtnMainMod_Click(object sender, RoutedEventArgs e)
        {
            //TreeListNode item = tvMain.SelectedItem as TreeListNode;
            //if ((item == null) || (item.Tag.ToString() == ""))
            //{
            //    gridItem.ItemsSource = null;
            //    return;
            //}
            //SysEnumMain m_SysEnumMain = item.Tag as SysEnumMain;

            SysEnumMain m_SysEnumMain = tvMain.SelectedItem as SysEnumMain;

            if ((m_SysEnumMain == null) || (string.IsNullOrEmpty(m_SysEnumMain.PKNO)))
            {
                return;
            }

            if (CBaseData.LoginNO != CBaseData.ADMINPKNO)
            {
                if (m_SysEnumMain.ENUM_STATE != 0)
                {
                    System.Windows.Forms.MessageBox.Show("非管理员不能更改该基础信息主信息", "维护主信息", MessageBoxButtons.OK,
                                                         MessageBoxIcon.Information);
                    return;
                }
            }

            EnumMainEdit mainEdit = new EnumMainEdit(m_SysEnumMain);

            mainEdit.ShowDialog();

            GetMainData();
        }
Exemplo n.º 2
0
        private void BtnMainAdd_Click(object sender, RoutedEventArgs e)
        {
            SysEnumMain main = new SysEnumMain()
            {
                PKNO         = "",
                COMPANY_CODE = "",
                ENUM_TYPE    = 0,
                VALUE_FIELD  = 0,
                USE_FLAG     = 0,
            };
            EnumMainEdit mainEdit = new EnumMainEdit(main);

            mainEdit.ShowDialog();

            GetMainData();
        }