protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Master == null)
            {
                return;
            }
            ((HtmlControl)this.Master.FindControl("reports")).Attributes.Add("class", "active open");
            MembershipUser user = Membership.GetUser();

            if (user != null)
            {
                string str = user.ToString();
                if (Roles.IsUserInRole(str, "Admin"))
                {
                    this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str);
                    if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
                else if (Roles.IsUserInRole(str, "Employee"))
                {
                    this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str);
                    if (this.objStaffMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
                this.imgLogo.ImageUrl = Doyingo.SetCompanyLogo(this.hfCompanyID.Value);
                this.SetMiscValues(this.hfCompanyID.Value);
            }
            if (this.IsPostBack)
            {
                return;
            }
            DateTime dateTime = new DateTime(DateTime.Now.Year, 1, 1);
            DateTime now      = DateTime.Now;

            this.txtDateFrom.Text     = dateTime.ToString(this.dateFormat);
            this.txtDateTo.Text       = now.ToString(this.dateFormat);
            this.ceDateFrom.StartDate = new DateTime?(DateTime.Now);
            this.BindGrid();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Master == null)
            {
                return;
            }
            ((HtmlControl)this.Master.FindControl("reports")).Attributes.Add("class", "active open");
            if (!this.IsPostBack)
            {
                this.ddlMonth.SelectedValue = DateTime.Now.Month.ToString();
                this.ddlYear.Items.Add(new ListItem(DateTime.Now.Year.ToString(), DateTime.Now.Year.ToString()));
                this.ddlYear.SelectedValue = DateTime.Now.Year.ToString();
                this.BindGrid();
            }
            MembershipUser user = Membership.GetUser();

            if (user == null)
            {
                return;
            }
            string str = user.ToString();

            if (Roles.IsUserInRole(str, "Admin"))
            {
                this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str);
                if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                {
                    this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                }
            }
            else if (Roles.IsUserInRole(str, "Employee"))
            {
                this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str);
                if (this.objStaffMasterDT.Rows.Count > 0)
                {
                    this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                }
            }
            this.imgLogo.ImageUrl = Doyingo.SetCompanyLogo(this.hfCompanyID.Value);
            this.SetMiscValues(this.hfCompanyID.Value);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Master == null)
            {
                return;
            }
            ((HtmlControl)this.Master.FindControl("reports")).Attributes.Add("class", "active open");
            if (!this.IsPostBack)
            {
                this.ddlYear.Items.AddRange(Enumerable.ToArray <ListItem>(Enumerable.Select <int, ListItem>(Enumerable.Range(DateTime.Now.Year - 12, 13), (Func <int, ListItem>)(enumerable => new ListItem(enumerable.ToString((IFormatProvider)CultureInfo.InvariantCulture))))));
                this.ddlYear.SelectedIndex = this.ddlYear.Items.IndexOf(this.ddlYear.Items.FindByText(DateTime.Now.Year.ToString((IFormatProvider)CultureInfo.InvariantCulture)));
                this.BindGrid();
            }
            MembershipUser user = Membership.GetUser();

            if (user == null)
            {
                return;
            }
            string str = user.ToString();

            if (Roles.IsUserInRole(str, "Admin"))
            {
                this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str);
                if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                {
                    this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                    this.imgLogo.ImageUrl  = Doyingo.SetCompanyLogo(this.hfCompanyID.Value);
                }
            }
            else if (Roles.IsUserInRole(str, "Employee"))
            {
                this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str);
                if (this.objStaffMasterDT.Rows.Count > 0)
                {
                    this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                    this.imgLogo.ImageUrl  = Doyingo.SetCompanyLogo(this.hfCompanyID.Value);
                }
            }
            this.SetMiscValues(this.hfCompanyID.Value);
        }