Пример #1
0
        protected void GridViewTheater_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                int index = Convert.ToInt32(e.CommandArgument);

                GridViewRow row = GridViewTheater.Rows[index];

                String SelectedTheaterID   = row.Cells[0].Text;
                String SelectedTheaterName = row.Cells[1].Text;

                String SelectedMovieID = lblMovieID.Text;

                SelectedParamterArgs esp = new SelectedParamterArgs(SelectedTheaterID, SelectedMovieID);
                if (TheaterSelection != null)
                {
                    TheaterSelection(esp);
                    GridViewPerformance.DataSource = Model.PerformanceList;
                    GridViewPerformance.DataBind();
                    lblTheater.Text         = "Selected Theater: ";
                    lblSelectedTheater.Text = string.Format("{0}.", SelectedTheaterName);
                    ddlCityList.Enabled     = false;
                }
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.LoadData != null)
                {
                    string theat     = Request.QueryString["TheaterID"];         // "4531D5B6-268C-4AB3-81EB-57D0845E21DF";
                    Guid   theaterId = new Guid();
                    theaterId = Guid.Parse(theat);
                    LoadData(theaterId);

                    lblName.Text         = Model.TheaterName;
                    lblAddressLine1.Text = Model.AddressLine1;
                    lblCity.Text         = Model.City;
                    lblCountry.Text      = Model.Country;
                    lblEmail.Text        = Model.Email;
                    lblPhone.Text        = Model.Phone;
                    lblPostalCode.Text   = Model.PostalCode;
                    lblProvince.Text     = Model.Province;

                    GridViewPerformance.DataSource = Model.ListOfPerformances;
                    GridViewPerformance.DataBind();
                    GridViewPerformance.Columns[0].Visible = false;
                }
            }
        }
Пример #3
0
        protected void GridViewTheater_SelectedIndexChanged(object sender, EventArgs e)
        {
            String SelectedTheaterID   = GridViewTheater.SelectedRow.Cells[0].Text;
            String SelectedTheaterName = GridViewTheater.SelectedRow.Cells[1].Text;
            SelectedParamterArgs esp   = new SelectedParamterArgs(SelectedTheaterID);

            if (TheaterSelection != null)
            {
                TheaterSelection(esp);
                GridViewPerformance.DataSource = Model.PerformanceList;
                GridViewPerformance.DataBind();
                lblTheater.Text         = "Selected Theater: ";
                lblSelectedTheater.Text = string.Format("{0}.", SelectedTheaterName);
                ddlCityList.Enabled     = false;
            }
        }
Пример #4
0
        //	[Guid("4531D5B6-268C-4AB3-81EB-57D0845E21DF")]

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.LoadData != null)
                {
                    var ex = new EventArgs();
                    LoadData(ex);
                }

                Label1.Text = "it works, yeah!!!!";


                string theat     = Session["TheaterID"].ToString();
                Guid   theaterId = new Guid();
                theaterId = Guid.Parse(theat);



                TheaterServices showTheater    = new TheaterServices();
                TheaterModelDTO currentTheater = new TheaterModelDTO();
                currentTheater = showTheater.GetTheater(theaterId);

                lblName.Text = currentTheater.Name;


                AddressServices showAddress    = new AddressServices();
                AddressModelDTO currentAddress = new AddressModelDTO();

                currentAddress = showAddress.GetAddress(theaterId);

                lblAddressLine1.Text = currentAddress.AddressLine1;
                lblCity.Text         = currentAddress.City;
                lblCountry.Text      = currentAddress.Country;
                lblEmail.Text        = currentAddress.Email;
                lblPhone.Text        = currentAddress.Phone;
                lblPostalCode.Text   = currentAddress.PostalCode;
                lblProvince.Text     = currentAddress.Province;

                PerformanceServices showAllPerformances = new PerformanceServices();

                GridViewPerformance.DataSource = showAllPerformances.GetPerformances(theaterId);
                GridViewPerformance.DataBind();
            }
        }