Exemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddl_Category_SelectedIndexChanged(object sender, EventArgs e)
    {
        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++)
            {
                if (i == 2 || i == 4 || i == 6 || i == 8 || i == 10)
                {
                    drp_TotalSeats.Items.Add(new ListItem(i.ToString(), i.ToString()));
                }
            }
        }
        else //otherwise mark sold out
        {
            drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
        }
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     lblMsgPromotionCode.Visible = false;
     Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("MMT promotion start");
     if (!IsPostBack)
     {
         List <KoDTicketingLibrary.DTO.Promotion> listPromo1 = VistaBOL.GetPromostionCode();
         int cont = listPromo1.Count;
         for (int i = 0; i < cont; i++)
         {
             if (listPromo1[i].PromotionCode.ToString().ToUpper() == "MMT")
             {
                 string date1 = "";
                 //string endDat = "16 Aug 2013";
                 DateTime Enddate = listPromo1[i].EndDate;
                 Enddate = Enddate.AddDays(11);
                 double days = Enddate.Subtract(DateTime.Now).TotalDays;
                 for (double j = 0; j <= days; j++)
                 {
                     DateTime date = DateTime.Now.AddDays(j);
                     string   day  = date.DayOfWeek.ToString().ToUpper();
                     date1 = date.ToString("ddd, MMM dd,yyyy");
                     if (day == "MONDAY")
                     {
                         ddl_date.Items.Remove(date1);
                     }
                     else
                     {
                         ddl_date.Items.Add(date1);
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
    protected void btnMANAPromotionCode_Click(object sender, EventArgs e)
    {
        decimal TotalAmount = 0; decimal PayableAmount = 0;
        string  pack = ddl_package.SelectedValue.ToString();
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        // String PromotionCode = txtMANAPromotionCode.Text;
        int list   = listPromo.Count;
        int select = int.Parse(ddl_noofpackage.SelectedValue.ToString());

        if (ddl_package.SelectedItem.ToString() == "Select" && ddl_noofpackage.SelectedItem.ToString() == "Select")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please select any Family Package and the number of Packages";
            ddl_package.Focus();
            return;
        }

        if (ddl_package.SelectedItem.ToString() == "Select")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please select any Family Package";
            ddl_package.Focus();
            return;
        }
        if (ddl_noofpackage.SelectedItem.ToString() == "Select")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please select number of Packages";
            ddl_noofpackage.Focus();
            return;
        }
        else
        {
            for (int i = 0; i < list; i++)
            {
                if (listPromo[i].PromotionCode.ToString().ToUpper() == "MANA")
                {
                    if (ddl_package.SelectedItem.ToString() == "Weekday,Rs.3999")
                    {
                        PayableAmount          = Convert.ToDecimal("3999") * Convert.ToDecimal(ddl_noofpackage.SelectedValue);
                        Session["PackageType"] = "Family Package Weekdays";
                    }
                    if (ddl_package.SelectedItem.ToString() == "Weekend,Rs.4999")
                    {
                        PayableAmount          = Convert.ToDecimal("4999") * Convert.ToDecimal(ddl_noofpackage.SelectedValue);
                        Session["PackageType"] = "Family Package Weekend";
                    }
                    Session["Package"] = ddl_package.SelectedItem.ToString();
                    //Session["Package"] = ddl_package.SelectedItem.ToString();
                    Session["PromotionCode"] = listPromo[i];
                    Session["dtt"]           = listPromo[i].EndDate.ToString();
                    Session["Hotel"]         = listPromo[i].PromotionCode.ToString();
                    //Session["PayableAmount"] = PayableAmount;
                    Session["NoofPackages"] = ddl_noofpackage.SelectedValue.ToString();
                    Response.Redirect("Default.aspx?MANA=ManaPromo", false);
                }
            }
            PromotionNotValid();
        }
    }
Exemplo n.º 4
0
    protected void ddl_Date_SelectedIndexChanged(object sender, EventArgs e)
    {
        ddl_Quantity.Items.Clear();
        ddl_ShowTime.Items.Clear();
        ddl_ShowTime.Items.Add(new ListItem("Select", "0"));
        ddl_Quantity.Items.Add(new ListItem("Select", "0"));
        String PlayDate = "";
        String filmCode = ddl_Package1.SelectedValue;

        if (ddl_Date.SelectedItem.Text != "Select")
        {
            PlayDate = Convert.ToDateTime(ddl_Date.SelectedItem.Text).ToString("dd/MM/yyyy");
        }

        //PlayDate = PlayDate.Replace("-", "/"); // for local/dev
        String Location = "NMJM";

        foreach (DataRow dr in VistaBOL.Select_Play(Location, filmCode, PlayDate).Rows)
        {
            if (ddl_Package1.SelectedValue == "Rs.1275")
            {
                ddl_ShowTime.Items.Add(new ListItem("2:30 PM", dr[1].ToString().Trim()));
            }
            if (ddl_Package1.SelectedValue == "Rs.4999")
            {
                ddl_ShowTime.Items.Add(new ListItem("7:30 PM", dr[1].ToString().Trim()));
            }
        }
    }
Exemplo n.º 5
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()));
        }
    }
