protected void AddShow()
    {
        ServiceReference1.Show       s  = new ServiceReference1.Show();
        ServiceReference1.ShowDetail sd = new ServiceReference1.ShowDetail();

        s.ShowName       = ShowNameTextBox.Text;
        s.ShowDate       = DateTime.Parse(ShowDateTextBox.Text);
        s.ShowTime       = TimeSpan.Parse(ShowTimeTextBox.Text);
        s.ShowTicketInfo = ShowTicketInfoTextBox.Text;
        s.VenueKey       = (int)Session["UserKey"];
        //sd.Artist.ArtistName = ArtistDropDownList.SelectedItem.Text;
        sd.ArtistKey = int.Parse(ArtistDropDownList.SelectedValue.ToString());
        sd.ShowDetailArtistStartTime = TimeSpan.Parse(ShowDetailArtistStartTimeTextBox.Text);
        sd.ShowDetailAdditional      = ShowDetailAdditionalTextBox.Text;

        bool result = lsc.AddShow(s, sd);

        if (result)
        {
            AddShowLabel.Text = "Show added";
        }
        else
        {
            AddShowLabel.Text = "Error. Show not added";
        }
    }
Esempio n. 2
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        ServiceReference1.RegisterServiceClient sr1 = new ServiceReference1.RegisterServiceClient();
        ServiceReference1.Show       v  = new ServiceReference1.Show();
        ServiceReference1.ShowDetail vl = new ServiceReference1.ShowDetail();

        v.ShowName = ShowNameEntry.Text;
        v.VenueKey = (int)Session["key"];

        v.ShowDate        = DateTime.Parse(ShowDateEntry.Text);
        v.ShowTime        = TimeSpan.Parse(ShowTimeEntry.Text);
        v.ShowTicketInfo  = ShowTicketInfoEntry.Text;
        v.ShowDateEntered = DateTime.Parse(ShowDateEnteredEntry.Text);

        bool result = sr1.AddShow(v, vl);

        if (result)
        {
            errorDisplay.Text = "Registered";
        }
        else
        {
            errorDisplay.Text = "Try again later";
        }
    }