protected void GridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
        HiddenField hfCampaignIdDeleted = (HiddenField)row.FindControl("hfMobileBrandId");

        string s = hfCampaignIdDeleted.Value;

        try
        {
            DataTable CamaignDetail = MoviesLogicLayer.GetAllIDWiseMoviesDetials(s);
            hfScreenId.Value = s;
            TxtmovieBookingStartDate.Text = CamaignDetail.Rows[0]["Startbooking"].ToString();
            TxtMovieBookingStopDate.Text  = CamaignDetail.Rows[0]["Stopbooking"].ToString();
            TxtmovieOutDate.Text          = CamaignDetail.Rows[0]["ExpiryDate"].ToString();
            TxtMoviesName.Text            = CamaignDetail.Rows[0]["MoviesName"].ToString();
            TxtRealseDate.Text            = CamaignDetail.Rows[0]["RealsieDate"].ToString();
            ddlScreenName.SelectedValue   = CamaignDetail.Rows[0]["ScreenId"].ToString();
            ViewState["MovieImage"]       = CamaignDetail.Rows[0]["Moviesdesc"].ToString();
            BtnSave.Text = "UPDATE";
            TableCellPhoneBrand.Visible = true;
            BtnNew.Visible = false;
        }
        catch (Exception)
        {
        }
    }
    private void CityWiseData()
    {
        //
        string Id = "";

        if (Request.Cookies["City"] != null)
        {
            //Response.Cookies["City"].Value = ddlCity.SelectedValue.ToString();
            ddlCity.SelectedValue = Request.Cookies["City"].Value;
            Id = Request.Cookies["City"].Value;
        }
        else
        {
            HttpCookie CityCookies = new HttpCookie("City");
            CityCookies.Value   = ddlCity.SelectedValue.ToString();
            CityCookies.Expires = DateTime.Now.AddHours(1);
            Response.Cookies.Add(CityCookies);
        }

        DataTable CamaignDetail = CityLogicLayer.GetAllIDWiseCityDetials(Id);

        if (CamaignDetail.Rows.Count > 0)
        {
            lnkbtnCityName.InnerHtml = CamaignDetail.Rows[0]["CityName"].ToString();
            DataTable AccessoricesHeader = MoviesLogicLayer.GetAllMoviesDetialsWithCity(Id);
            DlForDisplayAccessoricesHeader.DataSource = AccessoricesHeader;
            DlForDisplayAccessoricesHeader.DataBind();
            mp1.Hide();
        }
        else
        {
            mp1.Show();
        }
    }
 protected void Rptmovies_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "SetVideo")
     {
         DataTable CamaignDetail = MoviesLogicLayer.GetAllIDWiseMoviesDetials(e.CommandArgument.ToString());
         lblVideo.Text = CamaignDetail.Rows[0]["MoviesTrailer"].ToString();
         ModalPopupvideo.Show();
     }
 }
    protected void DlForDisplayAccessoricesHeader_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        DataRowView drv           = e.Item.DataItem as DataRowView;
        string      Str           = ((Label)e.Item.FindControl("lblDLAssCompanyProductNameId")).Text;
        Repeater    innerDataList = e.Item.FindControl("RptAccessories") as Repeater;

        innerDataList.DataSource = MoviesLogicLayer.GetAllMoviesDetialsWithTheatres(Str);
        innerDataList.DataBind();
    }