Exemplo n.º 6
0
    protected void btnHtlPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        HotelList <string> PromoClass    = new HotelList <string>();
        List <string>      Promotions    = PromoClass.listofHotels();
        string             PromotionCode = txtHtlPromotionCode.Text;
        int list = listPromo.Count;

        for (int i = 0; i < list; i++)
        {
            if (Promotions.Contains(listPromo[i].PromotionCode.ToString().ToUpper()))     //listPromo[i].PromotionCode.ToString().ToUpper()
            {
                bool isMatch = Regex.IsMatch(PromotionCode, listPromo[i].RegexValidator);
                if (isMatch)
                {
                    listPromo[i].WebPromotionId               = txtHtlPromotionCode.Text.ToUpper();
                    Session["PromotionCode"]                  = listPromo[i];
                    Session[listPromo[i].PromotionCode]       = listPromo[i];
                    Session["a" + listPromo[i].PromotionCode] = listPromo[i];
                    Session["Hotel"] = listPromo[i].PromotionCode.ToString();
                    Response.Redirect("Default.aspx?Hotel=s&promo=" + Encrypt(listPromo[i].PromotionCode));
                }
            }
        }
        PromotionNotValid();
    }
Exemplo n.º 7
0
    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")));
                }
            }
        }
    }
Exemplo n.º 8
0
    protected void btnPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        string PromotionCode = txtPromotionCode.Text;
        int    list          = listPromo.Count;

        for (int i = 0; i < list; i++)
        {
            if (listPromo[i].PromotionCode == "VALENTINEMONTH")
            {
                bool isMatch = Regex.IsMatch(PromotionCode, listPromo[i].RegexValidator);
                if (isMatch)
                {
                    listPromo[i].WebPromotionId = txtPromotionCode.Text.ToUpper();
                    Session["PromotionCode"]    = listPromo[i];
                    Session["Hotel"]            = "VALENTINEMONTH";
                    Response.Redirect("Default.aspx?Valentine=s");
                }
                else
                {
                    PromotionNotValid();
                }
            }
        }
    }
Exemplo n.º 9
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    //protected void ddl_Date_SelectedIndexChanged(object sender, EventArgs e)
    protected void dateofshow_TextChanged(object sender, EventArgs e)
    {
        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 filmCode = ddl_Play.SelectedValue;
        //String PlayDate = ddl_Date.SelectedValue;
        //PlayDate = PlayDate.Replace("-", "/");
        String Location = 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(Location, filmCode, PlayDate).Rows)
        {
            ddl_ShowTimes.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToShortTimeString(), dr[1].ToString().Trim()));
        }
        //UpdatePanel2.Update();
    }
Exemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["mailer"] != null)
         {
             VistaBOL.Event_Mailer_Tracker(GetIP(), DateTime.Now.ToString(), Request.QueryString["mailer"]);
         }
     }
 }
