private void BindQuickStartInformation(int companyId, int opportunityID) { QuickStartRepository quickStartRepository = new QuickStartRepository(); DataSet ds = new DataSet(); ds = quickStartRepository.GetQuickStartInformationByCompanyandOpportunityIDs(companyId, opportunityID); //dvQuickStart.DataSource = ds; //dvQuickStart.DataBind(); }
public void GetQuickStartInformation() { //Now get the details QuickStartRepository quickStartRepository = new QuickStartRepository(); DataSet ds = new DataSet(); ds = quickStartRepository.GetQuickStartInformationByCompanyandOpportunityIDs(int.Parse(ddlCompany.SelectedValue), int.Parse(ddlOpportunity.SelectedValue)); txtCompName.Text = ds.Tables[0].Rows[0]["COMPANYNAME"].ToString(); txtFirstName.Text = ds.Tables[0].Rows[0]["PrimaryContactFirstName"].ToString(); txtLastName.Text = ds.Tables[0].Rows[0]["PrimaryContactLastName"].ToString(); txtPhone.Text = ds.Tables[0].Rows[0]["PrimaryContactPhone"].ToString(); txtEmail.Text = ds.Tables[0].Rows[0]["PrimaryContactEmail"].ToString(); txtOppName.Text = ds.Tables[0].Rows[0]["Name"].ToString(); txtSalesRepLastName.Text = ds.Tables[0].Rows[0]["SALESREPLASTNAME"].ToString(); txtSalesRepFirstName.Text = ds.Tables[0].Rows[0]["SALESREPFIRSTNAME"].ToString(); txtPain.Text = ds.Tables[0].Rows[0]["Pain"].ToString(); txtLengthOfProblem.Text = ds.Tables[0].Rows[0]["LengthOfProblem"].ToString(); txtAlternatives.Text = ds.Tables[0].Rows[0]["Alternatives"].ToString(); txtCostToFix.Text = ds.Tables[0].Rows[0]["CostToFix"].ToString(); if (ds.Tables[0].Rows[0]["IsBudgeIdentified"] != null && ds.Tables[0].Rows[0]["IsBudgeIdentified"] != "") { if (ds.Tables[0].Rows[0]["IsBudgeIdentified"].ToString() == "True") ddlBudgeIdentified.SelectedValue = "1"; else ddlBudgeIdentified.SelectedValue = "0"; } if (ds.Tables[0].Rows[0]["IsMoveForward"] != null && ds.Tables[0].Rows[0]["IsMoveForward"] != "") { if (ds.Tables[0].Rows[0]["IsMoveForward"].ToString() == "True") ddlMoveForward.SelectedValue = "1"; else ddlMoveForward.SelectedValue = "0"; } if (ds.Tables[0].Rows[0]["ProductID"] != null && ds.Tables[0].Rows[0]["ProductID"] != "") { ddlProducts.SelectedValue = ds.Tables[0].Rows[0]["ProductID"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["STATUSID"].ToString())) { ddlOppStatus.SelectedValue = ds.Tables[0].Rows[0]["STATUSID"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["SourceID"].ToString())) { ddlOppSource.SelectedValue = ds.Tables[0].Rows[0]["SourceID"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["TypeID"].ToString())) { ddlOppType.SelectedValue = ds.Tables[0].Rows[0]["TypeID"].ToString(); } if (ds.Tables[0].Rows[0]["IsNewCompany"] != null && ds.Tables[0].Rows[0]["IsNewCompany"] != "") { if (ds.Tables[0].Rows[0]["IsNewCompany"].ToString() == "True") ddlAccount.SelectedValue = "1"; else ddlAccount.SelectedValue = "0"; } if (ds.Tables[0].Rows[0]["ApptSourceId"] != null && ds.Tables[0].Rows[0]["ApptSourceId"] != "") { ddlApptSource.SelectedValue = ds.Tables[0].Rows[0]["ApptSourceId"].ToString(); } if (ds.Tables[0].Rows[0]["IsRegisteredForTraining"] != null && ds.Tables[0].Rows[0]["IsRegisteredForTraining"] != "") { if (ds.Tables[0].Rows[0]["IsRegisteredForTraining"].ToString() == "True") ddlRegForTraining.SelectedValue = "1"; else ddlRegForTraining.SelectedValue = "0"; } if (ds.Tables[0].Rows[0]["CourseId"] != null && ds.Tables[0].Rows[0]["CourseId"].ToString().Trim() != "") { ddlCourse.SelectedValue = ds.Tables[0].Rows[0]["CourseId"].ToString(); } if (ds.Tables[0].Rows[0]["IsNewCompany"] != null && ds.Tables[0].Rows[0]["IsNewCompany"] != "") { if (ds.Tables[0].Rows[0]["IsNewCompany"].ToString() == "True") ddlIsNewCompany.SelectedValue = "1"; else ddlIsNewCompany.SelectedValue = "0"; } if (ds.Tables[0].Rows[0]["IndustryId"] != null && ds.Tables[0].Rows[0]["IndustryId"] != "") { ddlIndustry.SelectedValue = ds.Tables[0].Rows[0]["IndustryId"].ToString(); } txtOpportunityValue.Text = ds.Tables[0].Rows[0]["VALUE"].ToString(); txtActStep.Text = ds.Tables[0].Rows[0]["ACTIONSTEP"].ToString(); CourseTrngDate.Text = ds.Tables[0].Rows[0]["CourseTrainingDate"].ToString(); txtTrngCourseName.Text = ds.Tables[0].Rows[0]["CourseName"].ToString(); txtHowManyAttended.Text = ds.Tables[0].Rows[0]["HowManyAttended"].ToString(); NextContactDate.Text = ds.Tables[0].Rows[0]["NEXT_CONTACT_DATE"].ToString(); OppCloseDate.Text = ds.Tables[0].Rows[0]["CLOSEDATE"].ToString(); txtNotes.Text = ds.Tables[0].Rows[0]["notes"].ToString(); hdnContactID.Value = ds.Tables[0].Rows[0]["ContactID"].ToString(); }