Exemple #1
0
        private void portfolioBtn_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.isNewRow(((DataRowView)myMasterSource.Current).Row))
                {
                    common.system.ShowMessage(Languages.Libs.GetString("pleaseSaveBeforeContinue"));
                    return;
                }
                databases.baseDS.investorRow investorRow = (databases.baseDS.investorRow)((DataRowView)myMasterSource.Current).Row;
                portfolioEdit form = portfolioEdit.GetForm();
                if (form == null)
                {
                    return;
                }
                if (this.myOnPortfolioChanged != null)
                {
                    form.myOnDataChanged += new onDataChanged(this.myOnPortfolioChanged);
                }

                form.myInvestorCode = investorRow.code;
                if (this.myDockedPane != null)
                {
                    form.Show(this.myDockedPane);
                }
                else
                {
                    form.ShowDialog();
                }
            }
            catch (Exception er)
            {
                this.ShowError(er);
            }
        }
Exemple #2
0
 public static portfolioEdit GetForm()
 {
     string cacheKey = typeof(portfolioEdit).FullName;
     portfolioEdit form = (portfolioEdit)common.Data.dataCache.Find(cacheKey);
     if (form != null && !form.IsDisposed) return form;
     form = new portfolioEdit();
     common.Data.dataCache.Add(cacheKey, form);
     return form;
 }
 public static portfolioEdit GetForm()
 {
     string cacheKey = typeof(portfolioEdit).FullName;
     portfolioEdit form = (portfolioEdit)common.Data.dataCache.Find(cacheKey);
     if (form != null && !form.IsDisposed) return form;
     form = new portfolioEdit();
     common.Data.dataCache.Add(cacheKey, form);
     return form;
 }