using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
using System.IO;

public partial class MasterPages_MasterPageOutSide : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            titlename.Text = Convert.ToString(Session["comp_name"]);
        }

        if (Session["agid"] == null)
        {
            Response.Redirect("~/login.aspx");
        }


        img_logo.ImageUrl = "~/images/logo.png";
        lbl_agentid.Text = Convert.ToString(Session["fagid"]);

        lbl_availablebalance.Text= Convert.ToString(Convert.ToDouble(Session["agent_amount"]));


        //lbl_availablebalance.Text = Convert.ToString(Session["agent_amount"]); ;
        lbl_companyname.Text = Convert.ToString(Session["agency_name"]); ;
        lbl_copyright.Text = Convert.ToString(Session["copy"]);
        lbl_powered.Text = Convert.ToString(Session["comp_name"]);




    }




   
    protected void btfligt_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Flight/User/Index.aspx");
        //Response.Redirect("http://intlair.travelepoint.in/user/signin.aspx?user_id=" + Convert.ToString(Session["usernam"]), false);
    }
    protected void btnhotel_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Hotel/HotelBooking/index.aspx");
        //Response.Redirect("http://hotel.travelepoint.in/HotelBooking/Hotellogin.aspx?user_id=" + Convert.ToString(Session["usernam"]), false);
    }
    protected void btnbus_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Bus/Booking/Home.aspx");
       // Response.Redirect("http://bus.travelepoint.in/booking/buslogin.aspx?user_id=" + Convert.ToString(Session["usernam"]), false);
    }
    protected void bthome_Click(object sender, EventArgs e)
    {
        // Redirect_To_Agent_Home(Convert.ToString(Session["Agent_login_url"]), Convert.ToString(Session["Agent_Domain"]), Convert.ToString(Session["U_pass"]), Convert.ToString(Session["usernam"]));
        Response.Redirect("~/Agent/Index.aspx");
        //Response.Redirect("http://intlair.travelepoint.in/user/signin.aspx?user_id=" + Convert.ToString(Session["usernam"]), false);
    }

    protected void btnsignout_Click(object sender, ImageClickEventArgs e)
    {
       // Session.RemoveAll();
       // Response.Redirect("http://agent.travelepoint.com/agent/", false);
          Response.Redirect("~/login.aspx", false);
          Session.RemoveAll();
    }

     public void Redirect_To_Agent_Home(string login_url, string Domain_url, string pass,string username)
    {

        string final_url = login_url + "/back.jsp?param=homePage&serverdomain=" + Domain_url + "&userName=" + username + "&pass=" + pass;
        Response.Redirect(final_url );

    }

     protected void btndmr_Click(object sender, EventArgs e)
     {
        // Response.Redirect("http://dmrlive.commsoft.co.in/Login.aspx?id=" + Convert.ToString(Session["agid"]), false);
    
     }
}
