Exemple #1
0
    void Load_Play()
    {
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Start Load Play");
        ddl_Play.Items.Clear();
        DataTable dtlocation = VistaBOL.Select_Play();

        //ddl_Play.Items.Add(new ListItem("Select", "0"));
        if (dtlocation != null && dtlocation.Rows.Count > 0)
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                if (dr[0].ToString() == "NEW YEAR")
                {
                    ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
                }
            }
        }
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("End Load Play");
        String Play = ddl_Play.SelectedValue;

        dateofshow.Text = "Select";
        ddl_Location.Items.Clear();
        ddl_Location.Items.Add(new ListItem("Select", "0"));
        DataTable dtAudi = VistaBOL.Select_Audi(Play);

        foreach (DataRow dr in dtAudi.Rows)
        {
            ddl_Location.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString()));
        }
    }
Exemple #2
0
    protected void ddl_Play_SelectedIndexChanged(object sender, EventArgs e)
    {
        String Play = ddl_Play.SelectedValue;

        dateofshow.Text = "Select";
        ddl_Location.Items.Clear();
        ddl_Location.Items.Add(new ListItem("Select", "0"));
        DataTable dtAudi = VistaBOL.Select_Audi(Play);

        foreach (DataRow dr in dtAudi.Rows)
        {
            ddl_Location.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString()));
        }
    }
Exemple #3
0
    void Load_Play()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add(new DataColumn("ShowName", typeof(string)));
        dt.Columns.Add(new DataColumn("Location", typeof(string)));
        dt.Columns.Add(new DataColumn("Show Date", typeof(string)));
        dt.Columns.Add(new DataColumn("Show Time", typeof(string)));
        dt.Columns.Add(new DataColumn("Show Time Code", typeof(string)));
        dt.Columns.Add(new DataColumn("locationcode", typeof(string)));
        AuditReport ar       = new AuditReport();
        DateTime    PlayDate = DateTime.Now;

        ar.Date = Convert.ToDateTime(PlayDate.ToString());
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Start Load Play");
        DataTable dtlocation = VistaBOL.Select_Play();

        if (dtlocation != null && dtlocation.Rows.Count > 0)
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                ar.ShowName = dr[0].ToString();
                DataTable dtAudi = VistaBOL.Select_Audi(ar.ShowName.ToString());
                foreach (DataRow dr1 in dtAudi.Rows)
                {
                    ar.LocationText  = dr1[1].ToString();
                    ar.LocationValue = dr1[0].ToString();
                    DataTable drtime = VistaBOL.Select_PlayTime_Audit(ar.LocationValue, ar.ShowName, ar.Date.ToString("dd/MM/yyyy"));
                    foreach (DataRow dr2 in drtime.Rows)
                    {
                        ar.Timetext  = Convert.ToDateTime(dr2[0].ToString());
                        ar.Timevalue = dr2[1].ToString();
                        dt.Rows.Add(ar.ShowName, ar.LocationText, ar.Date.ToString("ddd, MMM dd,yyyy"), ar.Timetext.ToShortTimeString(), ar.Timevalue, ar.LocationValue);
                    }
                }
            }
        }
        DataSet ds = new DataSet();

        ds.Tables.Add(dt);
        GridView_ShowDetail.DataSource = ds.Tables[0];
        GridView_ShowDetail.DataBind();
    }