private void PopulateTable()
        {
            string relativeUsersXSLPath = "/App_Data/UsersInfo.xslt";
            string relativeUsersPath    = "/App_Data/Users.xml";
            string UsersHTML            = SoloTravelerAppUtils.ConvertXMLToHTML(relativeUsersPath, true, relativeUsersXSLPath);

            UserTable.Text = UsersHTML;
        }
        private void PopulateTable()
        {
            string relativeUsersXSLPath = "/App_Data/UsersPromDem.xslt";
            string relativeStaffXSLPath = "/App_Data/StaffPromDem.xslt";
            string relativeUsersPath    = "/App_Data/Users.xml";
            string relativeStaffPath    = "/App_Data/Staff.xml";
            string UsersHTML            = SoloTravelerAppUtils.ConvertXMLToHTML(relativeUsersPath, true, relativeUsersXSLPath);
            string StaffHTML            = SoloTravelerAppUtils.ConvertXMLToHTML(relativeStaffPath, true, relativeStaffXSLPath);

            UserEmployeTable.Text = UsersHTML + StaffHTML;
        }
Пример #3
0
        protected void StoreDetailsButton_Click(object sender, EventArgs e)
        {
            try
            {
                string zipCode = ZipcodeInput.Text;
                string type    = StoreDDList.SelectedValue;

                string xmlResponse = ServiceLayer.ServiceCall.GetNearestStoreData(zipCode, type);
                string output      = SoloTravelerAppUtils.ConvertXMLToHTML(xmlResponse, false, "/App_Data/NearestStore.xslt");
                NearestStoreOutLabel.Text = output;
            }
            catch (Exception ex)
            {
                NearestStoreOutLabel.Text = "Something went wrong";
            }
        }
Пример #4
0
        protected void RetrieveButton_Click(object sender, EventArgs e)
        {
            try
            {
                string validationResp = ValidateFields();

                if (!validationResp.Equals("success"))
                {
                    CrimeDataOutput.Text = validationResp;
                    return;
                }
                string   input = ZipcodeInput.Text;
                DateTime date  = Convert.ToDateTime(DateInput.Text);
                int      inputVal;

                if (input.Equals(""))
                {
                    CrimeDataOutput.Text = "Please provide valid input";
                    return;
                }
                if (!int.TryParse(input, out inputVal))
                {
                    CrimeDataOutput.Text = "Invalid ZipCode";
                    return;
                }
                string xml         = ServiceLayer.ServiceCall.GetCrimeData(inputVal);
                string output      = SoloTravelerAppUtils.ConvertXMLToHTML(xml, false, "/App_Data/CrimeData.xslt");
                string weatherResp = ServiceLayer.ServiceCall.GetWeatherData(input, date);
                CrimeDataOutput.Text   = output;
                WeatherDataOutput.Text = weatherResp;

                Crime_Weather.Visible      = true;
                NearestStoreDiv.Visible    = true;
                NearestStoreOutDiv.Visible = true;
            }
            catch (Exception ex)
            {
                CrimeDataOutput.Text  = "Something went wrong";
                Crime_Weather.Visible = true;
            }
        }