private void UpdateQuickStartInformation() { QuickStartRepository quickStartRepositoryUpdate = new QuickStartRepository(); quickStartRepositoryUpdate.UpdateQuickStartRecord(txtCompName.Text, txtFirstName.Text, txtLastName.Text, txtPhone.Text, txtEmail.Text, txtOppName.Text, txtSalesRepLastName.Text, txtSalesRepFirstName.Text, txtPain.Text, txtLengthOfProblem.Text, txtAlternatives.Text, txtCostToFix.Text, int.Parse(ddlBudgeIdentified.SelectedValue), int.Parse(ddlMoveForward.SelectedValue), int.Parse(ddlProducts.SelectedValue), int.Parse(ddlOppStatus.SelectedValue), int.Parse(ddlOppSource.SelectedValue), int.Parse(ddlOppType.SelectedValue), txtOpportunityValue.Text, txtActStep.Text, int.Parse(ddlAccount.SelectedValue), int.Parse(ddlApptSource.SelectedValue), int.Parse(ddlRegForTraining.SelectedValue), int.Parse(ddlCourse.SelectedValue), DateTime.Now, //DateTime.ParseExact(CourseTrngDate.Text, "M/d/yyyy h:mm:ss tt", CultureInfo.InvariantCulture), txtTrngCourseName.Text, txtHowManyAttended.Text, int.Parse(ddlIsNewCompany.SelectedValue), int.Parse(ddlIndustry.SelectedValue), DateTime.Now,//DateTime.ParseExact(NextContactDate.Text, "M/d/yyyy h:mm:ss tt", CultureInfo.InvariantCulture), //DateTime.ParseExact(OppCloseDate.Text, "M/d/yyyy h:mm:ss tt", CultureInfo.InvariantCulture), DateTime.Now, txtNotes.Text, CurrentUser, int.Parse(ddlCompany.SelectedValue), int.Parse(ddlOpportunity.SelectedValue), int.Parse(hdnContactID.Value)); //DateTime.ParseExact(NextContactDate, "yyyyMMddHHmm", CultureInfo.InvariantCulture); lblResult.Text = "Data updated successfully"; }
private void Binddropdowns() { QuickStartRepository quickStartRepository = new QuickStartRepository(); OpprtunityStatusRepository oppStatusRep = new OpprtunityStatusRepository(); OpprtunitySourceRepository oppSourceRep = new OpprtunitySourceRepository(); OpprtunityTypesRepository oppTypesRep = new OpprtunityTypesRepository(); CompaniesRepository companiesRep = new CompaniesRepository(); ContactsRepository contactsRep = new ContactsRepository(); ddlBudgeIdentified.DataSource = quickStartRepository.GetYesNoOptions(); ddlBudgeIdentified.DataBind(); ddlMoveForward.DataSource = quickStartRepository.GetYesNoOptions(); ddlMoveForward.DataBind(); ddlOppStatus.DataSource = oppStatusRep.GetAll(); ddlOppStatus.DataBind(); ListItem selectItemddlOppStatus = new ListItem("--Select Opportunity Status--", "0"); ddlOppStatus.Items.Insert(0, selectItemddlOppStatus); ddlOppSource.DataSource = oppSourceRep.GetAll(); ddlOppSource.DataBind(); ListItem selectItemddlOppSource = new ListItem("--Select Opportunity Source--", "0"); ddlOppSource.Items.Insert(0, selectItemddlOppSource); ddlOppType.DataSource = oppTypesRep.GetAll(); ddlOppType.DataBind(); ListItem selectItemddlOppType = new ListItem("--Select Opportunity Type--", "0"); ddlOppType.Items.Insert(0, selectItemddlOppType); ddlAccount.DataSource = companiesRep.GetNewItemOptions(); ddlAccount.DataBind(); ddlIsNewCompany.DataSource = companiesRep.GetNewItemOptions(); ddlIsNewCompany.DataBind(); ddlApptSource.DataSource = contactsRep.GetApptSourceOptions(); ddlApptSource.DataBind(); ListItem selectItem = new ListItem("--Select Appointment Source--", "0"); ddlApptSource.Items.Insert(0, selectItem); ddlRegForTraining.DataSource = contactsRep.GetRegForTrainingOptions(); ddlRegForTraining.DataBind(); ddlCourse.DataSource = contactsRep.GetCourseInfo(); ddlCourse.DataBind(); ListItem selectItemddlCourse = new ListItem("--Select Course Type--", "0"); ddlCourse.Items.Insert(0, selectItemddlCourse); ddlIndustry.DataSource = companiesRep.GetAllIndustries(); ddlIndustry.DataBind(); ListItem selectItemddlIndustry = new ListItem("--Select Industry--", "0"); ddlIndustry.Items.Insert(0, selectItemddlIndustry); ddlProducts.DataSource = quickStartRepository.GetProductTypeByRole(CurrentUser); ddlProducts.DataBind(); ListItem selectItemddlProducts = new ListItem("--Select Product--", "0"); ddlProducts.Items.Insert(0, selectItemddlProducts); }
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(); }