Exemplo n.º 11
0
    /// <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 (Request.QueryString["Valentine"] == "s")
        {
            ddl_Play.Items.Add(new ListItem("JHUMROO", "JHUMROO"));
        }
        else if (Request.QueryString["MMTD"] == "s")
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                if (dr[0].ToString() != "MANA")
                {
                    ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
                }
            }
        }
        else if (Request.QueryString["MMT"] == "MMTUS")
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                if (dr[0].ToString() != "MANA")
                {
                    ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
                }
            }
        }
        else if (Request.QueryString["MANA"] == "ManaPromo")
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                //if (dr[0].ToString() != "JHUMROO" && dr[0].ToString() != "ZANGOORA")
                if (dr[0].ToString() == "MANA")
                {
                    ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
                }
            }
        }
        else if (dtlocation != null && dtlocation.Rows.Count > 0)
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                if (dr[0].ToString() != "NEW YEAR14")
                {
                    ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
                }
            }
        }
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("End Load Play");
    }
Exemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Event Master PAge");
         if (Request.QueryString["mailer"] != null)
         {
             Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Event Master PAge" + Request.QueryString["mailer"]);
             VistaBOL.Event_Mailer_Tracker(GetIP(), DateTime.Now.ToString(), Request.QueryString["mailer"]);
         }
     }
 }
Exemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetAllPromostionCode();
         int list = listPromo.Count;
         ddlAgent.Items.Add("SELECT");
         for (int i = 0; i < list; i++)
         {
             ddlAgent.Items.Add(listPromo[i].PromotionCode);
         }
         ddlAgent.DataBind();
     }
 }
Exemplo n.º 14
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()));
        }
    }
Exemplo n.º 15
0
    void Load_Play()
    {
        ddl_Play.Items.Clear();
        DataTable dtlocation = VistaBOL.Select_AuditPlay();

        ddl_Play.Items.Add(new ListItem("Select", "0"));
        if (dtlocation != null && dtlocation.Rows.Count > 0)
        {
            foreach (DataRow dr in dtlocation.Rows)
            {
                ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
            }
        }
    }
Exemplo n.º 16
0
    /// <summary>
    ///  Fill up the categories based on the Show/Play selected.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddl_ShowTimes_SelectedIndexChanged(object sender, EventArgs e)
    {
        String filmCode = 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(filmCode);

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", Rs. " + String.Format("{0:#.##}",
                                                                                                              decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString()));
        }
        // UpdatePanel2.Update();
    }
Exemplo n.º 17
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)
            {
                ddl_Play.Items.Add(new ListItem(dr[0].ToString(), dr[0].ToString()));
            }
        }
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("End Load Play");
    }
    protected void btnMMTPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        String PNRnumber     = txtMMTPNR.Text;
        String PromotionCode = txtMMTPromotionCode.Text;
        int    list          = listPromo.Count;

        if (txtMMTPromotionCode.Text.ToString().Length == 0)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your Promotion Code";
            txtMMTPromotionCode.Focus();
            return;
        }
        else if (txtMMTPNR.Text == "")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your PNR Number";
            txtMMTPNR.Focus();
            return;
        }
        else
        {
            for (int i = 0; i < list; i++)
            {
                bool isMatchPromo = Regex.IsMatch(PromotionCode, listPromo[i].RegexValidator);
                bool isMatch      = Regex.IsMatch(PNRnumber, "(?![N|n][P|p][0]{12})^([N|n][P|p])[0-9]{12}$");
                bool isMatch2     = Regex.IsMatch(PNRnumber, "(?![N|n][H|h][0]{12})^([N|n][H|h])[0-9]{12}$");
                if ((isMatch || isMatch2) && isMatchPromo)
                {
                    if (listPromo[i].PromotionCode.ToString().ToUpper() == "MMTDOMESTIC")
                    {
                        listPromo[i].WebPromotionId = txtMMTPromotionCode.Text.ToUpper();
                        Session["PromotionCode"]    = listPromo[i];
                        Session["a" + listPromo[i].PromotionCode] = listPromo[i];
                        Session[listPromo[i].PromotionCode]       = listPromo[i];
                        Response.Redirect("Default.aspx?MMTD=s&promo=" + Encrypt(listPromo[i].PromotionCode));
                    }
                }
            }
            PromotionNotValid();
        }
    }
