public static void Run(string prComponentName)
        {
            FrmComponent lcComponentForm;

            if (string.IsNullOrEmpty(prComponentName) ||
                !_ComponentFormList.TryGetValue(prComponentName, out lcComponentForm))
            {
                lcComponentForm = new FrmComponent();
                if (string.IsNullOrEmpty(prComponentName))
                {
                    lcComponentForm.SetDetails(new clsComponent());
                }
                else
                {
                    _ComponentFormList.Add(prComponentName, lcComponentForm);
                    lcComponentForm.refreshFormFromDB(prComponentName);
                }
            }
            else
            {
                lcComponentForm.ShowDialog();
                lcComponentForm.Activate();
            }
        }
Example #2
0
 private void btnOpen_Click(object sender, EventArgs e)
 {
     FrmComponent.Run(lstCategorys.SelectedItem as string);
     // this.Hide();
 }