Пример #5
0
 private void GridFill()
 {
     dt = MoviesLogicLayer.GetAllMoviesDetials();
     GridView1.DataSource = dt;
     GridView1.DataBind();
     ddlScreenName.DataSource     = ScreenLogicLayer.GetAllScreenSelect();
     ddlScreenName.DataTextField  = "ScreenName";
     ddlScreenName.DataValueField = "ScreenId";
     ddlScreenName.DataBind();
 }
    private void GridFill()
    {
        string TheatresId = Session["TheatresId"].ToString();

        dt = MoviesLogicLayer.GetAllMoviesDetialsWithThertresId(TheatresId);
        GridView1.DataSource = dt;
        GridView1.DataBind();
        ddlScreenName.DataSource     = ScreenLogicLayer.GetAllScreenSelecttherters(TheatresId);
        ddlScreenName.DataTextField  = "ScreenName";
        ddlScreenName.DataValueField = "ScreenId";
        ddlScreenName.DataBind();
    }
    protected void GridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
        HiddenField hfVendorIdDeleted = (HiddenField)row.FindControl("hfMobileBrandId");

        string s = hfVendorIdDeleted.Value;

        LblMessage.Text = MoviesLogicLayer.DeleteMoviesDetials(s);

        GridFill();
        Clear();
    }
    protected void BtnUpdate_Click(object sender, EventArgs e)
    {
        MoviesLogicLayer mobile = new MoviesLogicLayer();

        mobile.MoviesId = hfScreenId.Value.ToString();
        String Id = System.IO.Path.GetExtension(FUMovieImage.FileName).ToLower();

        mobile.Stopbooking = Convert.ToDateTime(TxtMovieBookingStopDate.Text.Trim()).ToString("yyyy-MMM-dd");
        mobile.ExpiryDate  = Convert.ToDateTime(TxtmovieOutDate.Text.Trim()).ToString("yyyy-MMM-dd");
        if (Id != "")
        {
            mobile.MoviesDesc = Id;
        }
        else
        {
            mobile.MoviesDesc = ViewState["MovieImage"].ToString();
        }
        mobile.MoviesName   = TxtMoviesName.Text.Trim();
        mobile.RealsieDate  = Convert.ToDateTime(TxtRealseDate.Text.Trim()).ToString("yyyy-MMM-dd");
        mobile.ScreenId     = ddlScreenName.SelectedValue.ToString();
        mobile.Startbooking = Convert.ToDateTime(TxtmovieBookingStartDate.Text.Trim()).ToString("yyyy-MMM-dd");
        mobile.EntryDate    = DateTime.Now.ToString("yyyy-MMM-dd");
        mobile.Entryby      = "1";
        mobile.UpdateDate   = DateTime.Now.ToString("yyyy-MMM-dd");
        mobile.Updateby     = "1";

        LblMessage.Text = MoviesLogicLayer.updateMoviesDetials(mobile);
        if (Id != "")
        {
            FUMovieImage.SaveAs(MapPath("~/Admin//MovieImage//" + hfScreenId.Value + Id));
        }
        else
        {
        }
        RequiredFieldValidator2.Visible = false;
        GridFill();
        Clear();
    }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] != null)
        {
            if (!Page.IsPostBack)
            {
                Id = Convert.ToString(Request.QueryString["Id"]);
                Paltium();
                ViewState["DtBooking"] = tableBooking;
            }
            if (Session["UserId"] == null)
            {
                ALogin.Visible  = true;
                Lbl2.Visible    = true;
                ASignup.Visible = true;
                lbl4.Visible    = false;
                ALogOut.Visible = false;
                lbl3.Visible    = false;
            }
            else
            {
                ALogin.Visible       = false;
                Lbl2.Visible         = false;
                ASignup.Visible      = false;
                lbl4.Visible         = true;
                ALogOut.Visible      = true;
                lbl3.Visible         = true;
                lblUserSettings.Text = Convert.ToString(Session["UserName"]);
            }
            try
            {
                Id = Convert.ToString(Request.QueryString["Id"]);
                DataTable CamaignDetail = MoviesLogicLayer.GetAllIDWiseMoviesDetials(Id);
                ImgAss.ImageUrl = "~/Admin\\MovieImage\\" + CamaignDetail.Rows[0]["MoviesImage"].ToString();

                lblHomeHeader.Text = Convert.ToString(CamaignDetail.Rows[0]["MoviesName"]);
                if (Convert.ToString(CamaignDetail.Rows[0]["GoldRate"]) != "0")
                {
                    LinkButtonGold.Visible = true;
                }
                else
                {
                    LinkButtonGold.Visible = false;
                }
                if (Convert.ToString(CamaignDetail.Rows[0]["PaltiumRate"]) != "0")
                {
                    LinkButtonPaltium.Visible = true;
                }
                else
                {
                    LinkButtonPaltium.Visible = false;
                }
                if (Convert.ToString(CamaignDetail.Rows[0]["SilverRate"]) != "0")
                {
                    LinkButtonSilver.Visible = true;
                }
                else
                {
                    LinkButtonSilver.Visible = false;
                }

                DataSet ProductDetails = AccessoriesProductDetailLogicLayer.GetAllIDWiseAccessoriesProductDetailDetials(Id);
            }
            catch (Exception)
            { }
        }
        else
        {
            Response.Redirect("Default.aspx?login=box");
        }
    }