Exemplo n.º 19
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();
    }
Exemplo n.º 20
0
    /// <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")));
            }
        }
    }
Exemplo n.º 21
0
    protected void btnPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        String PromotionCode   = txtPromotionCode.Text;
        Int16  CampaignCounter = 1;

        foreach (KoDTicketingLibrary.DTO.Promotion item in listPromo)
        {
            if (txtPromotionCode.Text.ToString().Length == 0)
            {
                lblMsgPromotionCode.Visible = true;
                lblMsgPromotionCode.Text    = "Please Enter Your Promotion Code";
                txtPromotionCode.Focus();
            }
            else
            {
                bool isMatch = Regex.IsMatch(PromotionCode, "(?![M,m]+[R,r]+[T,t][0]{5})^([M|m][R|r][T|t])[0-9]{5}$|^([M|m][R|r][T||t])[9]{5}$");
                if (isMatch)
                {
                    item.WebPromotionId      = txtPromotionCode.Text.ToUpper();
                    Session["PromotionCode"] = item;
                    Response.Redirect("Default.aspx");
                }
                else
                {
                    if (CampaignCounter == listPromo.Count)
                    {
                        lblMsgPromotionCode.Visible = true;
                        lblMsgPromotionCode.Text    = "Promotion Code is not Valid";
                        txtPromotionCode.Text       = "";
                        txtPromotionCode.Focus();
                    }
                    else
                    {
                        CampaignCounter++;
                    }
                }
            }
        }
    }
Exemplo n.º 22
0
    protected void btnIndigoPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        String PNRnumber     = txtIndigoPNR.Text;
        String PromotionCode = txtIndigoPromotionCode.Text;
        int    list          = listPromo.Count;

        if (txtIndigoPromotionCode.Text.ToString().Length == 0)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your Promotion Code";
            txtIndigoPromotionCode.Focus();
            return;
        }
        else if (txtIndigoPNR.Text == "")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your PNR Number";
            txtIndigoPNR.Focus();
            return;
        }
        else
        {
            for (int i = 0; i < list; i++)
            {
                bool isMatchPromo = Regex.IsMatch(PromotionCode, listPromo[i].RegexValidator);
                bool isMatch      = Regex.IsMatch(PNRnumber, "^[A-Z a-z]{6}$");
                if (isMatch && isMatchPromo)
                {
                    if (listPromo[i].PromotionCode.ToString().ToUpper() == "INDIGOSL" || listPromo[i].PromotionCode.ToString().ToUpper() == "INDIGODM" || listPromo[i].PromotionCode.ToString().ToUpper() == "INDIGOGL" || listPromo[i].PromotionCode.ToString().ToUpper() == "INDIGOPL")
                    {
                        listPromo[i].WebPromotionId = txtIndigoPromotionCode.Text.ToUpper();
                        Session["PromotionCode"]    = listPromo[i];
                        Response.Redirect("Default.aspx?Indigo=s");
                    }
                }
            }
        }
        PromotionNotValid();
    }
Exemplo n.º 23
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddl_Date_SelectedIndexChanged(object sender, EventArgs e)
    {
        String filmCode = ddl_Play.SelectedValue;
        String PlayDate = ddl_Date.SelectedValue;

        PlayDate = PlayDate.Replace("-", "/"); //comment this for live deployment
        String Location = 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(Location, filmCode, PlayDate).Rows)
        {
            ddl_ShowTimes.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToShortTimeString(), dr[1].ToString().Trim()));
        }
    }
Exemplo n.º 24
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["ac"] != null)
            {
                Session["AgentCode"] = Request.QueryString["ac"];
            }
            Load_Play();
        }
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        int list = listPromo.Count;

        for (int i = 0; i < list; i++)
        {
            if (listPromo[i].PromotionCode.ToString().ToUpper() == "JHUMROOOFFER")
            {
                Session[listPromo[i].PromotionCode]       = listPromo[i];
                Session["a" + listPromo[i].PromotionCode] = listPromo[i];
            }
        }
    }
