protected void ddl_Location_SelectedIndexChanged(object sender, EventArgs e) { String filmCode = ddl_Play.SelectedValue; String Location = ddl_Location.SelectedValue; dateofshow.Text = "Select"; ddl_Date.Items.Clear(); ddl_Date.Items.Add(new ListItem("Select", "0")); ddl_Date.Items[0].Selected = true; DataTable dtplaydate = VistaBOL.Select_PlayDate(Location, filmCode); string Enddate = "2014.04.10"; DateTime Endt = Convert.ToDateTime(Enddate); foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { if (Convert.ToDateTime(dr[0]) <= Endt) { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } } }
/// <summary> /// /// </summary> //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()=="JHUMROO") // // { // // ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString())); // // } // // } // //} // Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("End Load Play"); //} /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //protected void ddl_Play_SelectedIndexChanged(object sender, EventArgs e) //{ // //xbol.Parameters.Clear(); // 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) // { // if (dr[1].ToString()=="October") // { // ddl_Location.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString())); // } // } //} /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //protected void ddl_Location_SelectedIndexChanged(object sender, EventArgs e) //{ // String filmCode = ddl_Play.SelectedValue; // String Location = ddl_Location.SelectedValue; // dateofshow.Text = "Select"; // ddl_Date.Items.Clear(); // ddl_Date.Items.Add(new ListItem("Select", "0")); // ddl_Date.Items[0].Selected = true; // DataTable dtplaydate = VistaBOL.Select_PlayDate(Location, filmCode); // foreach (DataRow dr in dtplaydate.Rows) // { // if (!(dr[0].ToString().Equals("2012.12.31"))) // { // ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), // Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); // } // } //} void Load_Play() { String filmCode = ddl_Play.SelectedValue; String Location = ddl_Location.SelectedValue; dateofshow.Text = "Select"; ddl_Date.Items.Clear(); ddl_Date.Items.Add(new ListItem("Select", "0")); ddl_Date.Items[0].Selected = true; DataTable dtplaydate = VistaBOL.Select_PlayDate(Location, filmCode); foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddl_Location_SelectedIndexChanged(object sender, EventArgs e) { String filmCode = ddl_Play.SelectedValue; String Location = ddl_Location.SelectedValue; dateofshow.Text = "Select"; ddl_Date.Items.Clear(); ddl_Date.Items.Add(new ListItem("Select", "0")); ddl_Date.Items[0].Selected = true; DataTable dtplaydate = VistaBOL.Select_PlayDate(Location, filmCode); if (Request.QueryString["MANA"] == "ManaPromo") { string Enddate = "2013.11.30"; DateTime Endt = Convert.ToDateTime(Enddate); foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { if (Convert.ToDateTime(dr[0]) <= Endt) { if (Session["Package"].ToString() == "Weekend,Rs.4999") { if (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SUNDAY" || Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SATURDAY" || Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy") == "09/08/2013" || Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy") == "15/08/2013") { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } //string nine="Fri, Aug 09,2013"; //string Fifteen = "Fri, Aug 15,2013"; //////ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(nine.ToString()).ToString("ddd, MMM dd,yyyy"), ////// Convert.ToDateTime(nine.ToString()).ToString("dd/MM/yyyy"))); //////ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(Fifteen.ToString()).ToString("ddd, MMM dd,yyyy"), ////// Convert.ToDateTime(Fifteen.ToString()).ToString("dd/MM/yyyy"))); } else if (Session["Package"].ToString() == "Weekday,Rs.3999") { if (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() != "SUNDAY" && Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() != "SATURDAY" && Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy") != "15/08/2013" && Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy") != "09/08/2013") { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } } } } } else if (Request.QueryString["FAMILYOFFER"] == "FamilyOffer") { string Enddate = "2014.07.10"; DateTime Endt = Convert.ToDateTime(Enddate); foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { if (Convert.ToDateTime(dr[0]) <= Endt) { if (Session["Package"].ToString() == "Weekend-Rs.13196") { if (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SUNDAY" || Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SATURDAY") { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } else if (Session["Package"].ToString() == "Weekday-Rs.9796") { if (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() != "SUNDAY" && Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() != "SATURDAY") { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } } } } } else if (Request.QueryString["MMT"] == "MMTUS") { string Enddate = "2013.11.30"; DateTime Endt = Convert.ToDateTime(Enddate); foreach (DataRow dr in dtplaydate.Rows) { if (Convert.ToDateTime(dr[0]) <= Endt) { if (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SUNDAY" || Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "SATURDAY" || (Convert.ToDateTime(dr[0]).DayOfWeek.ToString().ToUpper() == "FRIDAY" && ddl_Play.SelectedValue.ToString() == "ZANGOORA")) { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } } } else { foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); } } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //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())); //} /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddl_Location_SelectedIndexChanged(object sender, EventArgs e) { String filmCode = ddl_Play.SelectedValue; String Location = ddl_Location.SelectedValue; ddl_Date.Items.Clear(); //ddl_Date.Items.Add(new ListItem("Select", "0")); //ddl_Date.Items[0].Selected = true; DataTable dtplaydate = VistaBOL.Select_PlayDate(Location, filmCode); foreach (DataRow dr in dtplaydate.Rows) { if (!(dr[0].ToString().Equals("2012.12.31"))) { ddl_Date.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"), Convert.ToDateTime(dr[0].ToString()).ToString("dd/MM/yyyy"))); dateofshow.Text = Convert.ToDateTime(dr[0].ToString()).ToString("ddd, MMM dd,yyyy"); } } String PlayDate; if (dateofshow.Text.ToString() == "" || dateofshow.Text.ToString() == "Select") { PlayDate = "0"; dateofshow.Text = "Select"; } else { PlayDate = Convert.ToDateTime(dateofshow.Text.ToString()).ToString("dd/MM/yyyy"); } String filmCode1 = ddl_Play.SelectedValue; //String PlayDate = ddl_Date.SelectedValue; //PlayDate = PlayDate.Replace("-", "/"); String Location1 = ddl_Location.SelectedValue; ddl_ShowTimes.Items.Clear(); //ddl_ShowTimes.Items.Add(new ListItem("Select", "0")); ddl_Category.Items.Clear(); ddl_Category.Items.Add(new ListItem("Select", "0")); ddl_Category.Items.Clear(); ddl_Category.Items.Add(new ListItem("Select", "0")); drp_TotalSeats.Items.Clear(); drp_TotalSeats.Items.Add(new ListItem("Select", "0")); foreach (DataRow dr in VistaBOL.Select_PlayTime(Location1, filmCode1, PlayDate).Rows) { ddl_ShowTimes.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToShortTimeString(), dr[1].ToString().Trim())); } String filmCode2 = ddl_ShowTimes.SelectedValue; ddl_Category.Items.Clear(); //ddl_Category.Items.Add(new ListItem("Select", "0")); drp_TotalSeats.Items.Clear(); drp_TotalSeats.Items.Add(new ListItem("Select", "0")); DataSet ds = VistaBOL.Select_Category_DS(filmCode2); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (ds.Tables[0].Rows[i][1].ToString() == "COPPER") { ddl_Category.Items.Add(new ListItem("CHILD" + ", Rs. " + String.Format("{0:#.##}", decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString())); } else if (ds.Tables[0].Rows[i][1].ToString() == "GOLD") { ddl_Category.Items.Add(new ListItem("SINGLE" + ", Rs. " + String.Format("{0:#.##}", decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString())); } else if (ds.Tables[0].Rows[i][1].ToString() == "PLATINUM") { ddl_Category.Items.Add(new ListItem("COUPLE" + ", Rs. " + String.Format("{0:#.##}", decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString())); } else if (ds.Tables[0].Rows[i][1].ToString() == "SILVER") { ddl_Category.Items.Add(new ListItem("TEEN" + ", Rs. " + String.Format("{0:#.##}", decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString())); } } const ushort MAX_SEATS_PER_TRANSACTION = 10; //needs to be moved to config; drp_TotalSeats.Items.Clear(); drp_TotalSeats.Items.Add(new ListItem("Select", "0")); String Category = ddl_Category.SelectedValue; String PlayTime = ddl_ShowTimes.SelectedValue; int availableSeats = VistaBOL.Select_Available_Seats(Category, PlayTime); if (availableSeats > 0) //if there are seats available... { //ensure only MAX per transaction are allowed for selection availableSeats = (availableSeats > MAX_SEATS_PER_TRANSACTION) ? 10 : availableSeats; for (int i = 1; i <= availableSeats; i++) { drp_TotalSeats.Items.Add(new ListItem(i.ToString(), i.ToString())); } } else //otherwise mark sold out { drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0")); } }