using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

using System.Configuration;
using MySql.Data.MySqlClient;
using MySql.Data;
using CLS_BL;
using CLS_DL;
using CLS_PL;

namespace SUNWEB
{
    public partial class Light : System.Web.UI.MasterPage
    {

        BL_SELECT ObjSel = new BL_SELECT();
        BLCompany ObjBL = new BLCompany();
        PLCOMMON ObjPL = new PLCOMMON();
        BL_USER ObjUserBL = new BL_USER(); //This Object for All User and Page Related fuctions included 
        PLCUSTOMER ObjCustPL = new PLCUSTOMER();
        MYSQLCLOUD ObjMain = new MYSQLCLOUD();
        string cd_ID = string.Empty;
        string cm_ID = string.Empty;
        string CompanyName = string.Empty;
        DataTable Dt = new DataTable();
        // Notification Variable
        string OrderCnt = string.Empty;
        string ReOrderCnt = string.Empty;
        string ActiveCallvalue = string.Empty;
        string ChkTableExist = string.Empty;

        // Reorder Variables 

        DataTable DtResult = new DataTable();
        DataTable DTFinalReorderdata = new DataTable();


        // Other Variables 

        string Branchid = string.Empty;
        string BranchName = string.Empty;
        string DatabaseName = string.Empty;
        string RCount = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {

            if (Session["UserName"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            if (!string.IsNullOrEmpty(Session["UserName"] as string))
            {
                lblSessionUser.Text = Session["UserName"].ToString();
            }

            cd_ID = Session["Cd_Id"].ToString();
            cm_ID = ObjSel.GETcmid(cd_ID);
            CompanyName = ObjSel.GetComp_Name(cm_ID);
            lblCompanyName.Text = CompanyName;
            lblCompanyLable.Text = CompanyName;

            Dt = ObjSel.GetNotificationList();
            dtNotification.DataSource = Dt;
            dtNotification.DataBind();


            #region    Active Page Selection

            if (Page.TemplateControl.AppRelativeVirtualPath.Equals("~/SummaryReport_light.aspx", StringComparison.OrdinalIgnoreCase))
            {
                rSummaryReport_light.Attributes.Add("Style", "color:#fff");
            }

            if (Page.TemplateControl.AppRelativeVirtualPath.Equals("~/ItemSale.aspx", StringComparison.OrdinalIgnoreCase))
            {
                rItemSale_light.Attributes.Add("Style", "color:#fff");
            }

            if (Page.TemplateControl.AppRelativeVirtualPath.Equals("~/TaxAnalysis.aspx", StringComparison.OrdinalIgnoreCase))
            {
                rTaxAnalysis_light.Attributes.Add("Style", "color:#fff");
            }

            #endregion




        }
    }
}