Exemplo n.º 25
0
    protected void dateofshow_TextChanged(object sender, EventArgs e)
    {
        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 filmCode = ddl_Play.SelectedValue;
        String Location = ddl_Location.SelectedValue;

        ddl_ShowTimes.Items.Clear();
        ddl_ShowTimes.Items.Add(new ListItem("Select", "0"));
        foreach (DataRow dr in VistaBOL.Select_PlayTime_AuditReport(Location, filmCode, PlayDate).Rows)
        {
            ddl_ShowTimes.Items.Add(new ListItem(Convert.ToDateTime(dr[0].ToString()).ToShortTimeString(), dr[1].ToString().Trim()));
        }
    }
Exemplo n.º 26
0
    protected void btnMMTPromotionCode_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();
        string sum = GTICKBOL.MMTpackage_check(txtMMTPNR.Text);

        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("MMT ticket sum: " + sum);
        String PNRnumber     = txtMMTPNR.Text;
        String PromotionCode = txtMMTPromotionCode.Text;
        int    list          = listPromo.Count;
        int    no            = int.Parse(sum);
        int    select        = int.Parse(ddl_noofpackage.SelectedValue.ToString());

        if (no >= 4)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Sorry, maximum 4 bookings are allowed on each Booking Id.";
            txtMMTPromotionCode.Text    = "";
            txtMMTPNR.Text = "";
            txtMMTPromotionCode.Focus();
            return;
        }
        else if ((no + select) > 4)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Sorry, you can select only " + (4 - no) + " package";;
            txtMMTPromotionCode.Text    = "";
            txtMMTPNR.Text = "";
            txtMMTPromotionCode.Focus();
            return;
        }
        else if (txtMMTPromotionCode.Text.ToString().Length == 0)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your Promotion Code";
            txtMMTPromotionCode.Focus();
            return;
        }
        else if (txtMMTPNR.Text == "")
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Please Enter Your PNR Number";
            txtMMTPNR.Focus();
            return;
        }
        else if (chkterms.Checked == false)
        {
            lblMsgPromotionCode.Visible = true;
            lblMsgPromotionCode.Text    = "Accept terms and conditions";
            txtMMTPNR.Focus();
            return;
        }
        else
        {
            for (int i = 0; i < list; i++)
            {
                bool isMatchPromo = Regex.IsMatch(PromotionCode, listPromo[i].RegexValidator);
                bool isMatch      = Regex.IsMatch(PNRnumber, "(?![U|u][S|s][0]{4}[B|b][0]{5})^([U|u][S|s][0-9]{4}[B|b]{1}[0-9]{5})$");
                bool isMatch1     = Regex.IsMatch(PNRnumber, "(?![A|a][N|n][0]{12})^([A|a][N|n])[0-9]{12}$");
                bool isMatch2     = Regex.IsMatch(PNRnumber, "(?![U|u][S|s][0]{4}[B|b]{1}[A-Z a-z 0-9]{7})^([U|u][S|s][0-9]{4}[B|b]{1}[A-Z a-z 0-9]{7})$");
                bool isMatch3     = Regex.IsMatch(PNRnumber, "(?![U|u][N|n][0]{4}[B|b]{1}[A-Z a-z 0-9]{7})^([U|u][N|n][0-9]{4}[B|b]{1}[A-Z a-z 0-9]{7})$");
                if ((isMatch || isMatch1 || isMatch2 || isMatch3) && isMatchPromo)
                {
                    if (listPromo[i].PromotionCode.ToString().ToUpper() == "MMT")
                    {
                        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("MMT end date: " + listPromo[i].EndDate.ToString());
                        decimal TotalAmount   = Convert.ToDecimal(ddl_noofpackage.SelectedValue) * Convert.ToDecimal("6000");
                        decimal PayableAmount = Convert.ToDecimal("4500") * Convert.ToDecimal(ddl_noofpackage.SelectedValue);
                        Session["PromotionCode"]                  = listPromo[i];
                        Session[listPromo[i].PromotionCode]       = listPromo[i];
                        Session["a" + listPromo[i].PromotionCode] = listPromo[i];
                        Session["Hotel"]         = listPromo[i].PromotionCode.ToString();
                        Session["PayableAmount"] = PayableAmount;
                        Session["TotalAmount"]   = TotalAmount;
                        Session["NoofPackages"]  = ddl_noofpackage.SelectedValue.ToString();
                        Session["pnr"]           = txtMMTPNR.Text.ToUpper();
                        Session["Package"]       = "4500";
                        Session["promocode"]     = txtMMTPromotionCode.Text.ToUpper();
                        //Session["day"] = ddl_date.SelectedItem.Text.ToString();
                        Response.Redirect("Default.aspx?MMT=MMTUS&promo=" + Encrypt(listPromo[i].PromotionCode));
                    }
                }
            }
        }
        PromotionNotValid();
    }
