protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if(!string.IsNullOrEmpty(PreviousPageId)) hypBack.NavigateUrl= "ManagePdfTemplate.aspx?id="+PreviousPageId; if (Request.QueryString["id"] != null) { #region Add Quetions.... using (var dataContext = new nChangerDb()) { var id = Guid.Parse(Request.QueryString["id"]); var provinceCategoryId = dataContext.PdfFormTemplates.Find(id).ProvinceCategoryId; _generalQuestions = from x in _dataContext.DefineQuestions.Where(x => x.ProvinceCategoryId.Equals(provinceCategoryId)) select x.ProvinceCategory.Category + " | " + x.Question; Session.Add("GEN_QUESTION", _generalQuestions); } #endregion.... if (Request.QueryString["active"] == "False")//Add Mode LoadPdfData(); else if (Request.QueryString["active"] == "True")//Edit Display(Guid.Parse(Request.QueryString["id"])); } } }
private void LoadPdfData() { try { using (var dataContext=new nChangerDb()) { var pdfFormTemplate = dataContext.PdfFormTemplates.Find(Guid.Parse(Request.QueryString["id"])); if (pdfFormTemplate != null) { txtTemplateName.Text = pdfFormTemplate.TemplateName; hypPdf.Text = pdfFormTemplate.PdfFileName; hypPdf.NavigateUrl = @"../Pdf/" + pdfFormTemplate.PdfFileName; txtComments.Text = pdfFormTemplate.Comments; if (Convert.ToString(Request.QueryString["active"]).Equals("False")) ReadPdfFields(); } } } catch (Exception exception) { throw new Exception(exception.Message); } }
private string Submit(string id) { string message; try { if (CommonFunctions.CheckIfUserExists(id, id,out message, "GU")) { using (var dataContext = new nChangerDb()) { var user = dataContext.Users.FirstOrDefault( u => u.Email.ToLower().Equals(id) || u.UserId.ToLower().Equals(id)); if (user != null) { user.VerificationCode = Guid.NewGuid().ToString().ToLower(); dataContext.Users.AddOrUpdate(user); dataContext.SaveChanges(); if (SendRecoveryMail(user)) message = "An email has been sent to you with instructions to reset your password."; else message = "There was a problem sending recovery email. Please try again in some time or contact administrator."; } } } } catch (Exception ex) { message = ex.Message; } return message; }
private void BindCateory(Guid provinceId = default(Guid)) { var guidIsEmpty = provinceId == Guid.Empty; using (var dataContext = new nChangerDb()) { var categoryList = dataContext.ProvinceCategories.ToList(); if (!guidIsEmpty) { categoryList = categoryList.Where(p => p.ProvinceId.Equals(provinceId)).ToList(); if(Request.QueryString["id"]!=null) ddlProvince.CssClass = "ui normal selection dropdown disabled"; lblCurrentProvince.Text = dataContext.Provinces.Find(provinceId).ProvinceName; ddlProvince.Items.FindByValue(provinceId.ToString()).Selected = true; lblCaption.InnerHtml = lblCurrentProvince.Text + " >> Category List."; } else lblCaption.InnerHtml = lblCurrentProvince.Text + "Category List."; if (categoryList.Count > 0) { var dtSearch = CommonFunctions.ToDataTable<ProvinceCategory>(categoryList); if (dtSearch != null) { Session.Add("GetDataTable", dtSearch); ucPaging.BindPaging(gvProvinceCategory, dtSearch, ucPaging.PageNo, "txt", Convert.ToString(ViewState["sortDirection"]), Convert.ToString(ViewState["sortColumn"])); BindBottomPaging(ucPaging, ucPaging1); } } } }
private void UpdateGeneratedPdf(FileInfo fileInfo) { var id = Guid.Parse(RecordId); var pdfFormTemplateid = Guid.Parse(CurrentId); using (var dataContext=new nChangerDb()) { var dbEntry = dataContext.GeneratedPdfs.Find(id); if (dbEntry != null) { dataContext.GeneratedPdfs.Remove(dbEntry); dataContext.SaveChanges(); } dataContext.GeneratedPdfs.AddOrUpdate(new GeneratedPdf { Id=id, PdfFormTemplateId = pdfFormTemplateid, UserId = UserId, CompletedPdf ="../Output/"+Path.GetFileName(fileInfo.Name), EntryDate = DateTime.Now, EntryIP = CommonFunctions.GetIpAddress(), EntryId= UserId, IsActive=true }); dataContext.SaveChanges(); } }
private void DrawControls() { try { var id = Guid.Parse(CurrentId); using (var dataContext = new nChangerDb()) { var pdfFoemTemplate = dataContext.PdfFormTemplates.Find(id); var questions = pdfFoemTemplate.ProvinceCategory.DefineQuestions.OrderBy(q => q.EntryDate); foreach (var question in questions) { switch (question.QuestionType) { case "txt": GenerateTextBox(question); break; case "rdb": GenerateRadioButton(question); break; case "ddl": GenerateDropdown(question); break; } } } } catch (Exception exception) { throw new Exception(exception.Message); } }
private void Display() { try { var id = Guid.Parse(RecordId); hypBack.NavigateUrl = "../Forms/frmONPersonalInfo.aspx?id=" + RecordId; using (var dataContext = new nChangerDb()) { var parentInformation = dataContext.ParentInformations.Find(id); if (parentInformation != null) { txtFatherFirstName.Text = parentInformation.FatherFirstName; txtFatherMiddleName.Text = parentInformation.FatherMiddleName; txtFatherLastName.Text = parentInformation.FatherLastName; txtFatherLastNameOther.Text = parentInformation.FatherOtherLastName; txtMotherFirstName.Text = parentInformation.MotherFirstName; txtMotherMiddleName.Text = parentInformation.MotherMiddleName; txtMotherLastNameBorn.Text = parentInformation.MotherLastNameWhenBorn; txtMotherLastNamePresent.Text = parentInformation.MotherLastNamePresent; txtMotherLastNameOther.Text = parentInformation.MotherLastNameOther; } } } catch (Exception) { } }
private void BindProvince() { using (var dataContext = new nChangerDb()) { BindDropdownList(ddlProvince, dataContext.Provinces.ToList(), "Id", "ProvinceName"); } }
private void Display() { ddlCountry.DataSource = CommonFunctions.GetCountriesList(); ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "Select"); try { hypBack.NavigateUrl = "../Forms/frmParentInformation.aspx?id=" + CurrentId; var id = Guid.Parse(RecordId); using (var dataContext = new nChangerDb()) { var nameChangeInformation = dataContext.NameChangeInformations.Find(id); if (nameChangeInformation != null) { txtResonForNameChange.Text = nameChangeInformation.ResonForNameChange; if (!string.IsNullOrEmpty(nameChangeInformation.ChangedNamePriviously)) rdListChangedNamePriviously.Items.FindByValue( nameChangeInformation.ChangedNamePriviously).Selected = true; if (nameChangeInformation.PreviousNameChangeMonth > 0 && nameChangeInformation.PreviousNameChangeDay > 0 && nameChangeInformation.PreviousNameChangeYear > 0) { DateTime dt = new DateTime(nameChangeInformation.PreviousNameChangeYear.Value, nameChangeInformation.PreviousNameChangeMonth.Value, nameChangeInformation.PreviousNameChangeDay.Value); txtPreviousNameChangeDate.Text = dt.ToString("MM/dd/yyyy"); } txtPreviousFirstName.Text = nameChangeInformation.PreviousFirstName; txtPreviousMiddleName.Text= nameChangeInformation.PreviousMiddleName; txtPreviousLastName.Text = nameChangeInformation.PreviousLastName; txtFirstNameAfterChange.Text = nameChangeInformation.FirstNameAfterChange; txtMiddleNameAfterChange.Text = nameChangeInformation.MiddleNameAfterChange; txtLastNameAfterChange.Text = nameChangeInformation.LastNameAfterChange; txtPreviousNameChangeProvince.Text = nameChangeInformation.PreviousNameChangeProvince; if (!string.IsNullOrEmpty(nameChangeInformation.PreviousNameChangeCountry)) ddlCountry.Items.FindByValue(nameChangeInformation.PreviousNameChangeCountry) .Selected = true; if(nameChangeInformation.AppliedForChangeAndRefused != null && nameChangeInformation.AppliedForChangeAndRefused.Value) rdLstAppliedForChangeAndRefused.SelectedIndex = 0; else rdLstAppliedForChangeAndRefused.SelectedIndex = 1; } } } catch (Exception) { } }
private void Display() { try { using (var dataContext = new nChangerDb()) { var id = Guid.Parse(RecordId); var criminalOffenceInformation = dataContext.CriminalOffenceInformations.Find(id); if (criminalOffenceInformation != null) { hypBack.NavigateUrl = "../Forms/frmNameChangeInformation.aspx"; rdLstOutstandingCourtProceedings.SelectedIndex = criminalOffenceInformation.OutstandingCourtProceedings ? 0 : 1; txtCourtFileNumber.Text = criminalOffenceInformation.CourtFileNumber; txtCourtName.Text = criminalOffenceInformation.CourtName; txtCourtAddress.Text = criminalOffenceInformation.CourtAddress; txtDescribeProceedings.Text = criminalOffenceInformation.DescribeProceedings; rdLstOutstandingEnforcementOrders.SelectedIndex = criminalOffenceInformation.OutstandingEnforcementOrders ? 0 : 1; txtDetailsOfOutstandingEnforcementOrders.Text = criminalOffenceInformation.DetailsOfOutstandingEnforcementOrders; rdLstEverConvictedOfCriminalOffence.SelectedIndex = criminalOffenceInformation.EverConvictedOfCriminalOffence ? 0 : 1; txtDetailsOfCriminalOffence.Text = criminalOffenceInformation.DetailsOfCriminalOffence; rdLstFoundGuiltyDischarged.SelectedIndex = criminalOffenceInformation.FoundGuiltyDischarged ? 0 : 1; txtFoundGuiltyDetailsOfOffence.Text = criminalOffenceInformation.FoundGuiltyDetailsOfOffence; rdLstAdultSentenceImposed.SelectedIndex = criminalOffenceInformation.AdultSentenceImposed ? 0 : 1; txtDescribeAdultSentence.Text = criminalOffenceInformation.DescribeAdultSentence; rdLstPendingCharges.SelectedIndex = criminalOffenceInformation.PendingCharges ? 0 : 1; txtPendingChargesCourtNumber.Text = criminalOffenceInformation.PendingChargesCourtNumber; txtPendingChargesCourtName.Text = criminalOffenceInformation.PendingChargesCourtName; txtPendingChargesCourtAddress.Text = criminalOffenceInformation.PendingChargesCourtAddress; txtPendingChargesDescribe.Text = criminalOffenceInformation.PendingChargesDescribe; } } } catch (Exception) { } }
public string GetAnswerText(Guid id) { var dataContext = new nChangerDb(); var pdfFormTemplateId = Guid.Parse(CurrentId); return (from g in dataContext.GeneralQuestionUserResponses where g.DefineQuestionId.Equals(id) && g.PdfFormTemplateId.Equals(pdfFormTemplateId) && g.UserId.Equals(UserId) select g.UserAnswer).SingleOrDefault(); }
public bool Submit(out string returnMessage) { returnMessage = string.Empty; var success = true; try { var message = string.Empty; if (CommonFunctions.CheckIfUserExists(txtEmailId.Text, txtUserId.Text, out message,"GU")) { returnMessage = message; return false; } using (var dataContext = new nChangerDb()) { var dbEntry = new User { Id = Guid.NewGuid(), UserTypeId="GU", UserId = txtUserId.Text, Email = txtEmailId.Text, Password = txtPassword.Text, FirstName = txtFirstName.Text, MiddleName = txtMiddleName.Text, LastName = txtLastName.Text, Phone = txtPhone.Text, City = txtCity.Text, State = ddlState.SelectedIndex == -1 ? txtState.Text : ddlState.SelectedValue, Zip = txtZipCode.Text, Country = ddlCountry.SelectedValue, Address = txtAddressLine1.Text, Address2 = txtAddressLine2.Text, IP = CommonFunctions.GetIpAddress(), IsActive = false, EmailVerified = false, VerificationCode = Guid.NewGuid().ToString(), RegistrationDate = DateTime.Now }; dataContext.Users.Add(dbEntry); dataContext.SaveChanges(); _queryId = dbEntry.UserId; AddUserPackage(_queryId); returnMessage = SendRegistrationMail(dbEntry) ? "SUCCESS" : "MAIL_ERROR"; } } catch (DbEntityValidationException ex) { success = false; returnMessage = ex.EntityValidationErrors.SelectMany(eve => eve.ValidationErrors).Aggregate(returnMessage, (current, ve) => current + (ve.PropertyName + " Error Msg:" + ve.ErrorMessage)); } return success; }
public CascadingDropDownNameValue[] GetProvinceList(string knownCategoryValues, string category) { var values = new List<CascadingDropDownNameValue>(); using (var dataContext=new nChangerDb()) { var listProvices = dataContext.Provinces.ToList(); values.AddRange(from provice in listProvices let id = provice.Id let name = provice.ProvinceName select new CascadingDropDownNameValue(name, id.ToString())); } return values.ToArray(); }
protected void Page_Load(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "$('.date-input').datepicker();", true); if (!IsPostBack) { using (var dataContext=new nChangerDb()) { BindDropdownList(ddlPackage,dataContext.Packages.OrderBy(p => p.PackageName).ToList(),"Id", "PackageName"); } BindGrid(); } }
private void BindDropdowns() { using (var dataContext = new nChangerDb()) { ddlCountry.DataSource = dataContext.Countries.ToList(); ddlCountry.DataTextField = "CountryName"; ddlCountry.DataValueField = "CountryId"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, new ListItem("--SELECT--", "SEL")); } }
public CascadingDropDownNameValue[] GetProvinceCategoryList(string knownCategoryValues, string category) { var provId = knownCategoryValues.Substring(knownCategoryValues.IndexOf(":", StringComparison.Ordinal) + 1); provId = provId.Substring(0, provId.Length - 1); var id = Guid.Parse(provId); var values = new List<CascadingDropDownNameValue>(); using (var dataContext = new nChangerDb()) { var listCategories = dataContext.ProvinceCategories.Where(p => p.ProvinceId.Equals(id)).OrderBy(p => p.Category).ToList(); values.AddRange(from provinceCategory in listCategories let pid = provinceCategory.Id.ToString() let category1 = provinceCategory.Category select new CascadingDropDownNameValue(category1, pid)); } return values.ToArray(); }
private void BindFeaturesList() { using (var dataContext = new nChangerDb()) { var featureList = dataContext.FeatureMasters.Where(f => f.IsActive).OrderBy(f => f.Feature).ToList(); if (featureList.Count > 0) { chkFeatures.DataSource = featureList; chkFeatures.DataTextField = "Feature"; chkFeatures.DataValueField = "Id"; chkFeatures.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (var dataContext = new nChangerDb()) { var eligibilityCriteria = dataContext.EligibilityCriterias.FirstOrDefault(); if (eligibilityCriteria != null) { lblCriteriaHeading.Text = eligibilityCriteria.CriteriaHeading; divCriteria.InnerHtml = eligibilityCriteria.Criteria; } } } }
protected void ddlProvince_OnSelectedIndexChanged(object sender, EventArgs e) { if (ddlProvince.SelectedIndex == 0) { ddlCategory.Items.Clear(); return; } using (var dataContext = new nChangerDb()) { var id = Guid.Parse(ddlProvince.SelectedValue); BindDropdownList(ddlCategory, dataContext.ProvinceCategories.Where(p => p.ProvinceId.Equals(id)).ToList(), "Id", "Category"); } ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "$('.ui.fluid.search.selection.dropdown').dropdown();", true); }
private void BindDropdown() { using (var dataContext = new nChangerDb()) { BindDropdownList(ddlProvince,dataContext.Provinces.ToList(),"Id", "ProvinceName"); BindDropdownList(ddlProvinceAdd, dataContext.Provinces.ToList(), "Id", "ProvinceName"); if (Request.QueryString["id"] != null) { ddlProvinceAdd.ClearSelection(); ddlProvinceAdd.Items.FindByValue(Request.QueryString["id"]).Selected = true; ddlProvinceAdd.CssClass = "ui normal selection dropdown disabled"; } else ddlProvinceAdd.CssClass = "ui normal selection dropdown"; } }
private void BindFeatures() { using (var dataContext = new nChangerDb()) { var featureList = dataContext.FeatureMasters.ToList(); var dtSearch = CommonFunctions.ToDataTable<FeatureMaster>(featureList); if (dtSearch != null) { Session.Add("GetDataTable", dtSearch); ucPaging.BindPaging(gvFeature, dtSearch, ucPaging.PageNo, "txt", Convert.ToString(ViewState["sortDirection"]), Convert.ToString(ViewState["sortColumn"])); BindBottomPaging(ucPaging, ucPaging1); } } }
private void BindTemplates() { var id = Guid.Empty; if (Request.QueryString["id"] != null) id = Guid.Parse(Request.QueryString["id"]); else if (Request.UrlReferrer != null) { if(!Request.UrlReferrer.AbsoluteUri.Contains("ManagePdfTemplate.aspx")) divWrapper.Style.Add(HtmlTextWriterStyle.Display, "none"); else divWrapper.Style.Add(HtmlTextWriterStyle.Display, "block"); if (!string.IsNullOrEmpty(Request.UrlReferrer.Query)) { if (Request.UrlReferrer.Query.Contains("=") && Request.UrlReferrer.Query.Contains("&")) id = Guid.Parse(ExtractFromString(Request.UrlReferrer.Query, "=", "&")[0]); } } using (var dataContext = new nChangerDb()) { var templateList = dataContext.PdfFormTemplates.ToList(); if (Guid.Empty != id) templateList = templateList.Where(p => p.ProvinceCategoryId.Equals(id)).ToList(); if (templateList.Count != 0) { gvTemplate.Visible = true; var dtSearch = CommonFunctions.ToDataTable<PdfFormTemplate>(templateList); if (dtSearch != null) { Session.Add("GetDataTable", dtSearch); ucPaging.BindPaging(gvTemplate, dtSearch, ucPaging.PageNo, "txt", Convert.ToString(ViewState["sortDirection"]), Convert.ToString(ViewState["sortColumn"])); BindBottomPaging(ucPaging, ucPaging1); } } else { gvTemplate.Visible = false; } } }
private void BindForms() { using (var dataContext = new nChangerDb()) { var lst = dataContext.GeneratedPdfs.Where( u => u.UserId.Equals(UserId)) .ToList(); if (lst.Count>0) { gvTemplate.DataSource = lst; gvTemplate.DataBind(); } } }
private void BindGrid() { using (var dataContext=new nChangerDb()) { var paymentList = dataContext.UserPayments.ToList(); if (paymentList.Count > 0) { if (!string.IsNullOrEmpty(txtUserId.Text)) paymentList = paymentList.Where(p => p.UserId.Equals(txtUserId.Text)).ToList(); if (ddlPackage.SelectedIndex != 0 && ddlPackage.SelectedIndex != -1) { var id = Guid.Parse(ddlPackage.SelectedValue); paymentList = paymentList.Where(p => p.PackageId.Equals(id)).ToList(); } if (ddlStatus.SelectedIndex != 0 && ddlStatus.SelectedIndex != -1) paymentList = paymentList.Where(p => p.Status.Equals(ddlStatus.SelectedValue)).ToList(); if (!string.IsNullOrEmpty(txtImportDtFrom.Text)) { var importDtFrom = Convert.ToDateTime(txtImportDtFrom.Text).Date; paymentList = paymentList.Where(p => p.PaymentDate.Date >= importDtFrom).ToList(); } if (!string.IsNullOrEmpty(txtImportDtTo.Text)) { var importDtTo = Convert.ToDateTime(txtImportDtTo.Text).Date; paymentList = paymentList.Where(p => p.PaymentDate.Date <= importDtTo).ToList(); } var dtSearch = CommonFunctions.ToDataTable<UserPayment>(paymentList); if (dtSearch != null) { Session.Add("GetDataTable", dtSearch); ucPaging.BindPaging(gvPayment, dtSearch, ucPaging.PageNo, "txt", Convert.ToString(ViewState["sortDirection"]), Convert.ToString(ViewState["sortColumn"])); BindBottomPaging(ucPaging, ucPaging1); } } } }
private void BindTemplates() { using (var dataContext = new nChangerDb()) { var templateList = dataContext.PdfTemplates.ToList(); if (templateList.Count != 0) { var dtSearch = CommonFunctions.ToDataTable<PdfTemplate>(templateList); if (dtSearch != null) { Session.Add("GetDataTable", dtSearch); ucPaging.BindPaging(gvTemplate, dtSearch, ucPaging.PageNo, "txt", Convert.ToString(ViewState["sortDirection"]), Convert.ToString(ViewState["sortColumn"])); BindBottomPaging(ucPaging, ucPaging1); } } } }
protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e) { if (ddlCategory.SelectedIndex != 0 && ddlCategory.SelectedIndex != -1) { using (var dataContext = new nChangerDb()) { var id = Guid.Parse(ddlCategory.SelectedValue); gvForms.DataSource = dataContext.PdfFormTemplates.Where(p => p.ProvinceCategoryId.Equals(id)) .OrderBy(p => p.TemplateName) .ToList(); gvForms.DataBind(); lblAviliableForms.Style.Add(HtmlTextWriterStyle.Display, "block"); } } ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "$('.ui.fluid.search.selection.dropdown').dropdown();", true); }
protected void btnSubmit_OnClick(object sender, EventArgs e) { try { using (var dataContext = new nChangerDb()) { dataContext.Database.ExecuteSqlCommand( "UPDATE Users SET IsEligibilityConfirmed='1' WHERE UserId='" + UserId + "'"); } } catch (Exception exception) { throw new Exception(exception.Message); } finally { Response.Redirect("../Secured/dashboard.aspx"); } }
private void Display() { var id = Guid.Parse(RecordId); var dataContext = new nChangerDb(); var pdfFormTemplateId = Guid.Parse(CurrentId); var generalQuestionUserResponse = dataContext.GeneralQuestionUserResponses.Where(g => g.RecordId.Equals(id)); var list = generalQuestionUserResponse.ToList(); if (list.Count > 0) { foreach (HtmlTableRow row in tblFields.Rows) { foreach (HtmlTableCell cell in row.Cells) { foreach (var ctl in cell.Controls) { if (ctl.GetType() == typeof (TextBox)) { var txt = (TextBox) ctl; var questionId = Guid.Parse(txt.Attributes["DB_ID"].ToString()); txt.Text = GetAnswerText(questionId); } else if (ctl.GetType() == typeof (RadioButtonList)) { var rdb = (RadioButtonList) ctl; var questionId = Guid.Parse(rdb.Attributes["DB_ID"].ToString()); rdb.Items.FindByText(GetAnswerText(questionId)).Selected = true; } else if (ctl.GetType() == typeof(DropDownList)) { var ddl = (DropDownList)ctl; var questionId = Guid.Parse(ddl.Attributes["DB_ID"].ToString()); ddl.Items.FindByText(GetAnswerText(questionId)).Selected = true; } } } } } }
private void Display() { var id = Guid.Parse(RecordId); var pdfFormTemplateid = Guid.Parse(CurrentId); var dataContext =new nChangerDb(); var fileInfo = new FileInfo(PdfInjector.FillForm(pdfFormTemplateid,id, UserId)); hidFile.Value = fileInfo.FullName; var template = dataContext.PdfFormTemplates.Find(pdfFormTemplateid); if (template != null) { hypFile.NavigateUrl = "../Output/"+ Path.GetFileName(fileInfo.Name); hypFile.Text = Path.GetFileName(fileInfo.Name); } UpdateGeneratedPdf(fileInfo); }
private void GenerateResponsiveTable() { using (var dataContext = new nChangerDb()) { var packageList = dataContext.Packages.Where(p => p.IsActive).OrderBy(p => p.Price).ToList(); var iCount = 0; foreach (var package in packageList) { var sbBuilder = new StringBuilder(); sbBuilder.Append("<div class=\"package brilliant" + GetHeader(iCount) + "\">"); sbBuilder.Append("<div class=\"name\">" + package.PackageName + "<br/></div>"); sbBuilder.Append("<div class=\"price\">" + package.Price.ToString("C") + "</div>"); sbBuilder.Append("<div class=\"trial\">Available for a month</div>"); sbBuilder.Append("<hr class=\"ui divider header\"> "); sbBuilder.Append("<ul>"); foreach (var feature in package.PackageFeatures) { sbBuilder.Append("<li>"); sbBuilder.Append("<i class=\"ui check icon green small\"></i>"); sbBuilder.Append("<strong>" + feature.FeatureName + "</strong>"); sbBuilder.Append("</li>"); } sbBuilder.Append("</ul>"); sbBuilder.Append("<hr class=\"ui divider header\"> "); sbBuilder.Append("<div>"); sbBuilder.Append("<a class=\"large ui " + GetButtonColor(iCount) + " button fluid\" href=\"Account/signup.aspx?pid=" + package.Id + "\"><i class=\"ui check circular icon small\"></i>Select"); sbBuilder.Append("</a>"); sbBuilder.Append("</div>"); sbBuilder.Append("</div>"); divWrapper.InnerHtml += sbBuilder.ToString(); iCount++; } } }