/// <summary> /// /// </summary> /// <param name="mf"></param> /// <param name="accountId"></param> /// <param name="Close"></param> public frmAdvisor(frmMain mf, VSP.Business.Entities.Advisor planAdvisor, FormClosedEventHandler Close = null) { frmSplashScreen ss = new frmSplashScreen(); ss.Show(); Application.DoEvents(); InitializeComponent(); frmMain_Parent = mf; this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size; Application.AddMessageFilter(this); controlsToMove.Add(this.pnlSummaryTabHeader); controlsToMove.Add(this.panel16); controlsToMove.Add(this.label1); controlsToMove.Add(this.label23); FormClosed += Close; DataIntegrationHub.Business.Entities.PlanAdvisor dihPA = new DataIntegrationHub.Business.Entities.PlanAdvisor(planAdvisor.Id); CurrentPlanAdvisor = planAdvisor; txtName.Text = dihPA.Name; cboServicesView.SelectedIndex = 0; LoadDgvServices(true); ss.Close(); this.Show(); }
private void dgvPlanAdvisors_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int index = dgvPlanAdvisors.CurrentRow.Index; Guid planAdvisorId = new Guid(dgvPlanAdvisors.Rows[index].Cells["PlanAdvisorId"].Value.ToString()); VSP.Business.Entities.Advisor planAdvisor = new VSP.Business.Entities.Advisor(planAdvisorId); frmAdvisor frmPlanAdvisor = new frmAdvisor(this, planAdvisor); frmPlanAdvisor.FormClosed += frmPlanAdvisor_FormClosed; }
public static DataTable GetAssociated(Advisor planAdvisor) { string sql = @"SELECT * FROM " + _tableName + " WHERE PlanAdvisorId = '" + planAdvisor.Id + "'"; return(Access.VspDbAccess.ExecuteSqlQuery(sql)); }