Exemplo n.º 27
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddl_Category_SelectedIndexChanged(object sender, EventArgs e)
    {
        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 (Request.QueryString["Valentine"] == "s")
        {
            drp_TotalSeats.SelectedIndex = 2;
            drp_TotalSeats.Enabled       = false;
        }
        else if (Request.QueryString["MANA"] == "ManaPromo")
        {
            int requiredseats = int.Parse(Session["NoofPackages"].ToString()) * 4;
            if (availableSeats == 0 || availableSeats < requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
            }
            else if (availableSeats >= requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem(requiredseats.ToString(), requiredseats.ToString()));
            }
        }
        else if (Request.QueryString["FAMILYOFFER"] == "FamilyOffer")
        {
            int requiredseats = int.Parse(Session["NoofPackages"].ToString()) * 4;
            if (availableSeats == 0 || availableSeats < requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
            }
            else if (availableSeats >= requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem(requiredseats.ToString(), requiredseats.ToString()));
            }
        }
        else if (Request.QueryString["MMT"] == "MMTUS")
        {
            int requiredseats = int.Parse(Session["NoofPackages"].ToString());
            if (availableSeats == 0 || availableSeats < requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
            }
            else if (availableSeats >= requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem(requiredseats.ToString(), requiredseats.ToString()));
            }
        }
        else if (Request.QueryString["Yatra"] == "S")
        {
            int requiredseats = int.Parse(Session["NoofTickets"].ToString());
            if (availableSeats == 0 || availableSeats < requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
            }
            else if (availableSeats >= requiredseats)
            {
                drp_TotalSeats.Items.Add(new ListItem(requiredseats.ToString(), requiredseats.ToString()));
            }
        }
        else if (Request.QueryString["WMC"] == "S" || Request.QueryString["NWMCT"] == "S")
        {
            const ushort MAX_SEATS = 4;
            if (availableSeats > 0)     //if there are seats available...
            {
                //ensure only MAX per transaction are allowed for selection
                availableSeats = (availableSeats > MAX_SEATS) ? 4 : 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"));
            }
        }
        //else if (Request.QueryString["NWMCP"] == "S")
        //{
        //    int requiredseats = int.Parse(Session["MCOTHERSNOOFPACKAGE"].ToString()) * 2;
        //        if (availableSeats > 0) //if there are seats available...
        //        {
        //            if (availableSeats >= requiredseats)
        //            {
        //                drp_TotalSeats.Items.Add(new ListItem(requiredseats.ToString(), requiredseats.ToString()));
        //            }
        //        }
        //        else //otherwise mark sold out
        //        {
        //            drp_TotalSeats.Items.Add(new ListItem("Sold Out", "0"));
        //        }
        //}
        else
        {
            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"));
            }
        }
        // UpdatePanel2.Update();
    }
