public static List <BIRegistration> GetAll() { SqlConnection conn = ConnectionHelper.GetSQLConnection(); SqlCommand command = new SqlCommand("select * from BIUsers Order By FirstName", conn); List <BIRegistration> retVal = new List <BIRegistration>(); command.Connection.Open(); SqlDataReader rs = command.ExecuteReader(); while (rs.Read()) { BIRegistration SN = new BIRegistration(); SN.id = Convert.ToInt32(rs["UserID"]); SN.firstName = Convert.ToString(rs["FirstName"]); SN.lastName = Convert.ToString(rs["LastName"]); SN.jobTitle = Convert.ToString(rs["JobTitle"]); SN.company = Convert.ToString(rs["Company"]); SN.userAddress = Convert.ToString(rs["UserAddress"]); SN.city = Convert.ToString(rs["City"]); SN.stateProvince = Convert.ToString(rs["StateProvince"]); SN.country = Convert.ToString(rs["Country"]); SN.postalCode = Convert.ToString(rs["PostalCode"]); SN.email = Convert.ToString(rs["Email"]); SN.website = Convert.ToString(rs["Website"]); SN.phone = Convert.ToString(rs["Phone"]); SN.fax = Convert.ToString(rs["Fax"]); SN.productInterest = Convert.ToString(rs["ProductInterest"]); SN.otherProductInterest = Convert.ToString(rs["OtherProductInterest"]); SN.visitorStatus = Convert.ToString(rs["VisitorStatus"]); SN.otherVisitorStatus = Convert.ToString(rs["OtherVisitorStatus"]); SN.purposeVisit = Convert.ToString(rs["PurposeVisit"]); SN.otherPurposeVisit = Convert.ToString(rs["OtherPurposeVisit"]); SN.cropInterest = Convert.ToString(rs["CropInterest"]); SN.otherCropInterest = Convert.ToString(rs["OtherCropInterest"]); SN.interpreter = Convert.ToInt32(rs["Interpreter"]); SN.userLanguage = Convert.ToString(rs["UserLanguage"]); retVal.Add(SN); } rs.Close(); command.Connection.Close(); return(retVal); }
protected void Page_Load(object sender, EventArgs e) { int tmp = 0; if (Request.QueryString["id"] == "blank") { goto Finish; } else if ((Request.QueryString["id"] != null) && (Request.QueryString["id"] != "blank")) { tmp = Convert.ToInt32(Request.QueryString["id"]); } else if (Request.QueryString["id"] == null) { tmp = Convert.ToInt32(Session["userID"]); } BIRegistration bir = new BIRegistration(tmp); //BIRegistration bir = new BIRegistration(1); if (Convert.ToInt32(Request.QueryString["translator"]) == 1) { lblFirstName.Text = Translator.DirectTranslation(bir.FirstName); lblLastName.Text = Translator.DirectTranslation(bir.LastName); lblJobTitle.Text = Translator.DictionaryTranslation(bir.JobTitle); lblCompany.Text = Translator.DictionaryTranslation(bir.Company); lblAddress.Text = Translator.DictionaryTranslation(bir.UserAddress); lblCity.Text = Translator.DictionaryTranslation(bir.City); lblState.Text = Translator.DictionaryTranslation(bir.StateProvince); lblCountry.Text = Translator.DictionaryTranslation(bir.Country); } else { lblFirstName.Text = bir.FirstName; lblLastName.Text = bir.LastName; lblJobTitle.Text = bir.JobTitle; lblCompany.Text = bir.Company; lblAddress.Text = bir.UserAddress; lblCity.Text = bir.City; lblState.Text = bir.StateProvince; lblCountry.Text = bir.Country; } lblPostalCode.Text = bir.PostalCode; lblEmail.Text = bir.Email; lblWebSite.Text = bir.Website; lblPhone.Text = bir.Phone; lblFax.Text = bir.Fax; string[] arrProdInterest = new string[cblProductInterest.Items.Count]; string strTemp = bir.ProductInterest; arrProdInterest = strTemp.Split(';'); int j = 0; int i; for (i = 0; i < cblProductInterest.Items.Count; i++) { if (arrProdInterest[j] == cblProductInterest.Items[i].Value) { cblProductInterest.Items[i].Selected = true; j++; } } if (bir.OtherProductInterest.Length != 0) { cbOtherProductInterest.Checked = true; lblOtherProductInterest.Text = bir.OtherProductInterest; } strTemp = ""; string[] arrVisitorStatus = new string[cblVisitorStatus.Items.Count]; strTemp = bir.VisitorStatus; arrVisitorStatus = strTemp.Split(';'); j = 0; for (i = 0; i < cblVisitorStatus.Items.Count; i++) { if (arrVisitorStatus[j] == cblVisitorStatus.Items[i].Value) { cblVisitorStatus.Items[i].Selected = true; j++; } } if (bir.OtherVisitorStatus.Length != 0) { cbOtherVisitorStatus.Checked = true; lblOtherVisitorStatus.Text = bir.OtherVisitorStatus; } strTemp = ""; string[] arrPurposeVisit = new string[cblPurposeVisit.Items.Count]; strTemp = bir.PurposeVisit; arrPurposeVisit = strTemp.Split(';'); j = 0; for (i = 0; i < cblPurposeVisit.Items.Count; i++) { if (arrPurposeVisit[j] == cblPurposeVisit.Items[i].Value) { cblPurposeVisit.Items[i].Selected = true; j++; } } if (bir.OtherPurposeVisit.Length != 0) { cbOtherPurposeVisit.Checked = true; lblOtherPurposeVisit.Text = bir.OtherPurposeVisit; } strTemp = ""; string[] arrCropInterest = new string[cblCropInterest.Items.Count]; strTemp = bir.CropInterest; arrCropInterest = strTemp.Split(';'); j = 0; for (i = 0; i < cblCropInterest.Items.Count; i++) { if (arrCropInterest[j] == cblCropInterest.Items[i].Value) { cblCropInterest.Items[i].Selected = true; j++; } } if (bir.OtherCropInterest.Length != 0) { cbOtherCropInterest.Checked = true; lblOtherCropInterest.Text = bir.OtherCropInterest; } if (bir.Interpreter == 1) { rblInterpreter.Items[0].Selected = true; lblLanguage.Text = bir.UserLanguage; } else { rblInterpreter.Items[1].Selected = true; } Finish :; }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["expid"] != "0") { List <CompanyProducts> CP = CompanyProducts.GetProductsByCompanyID(Convert.ToInt32(Request.QueryString["expid"])); List <BIRegistration> BIU = BIRegistration.GetAll(); string[] arrProdInterest = new string[10]; string strTemp = ""; int i, j, k, l; int counter = 0; bool check = false; bool newLine = false; string[] arrPhraseWords = new string[2]; if (CP.Count > 0) { VisitorsPlaceHolder.Text += "<center><b style='font-size: 16pt'><u>" + CP[0].CompanyName + "</u></b></center><br />"; VisitorsPlaceHolder.Text += "<br />"; for (i = 0; i < BIU.Count; i++) { strTemp = BIU[i].ProductInterest; arrProdInterest = strTemp.Split(';'); for (l = 0; l < arrProdInterest.Length; l++) { if (arrProdInterest[l] != null) { counter++; } } for (j = 0; j < counter; j++) { for (k = 0; k < CP.Count; k++) { if (arrProdInterest[j] == Convert.ToString(CP[k].ParentID)) { if (check == false) { VisitorsPlaceHolder.Text += "<strong><u>" + Translator.DirectTranslation(BIU[i].FirstName) + " " + Translator.DirectTranslation(BIU[i].LastName) + "</u></strong><br />"; VisitorsPlaceHolder.Text += "Job Title " + Translator.DictionaryTranslation(BIU[i].JobTitle) + " Company " + Translator.DictionaryTranslation(BIU[i].Company) + "<br />"; VisitorsPlaceHolder.Text += "Country " + Translator.DictionaryTranslation(BIU[i].Country) + " City " + Translator.DictionaryTranslation(BIU[i].City) + "<br />"; VisitorsPlaceHolder.Text += "Email " + BIU[i].Email + " Web Site " + BIU[i].Website + "<br />"; VisitorsPlaceHolder.Text += "Phone: " + BIU[i].Phone + " Fax: " + BIU[i].Fax + "<br /><br />"; VisitorsPlaceHolder.Text += "<strong>Interested Products:</strong><br/>"; check = true; newLine = true; } strTemp = CP[k].ProductName; arrPhraseWords = strTemp.Split('('); VisitorsPlaceHolder.Text += " * " + arrPhraseWords[0] + "<br />"; } } } check = false; counter = 0; if (newLine == true) { VisitorsPlaceHolder.Text += "<br />"; newLine = false; } } } else { VisitorsPlaceHolder.Text += "<b>Equipment was not chosen for the company</b>"; } } else { VisitorsPlaceHolder.Text += "<b>The company was not chosen</b>"; } }
protected void btnSubmit_Click(object sender, EventArgs e) { if ((rblInterpreter.Items[0].Selected == true) && (txtLanguage.Text == "")) { lblMessage.Text = "Please, fill out the field \"what language do you need for translation?\""; } else { string strProdInterest = ""; string strVisitorStatus = ""; string strPurposeVisit = ""; string strCropInterest = ""; for (int i = 0; i < cblProductInterest.Items.Count; i++) { if (cblProductInterest.Items[i].Selected) { strProdInterest += cblProductInterest.Items[i].Value + ";"; } } for (int i = 0; i < cblVisitorStatus.Items.Count; i++) { if (cblVisitorStatus.Items[i].Selected) { strVisitorStatus += cblVisitorStatus.Items[i].Value + ";"; } } for (int i = 0; i < cblPurposeVisit.Items.Count; i++) { if (cblPurposeVisit.Items[i].Selected) { strPurposeVisit += cblPurposeVisit.Items[i].Value + ";"; } } for (int i = 0; i < cblCropInterest.Items.Count; i++) { if (cblCropInterest.Items[i].Selected) { strCropInterest += cblCropInterest.Items[i].Value + ";"; } } BIRegistration bir = new BIRegistration(); bir.FirstName = txtFirstName.Text; bir.LastName = txtLastName.Text; bir.JobTitle = txtJobTitle.Text; bir.Company = txtCompany.Text; bir.UserAddress = txtAddress.Text; bir.City = txtCity.Text; bir.StateProvince = txtState.Text; bir.Country = txtCountry.Text; bir.PostalCode = txtPostalCode.Text; bir.Email = txtEmail.Text; bir.Website = txtWebSite.Text; bir.Phone = txtPhone.Text; bir.Fax = txtFax.Text; bir.ProductInterest = strProdInterest; bir.OtherProductInterest = txtProdInterest.Text; bir.VisitorStatus = strVisitorStatus; bir.OtherVisitorStatus = txtVisitorStatus.Text; bir.PurposeVisit = strPurposeVisit; bir.OtherPurposeVisit = txtPurposeVisit.Text; bir.CropInterest = strCropInterest; bir.OtherCropInterest = txtCropInterest.Text; bir.Interpreter = Convert.ToInt32(rblInterpreter.Text); bir.UserLanguage = txtLanguage.Text; int temp = bir.Insert(); if (temp == 0) { lblMessage.Text = "Insert Failed, please try again"; } else { lblMessage.Text = "Insert Successful"; btnSubmit.Enabled = false; Session["userID"] = temp; btnLiteral.Text = "<input id=\"btnPrint\" type=\"button\" value=\"Print the form\" onclick=\"window.open('englprintform.aspx', '_blank');\">"; } } }
protected void Page_Load(object sender, EventArgs e) { string[] tmpArray = new string[10]; string strTmp; List <BIRegistration> BIR = BIRegistration.GetAll(); VisitorsPlaceholder.Text += "<table border=1>"; VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td> <strong>First name</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Last name</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Job title</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Company</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Visitor's address</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>City</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>State/Province</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Country</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Postal code</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Email</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Web site</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Phone</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Fax</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Product Interest</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Visitor Status</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Purpose of Visit</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> <strong>Crop Interest</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "</tr>"; foreach (BIRegistration B in BIR) { if (Request.QueryString["translator"] == "0") { VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td>" + B.FirstName + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.LastName + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> " + B.JobTitle + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> " + B.Company + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.UserAddress + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.City + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.StateProvince + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.Country + " "; VisitorsPlaceholder.Text += "</td>"; } else if (Request.QueryString["translator"] == "1") { VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td>" + Translator.DirectTranslation(B.FirstName) + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + Translator.DirectTranslation(B.LastName) + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> " + Translator.DictionaryTranslation(B.JobTitle) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td> " + Translator.DictionaryTranslation(B.Company) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + Translator.DictionaryTranslation(B.UserAddress) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + Translator.DictionaryTranslation(B.City) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + Translator.DictionaryTranslation(B.StateProvince) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + Translator.DictionaryTranslation(B.Country) + " "; VisitorsPlaceholder.Text += "</td>"; } VisitorsPlaceholder.Text += "<td>" + B.PostalCode + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.Email + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.Website + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.Phone + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td>" + B.Fax + " "; VisitorsPlaceholder.Text += "</td>"; //Display product interest VisitorsPlaceholder.Text += "<td> "; strTmp = B.ProductInterest; tmpArray = strTmp.Split(';'); getProductInterest(tmpArray); if (B.OtherProductInterest != "") { VisitorsPlaceholder.Text += B.OtherProductInterest; } VisitorsPlaceholder.Text += "</td>"; //Display visitor's status VisitorsPlaceholder.Text += "<td> "; strTmp = B.VisitorStatus; tmpArray = strTmp.Split(';'); getVisitorStatus(tmpArray); if (B.OtherVisitorStatus != "") { VisitorsPlaceholder.Text += B.OtherVisitorStatus; } VisitorsPlaceholder.Text += "</td>"; //Display purpose of visit VisitorsPlaceholder.Text += "<td> "; strTmp = B.PurposeVisit; tmpArray = strTmp.Split(';'); getPurposeOfVisit(tmpArray); if (B.OtherPurposeVisit != "") { VisitorsPlaceholder.Text += B.OtherPurposeVisit; } VisitorsPlaceholder.Text += "</td>"; //Display crop interest VisitorsPlaceholder.Text += "<td> "; strTmp = B.CropInterest; tmpArray = strTmp.Split(';'); getCropInterest(tmpArray); if (B.OtherCropInterest != "") { VisitorsPlaceholder.Text += B.OtherCropInterest; } VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "</tr>"; } VisitorsPlaceholder.Text += "</table>"; }
protected void Page_Load(object sender, EventArgs e) { int i; BIRegistration bir = new BIRegistration(Convert.ToInt32(Request.QueryString["id"])); string[] arrProdInterest = new string[11]; string strTemp = bir.ProductInterest; arrProdInterest = strTemp.Split(';'); int counter = 0; for (i = 0; i < arrProdInterest.Length; i++) { if (arrProdInterest[i] != null) { counter++; } } int tmpExpID = 0; int tmpParentID = 0; if ((Request.QueryString["id"] != null) && (Request.QueryString["view"] == "0")) { List <CompanyProducts> CP = CompanyProducts.GetAllDataForReport(0); if (Request.QueryString["translator"] == "0") { ProductsPlaceHolder.Text += "<center><b style='font-size: 16pt'>Visitor's name: <u>" + bir.FirstName + " " + bir.LastName + "</u></b></center><br />"; } else if (Request.QueryString["translator"] == "1") { ProductsPlaceHolder.Text += "<center><b style='font-size: 16pt'>Visitor's name: <u>" + Translator.DirectTranslation(bir.FirstName) + " " + Translator.DirectTranslation(bir.LastName) + "</u></b></center><br />"; } for (i = 0; i < CP.Count; i++) { if (CP[i].ExpID != tmpExpID) { if (SearchCompany(arrProdInterest, counter, CP, CP[i].ExpID) == true) { ProductsPlaceHolder.Text += "<br /><br />"; ProductsPlaceHolder.Text += "<u><b>" + CP[i].CompanyName + "</b></u><br />"; ProductsPlaceHolder.Text += "<b>Products description:</b> " + CP[i].ProductDescription + "<br />"; ProductsPlaceHolder.Text += "<b>Contact:</b> " + CP[i].ContactPersonName + "<br/><b>Phone:</b> " + CP[i].Phone + ", "; if (CP[i].Fax != "") { ProductsPlaceHolder.Text += " <b>Fax:</b> " + CP[i].Fax + ","; } if (CP[i].CellPhone != "") { ProductsPlaceHolder.Text += " <b>Cell:</b> " + CP[i].CellPhone; } ProductsPlaceHolder.Text += "<br /><b>Email:</b> " + CP[i].Email; ProductsPlaceHolder.Text += "<br /><b>Location on Big Iron:</b> " + CP[i].Location + "<br /><br /> <b>Products produced by the company:</b> <br />"; } tmpExpID = CP[i].ExpID; tmpParentID = 0; } if (SearchVisitorProduct(arrProdInterest, counter, Convert.ToString(CP[i].ParentID)) == true) { if (tmpParentID != CP[i].ParentID) { ProductsPlaceHolder.Text += CP[i].ProductName + "<br />"; tmpParentID = CP[i].ParentID; } ProductsPlaceHolder.Text += " * <i>" + CP[i].CategoryProductName + "</i><br />"; } } } else if ((Request.QueryString["id"] != null) && (Request.QueryString["view"] == "1")) { List <CompanyProducts> CP = CompanyProducts.GetAllDataForReport(1); int numOutputs = 1; if (Request.QueryString["translator"] == "0") { ProductsPlaceHolder.Text += "<center><b style='font-size: 16pt'>Visitor's name: <u>" + bir.FirstName + " " + bir.LastName + "</u></b></center><br />"; } else if (Request.QueryString["translator"] == "1") { ProductsPlaceHolder.Text += "<center><b style='font-size: 16pt'>Visitor's name: <u>" + Translator.DirectTranslation(bir.FirstName) + " " + Translator.DirectTranslation(bir.LastName) + "</u></b></center><br />"; } for (i = 0; i < CP.Count; i++) { if (SearchVisitorProduct(arrProdInterest, counter, Convert.ToString(CP[i].ParentID)) == true) { if (tmpExpID != CP[i].ExpID) { tmpParentID = 0; tmpExpID = CP[i].ExpID; numOutputs = 1; } if (tmpParentID != CP[i].ParentID) { ProductsPlaceHolder.Text += "<u><b>" + CP[i].ProductName + "</b></u><br />"; tmpParentID = CP[i].ParentID; numOutputs = 1; } ProductsPlaceHolder.Text += " * <i>" + CP[i].CategoryProductName + "</i>" + GetNumberOfSubcotegories(CP, CP[i].ParentID, CP[i].ExpID) + " " + CP[i].ParentID + " " + CP[i].ExpID + "<br />"; if (GetNumberOfSubcotegories(CP, CP[i].ParentID, CP[i].ExpID) == numOutputs) { ProductsPlaceHolder.Text += "<br />"; ProductsPlaceHolder.Text += " <b>" + CP[i].CompanyName + "</b><br />"; ProductsPlaceHolder.Text += "<table><tr><td> </td><td><b>Products description:</b> " + CP[i].ProductDescription + "<br /></td></tr></table>"; ProductsPlaceHolder.Text += " <b>Contact:</b> " + CP[i].ContactPersonName + "<br/> <b>Phone:</b> " + CP[i].Phone + ", "; if (CP[i].Fax != "") { ProductsPlaceHolder.Text += " <b>Fax:</b> " + CP[i].Fax + ","; } if (CP[i].CellPhone != "") { ProductsPlaceHolder.Text += " <b>Cell:</b> " + CP[i].CellPhone; } ProductsPlaceHolder.Text += "<br /> <b>Email:</b> " + CP[i].Email; ProductsPlaceHolder.Text += "<br /> <b>Location on Big Iron:</b> " + CP[i].Location + "<br /><br /> "; numOutputs = 0; tmpParentID = 0; } numOutputs++; } } } }
private void PopulateVisitors() { if ((Request.QueryString["id"] != null) && (Request.QueryString["status"] == "1")) { BIRegistration.Delete(Convert.ToInt32(Request.QueryString["id"])); Response.Redirect("~/adminbiregistration.aspx"); } List <BIRegistration> BIR = BIRegistration.GetAll(); VisitorsPlaceholder.Text += "<table border=1 width=95%>"; VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td>Num</td>"; VisitorsPlaceholder.Text += "<td width=22%> <strong>Visitor's name</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> <strong>Job position</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> <strong>Company</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=12%> <strong>Remove visitor</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=12%> <strong>Report</strong>"; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "</tr>"; int num = 1; if (Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$rblLanguage"]) == 0) { linkPlaceHolder.Text = "<a href=exportbiusers.aspx?translator=0 target='_blank'>Generate report to export Big Iron visitors from the database into another appliaction</a>"; foreach (BIRegistration B in BIR) { VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td>" + num + "</td>"; VisitorsPlaceholder.Text += "<td width=22%><a href=\"englprintform.aspx?id=" + B.ID + "\" \" target=\"_blank\">" + B.FirstName + " " + B.LastName + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> " + B.JobTitle + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> " + B.Company + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td><input id=\"btnDelete\" type=\"button\" value=\"Delete\" onClick='if(confirm(\"Remove visitor?\")) window.location=\"adminbiregistration.aspx?id=" + B.ID + "&status=1\"; else alert(\"The visitor was not removed!\")' />"; VisitorsPlaceholder.Text += "</td>"; if (Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$rblReportView"]) == 0) { VisitorsPlaceholder.Text += "<td><a href=\"visitorsreport.aspx?id=" + B.ID + "&view=0&translator=0 \" \" target=\"_blank\">Company=>Products</a>"; VisitorsPlaceholder.Text += "</td>"; } else { VisitorsPlaceholder.Text += "<td><a href=\"visitorsreport.aspx?id=" + B.ID + "&view=1&translator=0 \" \" target=\"_blank\">Product=>Companies</a>"; VisitorsPlaceholder.Text += "</td>"; } VisitorsPlaceholder.Text += "</tr>"; num = num + 1; } VisitorsPlaceholder.Text += "</table>"; } else if (Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$rblLanguage"]) == 1) { linkPlaceHolder.Text = "<a href=exportbiusers.aspx?translator=1 target='_blank'>Generate report to export Big Iron visitors from the database into another appliaction</a>"; foreach (BIRegistration B in BIR) { VisitorsPlaceholder.Text += "<tr>"; VisitorsPlaceholder.Text += "<td>" + num + "</td>"; VisitorsPlaceholder.Text += "<td width=22%><a href=\"englprintform.aspx?id=" + B.ID + "&translator=1 \" \" target=\"_blank\">" + Translator.DirectTranslation(B.FirstName) + " " + Translator.DirectTranslation(B.LastName) + "</a> "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> " + Translator.DictionaryTranslation(B.JobTitle) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td width=22%> " + Translator.DictionaryTranslation(B.Company) + " "; VisitorsPlaceholder.Text += "</td>"; VisitorsPlaceholder.Text += "<td><input id=\"btnDelete\" type=\"button\" value=\"Delete\" onClick='if(confirm(\"Remove visitor?\")) window.location=\"adminbiregistration.aspx?id=" + B.ID + "&status=1\"; else alert(\"The visitor was not removed!\")' />"; VisitorsPlaceholder.Text += "</td>"; if (Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$rblReportView"]) == 0) { VisitorsPlaceholder.Text += "<td><a href=\"visitorsreport.aspx?id=" + B.ID + "&view=0&translator=1 \" \" target=\"_blank\">Company=>Products</a>"; VisitorsPlaceholder.Text += "</td>"; } else { VisitorsPlaceholder.Text += "<td><a href=\"visitorsreport.aspx?id=" + B.ID + "&view=1&translator=1 \" \" target=\"_blank\">Product=>Companies</a>"; VisitorsPlaceholder.Text += "</td>"; } VisitorsPlaceholder.Text += "</tr>"; num = num + 1; } VisitorsPlaceholder.Text += "</table>"; } }