示例#1
0
        public static void Run(string prRegionName)
        {
            RegionForm lcRegionForm;

            if (string.IsNullOrEmpty(prRegionName) ||
                !_RegionFormList.TryGetValue(prRegionName, out lcRegionForm))
            {
                lcRegionForm = new RegionForm();
                if (string.IsNullOrEmpty(prRegionName))
                {
                    lcRegionForm.SetDetails(new ClsRegion());
                }

                else
                {
                    _RegionFormList.Add(prRegionName, lcRegionForm);
                    lcRegionForm.refreshFormFromDB(prRegionName);
                }
            }
            else
            {
                lcRegionForm.Show();
                lcRegionForm.Activate();
            }
        }
示例#2
0
        private void btnEditProperty_Click(object sender, EventArgs e)
        {
            int lcKey = lstProperty.SelectedIndex;

            if (lcKey > 0)
            {
                try
                {
                    RegionForm.Run(lstProperty.SelectedItem as string);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "This should never occur");
                }
            }
        }
示例#3
0
        private void btnViewProp_Click(object sender, EventArgs e)
        {
            string lcKey;

            lcKey = Convert.ToString(lstRegion.SelectedItem);
            if (lcKey != null)
            {
                try
                {
                    RegionForm.Run(lcKey);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "This should never occur");
                }
            }
        }