Exemplo n.º 28
0
    /// <summary>
    ///  Fill up the categories based on the Show/Play selected.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddl_ShowTimes_SelectedIndexChanged(object sender, EventArgs e)
    {
        String filmCode = 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(filmCode);

        if (promotions == false)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", Rs. " + String.Format("{0:#.##}",
                                                                                                                  decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString()));
            }
        }
        else
        {
            KoDTicketingLibrary.DTO.Promotion PromoSession = (KoDTicketingLibrary.DTO.Promotion)Session["a" + Decrypt(Request.QueryString["promo"])];
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[i][0].ToString() == "BZ")
                {
                    if (PromoSession.BZ == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", 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][0].ToString() == "CO")
                {
                    if (PromoSession.CO == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", 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][0].ToString() == "SL")
                {
                    if (PromoSession.SL == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", 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][0].ToString() == "DM")
                {
                    if (PromoSession.DM == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", 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][0].ToString() == "PL")
                {
                    if (PromoSession.PL == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", 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][0].ToString() == "GL")
                {
                    if (PromoSession.GL == 1)
                    {
                        ddl_Category.Items.Add(new ListItem(ds.Tables[0].Rows[i][1].ToString() + ", Rs. " + String.Format("{0:#.##}",
                                                                                                                          decimal.Parse(ds.Tables[0].Rows[i][2].ToString())), ds.Tables[0].Rows[i][0].ToString()));
                    }
                }
            }
        }
        // UpdatePanel2.Update();
    }
Exemplo n.º 29
0
    /// <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")));
                }
            }
        }
    }
Exemplo n.º 30
0
    protected void btn_Submit_Click(object sender, EventArgs e)
    {
        List <KoDTicketingLibrary.DTO.Promotion> listPromo = VistaBOL.GetPromostionCode();

        Session["Package"] = ddl_Package1.SelectedValue;

        int    list     = listPromo.Count;
        string category = "";
        string PC       = "";

        if (Session["Package"] == "Rs.1275")
        {
            PC = "MONTHOFMARCH";
        }
        else if (Session["Package"] == "Rs.4999")
        {
            PC = "MARCHPROMOTION";
        }
        for (int i = 0; i < list; i++)
        {
            if (listPromo[i].PromotionCode.ToString().ToUpper() == PC.ToString())
            {
                string WebPromotionId = "KOD40MOM";
                listPromo[i].WebPromotionId = WebPromotionId.ToUpper();
                Session["PromotionCode"]    = listPromo[i];
                Session["Hotel"]            = listPromo[i].PromotionCode.ToString();
                if (listPromo[i].CO == 1)
                {
                    category = "COPPER";
                }
                else if (listPromo[i].SL == 1)
                {
                    category = "SILVER";
                }
                else if (listPromo[i].GL == 1)
                {
                    category = "GOLD";
                }
                else if (listPromo[i].PL == 1)
                {
                    category = "PLATINUM";
                }
                else if (listPromo[i].BZ == 1)
                {
                    category = "BRONZE";
                }
                else if (listPromo[i].DM == 1)
                {
                    category = "DIAMOND";
                }
            }
        }

        String PlayDate = Convert.ToDateTime(ddl_Date.SelectedItem.Text).ToString("dd/MM/yyyy");

        if (Session["Package"] == "Rs.1275")
        {
            Session["seat_Val"] = "NMJM" + "," + "JHUMROO" + "," + PlayDate +
                                  "," + ddl_ShowTime.SelectedValue + "," + "SL" + "," + ddl_Quantity.SelectedValue +
                                  "," + "Jhumroo @ Nautanki Mahal" + "," + "2:30 PM" + "," + category;
            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Render Seat Layout for " + Session["seat_Val"].ToString());
            if (Session["Hotel"] == null)
            {
                Session["Hotel"] = "";
            }
            Response.Redirect("Seat-Layout.aspx?March=s", false);
        }

        else if (Session["Package"] == "Rs.4999")
        {
            Session["seat_Val"] = "NMJM" + "," + "JHUMROO" + "," + PlayDate +
                                  "," + ddl_ShowTime.SelectedValue + "," + "GL" + "," + ddl_Quantity.SelectedValue +
                                  "," + "Jhumroo @ Nautanki Mahal" + "," + "7:30 PM" + "," + category;
            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Render Seat Layout for " + Session["seat_Val"].ToString());
            if (Session["Hotel"] == null)
            {
                Session["Hotel"] = "";
            }
            Response.Redirect("Seat-Layout.aspx?March=s", false);
        }
    }