using System;
using System.Data;
using System.Globalization;
using System.Resources;
using System.Threading;
using System.Web.UI;
public partial class Reports_TA_UI_Report_OrgSettings : Base.BasePage
{
    CultureInfo ci;
    ResourceManager rm;
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking
        base.Page_Load(sender, e);
        if (!Page.IsPostBack)
        {
            base.CheckPages(0);
        }
        string source_Language;
        source_Language = Convert.ToString(Session["Session_ActiveLanguage"]);
        rm = new ResourceManager(source_Language, System.Reflection.Assembly.Load("App_GlobalResources"));
        ci = Thread.CurrentThread.CurrentCulture;
        site.SiteMapProvider = Convert.ToString(Session["SiteMapProvider"]);
        LoadStrings(ci);
        UserRights();
    }
    private void UserRights()
    {
        Cls_CheckUser objCheckUser = new Cls_CheckUser();
        DataSet ds_Checkuser = new DataSet();
        ds_Checkuser = objCheckUser.checkRights(80, Convert.ToInt32(Session["userGroup_Id"]), "viewPrv");
        if (ds_Checkuser.Tables[0].Rows.Count > 0)
        {
            if (ds_Checkuser.Tables[0].Rows[0]["viewPrv"] == DBNull.Value || Convert.ToInt32(ds_Checkuser.Tables[0].Rows[0]["viewPrv"]) == 1)
            {
                btn_View.Visible = true;
            }
            else
            {
                btn_View.Visible = false;
            }
        }
        else
        {
            Response.Redirect("ReportsLandingPage.aspx");
        }
    }
    private void LoadStrings(CultureInfo ci)
    {
        btn_View.Text = "&nbsp;&nbsp" + rm.GetString("btn_View", ci);
        lblHeader.Text = rm.GetString("Organization_Report", ci);
        lblFilter.Text = rm.GetString("lblFilter", ci);

        //lblHeader1.Text = rm.GetString("Organization_Report", ci);
    }
    protected void btn_View_Click(object sender, EventArgs e)
    {
        Response.Redirect("Report_OrgSettings.aspx");
    }
}