Пример #10
0
    private void Sliver()
    {
        Booktime();
        DataTable CamaignDetail = MoviesLogicLayer.GetAllIDWiseMoviesDetials(Id);

        lblClass.Text      = "Silver";
        hfMoviesId.Value   = Convert.ToString(CamaignDetail.Rows[0]["MoviesId"]);
        lblMovieName.Text  = Convert.ToString(CamaignDetail.Rows[0]["MoviesName"]);
        lblRate.Text       = Convert.ToString(CamaignDetail.Rows[0]["SilverRate"]);
        lblScreenName.Text = Convert.ToString(CamaignDetail.Rows[0]["ScreenName"]);
        for (int i = 0; i < Convert.ToInt32(CamaignDetail.Rows[0]["SilverSeat"]); i++)
        {
            table.Rows.Add(i, 1);
        }
        DateTime RelaseDate = Convert.ToDateTime(CamaignDetail.Rows[0]["RealsieDate"]);

        if (RelaseDate >= DateTime.Now)
        {
            DateTime ExpiryDate = Convert.ToDateTime(CamaignDetail.Rows[0]["ExpiryDate"]);

            rdobtnD1.Text = RelaseDate.ToString("dd-MMM-yyyy");
            if (ExpiryDate >= DateTime.Now.AddDays(1))
            {
                rdobtnD2.Text = RelaseDate.AddDays(1).ToString("dd-MMM-yyyy");
            }
            else
            {
                rdobtnD2.Visible = true;
            }
            if (ExpiryDate >= DateTime.Now.AddDays(2))
            {
                rdobtnD3.Text = RelaseDate.AddDays(2).ToString("dd-MMM-yyyy");
            }
            else
            {
                rdobtnD3.Visible = true;
            }
        }
        else
        {
            DateTime ExpiryDate = Convert.ToDateTime(CamaignDetail.Rows[0]["ExpiryDate"]);
            if (ExpiryDate >= DateTime.Now)
            {
                rdobtnD1.Text = DateTime.Now.ToString("dd-MMM-yyyy");
            }
            else
            {
                rdobtnD1.Visible = false;
            }
            if (ExpiryDate >= DateTime.Now.AddDays(1))
            {
                rdobtnD2.Text = DateTime.Now.AddDays(1).ToString("dd-MMM-yyyy");
            }
            else
            {
                rdobtnD2.Visible = false;
            }
            if (ExpiryDate >= DateTime.Now.AddDays(2))
            {
                rdobtnD3.Text = DateTime.Now.AddDays(2).ToString("dd-MMM-yyyy");
            }
            else
            {
                rdobtnD3.Visible = false;
            }
        }
        if (rdobtnD1.Visible == false && rdobtnD2.Visible == false && rdobtnD3.Visible == false)
        {
            rpt.Visible          = false;
            btnSubmit.Visible    = false;
            RadioButton1.Visible = false;
            RadioButton2.Visible = false;
            RadioButton3.Visible = false;
            RadioButton4.Visible = false;
        }
        else
        {
            rpt.Visible          = true;
            btnSubmit.Visible    = true;
            RadioButton1.Visible = true;
            RadioButton2.Visible = true;
            RadioButton3.Visible = true;
            RadioButton4.Visible = true;
        }
        string BookingDate = "";

        if (rdobtnD1.Checked == true)
        {
            BookingDate = rdobtnD1.Text;
        }
        else if (rdobtnD2.Checked == true)
        {
            BookingDate = rdobtnD2.Text;
        }
        else if (rdobtnD3.Checked == true)
        {
            BookingDate = rdobtnD3.Text;
        }
        string BookingTime = "";

        if (RadioButton1.Checked == true)
        {
            BookingTime = "1";
        }
        else if (RadioButton2.Checked == true)
        {
            BookingTime = "2";
        }
        else if (RadioButton3.Checked == true)
        {
            BookingTime = "3";
        }
        else if (RadioButton4.Checked == true)
        {
            BookingTime = "4";
        }

        DataTable DtSeat12 = BookingSeatLogicLayer.GetAllIDWiseBookingSeat(hfMoviesId.Value, TypeId, BookingDate, BookingTime);

        for (int i = 0; i < Convert.ToInt32(CamaignDetail.Rows[0]["GoldSeat"]); i++)
        {
            for (int j = 0; j < DtSeat12.Rows.Count; j++)
            {
                if (Convert.ToInt32(DtSeat12.Rows[j]["SeatNo"]) == i + 1)
                {
                    table.Rows[i]["type"] = "2";
                }
            }
        }
        ViewState["dtTable"] = table;
        rpt.DataSource       = (DataTable)ViewState["dtTable"];
        rpt.DataBind();
        RptCateen.DataSource = CateenMasterLogicLayer.GetAllIDWiseCateenMasterDetialsT(Convert.ToString(CamaignDetail.Rows[0]["TheatresNameId"]));
        RptCateen.DataBind();
    }
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        if (BtnSave.Text == "SAVE")
        {
            MoviesLogicLayer mobile = new MoviesLogicLayer();
            String           Id     = System.IO.Path.GetExtension(FUMovieImage.FileName).ToLower();
            mobile.Stopbooking  = Convert.ToDateTime(TxtMovieBookingStopDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.ExpiryDate   = Convert.ToDateTime(TxtmovieOutDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.MoviesDesc   = Id;
            mobile.MoviesName   = TxtMoviesName.Text.Trim();
            mobile.RealsieDate  = Convert.ToDateTime(TxtRealseDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.ScreenId     = ddlScreenName.SelectedValue.ToString();
            mobile.Startbooking = Convert.ToDateTime(TxtmovieBookingStartDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.EntryDate    = DateTime.Now.ToString("yyyy-MMM-dd");
            mobile.Entryby      = "1";
            mobile.UpdateDate   = DateTime.Now.ToString("yyyy-MMM-dd");
            mobile.Updateby     = "1";
            String str = MoviesLogicLayer.InsertMoviesDetials(mobile);
            if (str.Length < 8)
            {
                FUMovieImage.SaveAs(MapPath("~/Admin//MovieImage//" + str + Id));
                LblMessage.Text = "Successfully Save";
            }
            else
            {
                LblMessage.Text = "Detail Not Saved...";
            }
            GridFill();
            Clear();
        }
        else
        {
            MoviesLogicLayer mobile = new MoviesLogicLayer();
            mobile.MoviesId = hfScreenId.Value.ToString();
            String Id = System.IO.Path.GetExtension(FUMovieImage.FileName).ToLower();
            mobile.Stopbooking = Convert.ToDateTime(TxtMovieBookingStopDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.ExpiryDate  = Convert.ToDateTime(TxtmovieOutDate.Text.Trim()).ToString("yyyy-MMM-dd");
            if (Id != "")
            {
                mobile.MoviesDesc = Id;
            }
            else
            {
                mobile.MoviesDesc = ViewState["MovieImage"].ToString();
            }
            mobile.MoviesName   = TxtMoviesName.Text.Trim();
            mobile.RealsieDate  = Convert.ToDateTime(TxtRealseDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.ScreenId     = ddlScreenName.SelectedValue.ToString();
            mobile.Startbooking = Convert.ToDateTime(TxtmovieBookingStartDate.Text.Trim()).ToString("yyyy-MMM-dd");
            mobile.EntryDate    = DateTime.Now.ToString("yyyy-MMM-dd");
            mobile.Entryby      = "1";
            mobile.UpdateDate   = DateTime.Now.ToString("yyyy-MMM-dd");
            mobile.Updateby     = "1";

            LblMessage.Text = MoviesLogicLayer.updateMoviesDetials(mobile);
            if (Id != "")
            {
                FUMovieImage.SaveAs(MapPath("~/Admin//MovieImage//" + hfScreenId.Value + Id));
            }
            else
            {
            }
            GridFill();
            Clear();
        }
    }