Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            User _loggedUser = HttpContext.Current.Session["LoggedUser"] as User;

            if (!Page.IsPostBack)
            {
                DivGridSection.Visible = false;
                DivGridCrew.Visible    = false;
                DivGridDept.Visible    = false;
                DivGridEmp.Visible     = false;
                DivShiftGrid.Visible   = false;
                DivLocGrid.Visible     = false;
                DivTypeGrid.Visible    = false;
                ReportViewer1.Visible  = true;
                LoadGridViews();
                ReportViewer1.Width  = 1150;
                ReportViewer1.Height = 700;
                SelectedTypes.Clear();
                SelectedCrews.Clear();
                SelectedDepts.Clear();
                SelectedEmps.Clear();
                SelectedLocs.Clear();
                SelectedSections.Clear();
                SelectedShifts.Clear();
                RefreshLabels();
                LoadGridViews();
                DateTime dt = DateTime.Today.Date.AddDays(-1);
                if (GlobalVariables.DeploymentType == false)
                {
                    PathString = "/Reports/RDLC/DRDetailed.rdlc";
                }
                else
                {
                    PathString = "/WMS/Reports/RDLC/.rdlc";
                }
                List <ViewMultipleInOut> _View = new List <ViewMultipleInOut>();
                if (_loggedUser.ViewContractual == false && _loggedUser.ViewPermanentMgm == true && _loggedUser.ViewPermanentStaff == false)
                {
                    _View = context.ViewMultipleInOuts.Where(aa => aa.CompanyID == _loggedUser.CompanyID && (aa.TypeID == 7 || aa.TypeID == 27 || aa.TypeID == 28)).ToList();
                }
                else if (_loggedUser.ViewContractual == false && _loggedUser.ViewPermanentMgm == false && _loggedUser.ViewPermanentStaff == true)
                {
                    _View = context.ViewMultipleInOuts.Where(aa => aa.CompanyID == _loggedUser.CompanyID && (aa.TypeID == 2 || aa.TypeID == 3 || aa.TypeID == 9)).ToList();
                }
                else if (_loggedUser.ViewContractual == true && _loggedUser.ViewPermanentMgm == false && _loggedUser.ViewPermanentStaff == false)
                {
                    _View = context.ViewMultipleInOuts.Where(aa => aa.CatID != 2).ToList();
                }
                else
                {
                    _View = context.ViewMultipleInOuts.Where(aa => aa.CompanyID == _loggedUser.CompanyID).ToList();
                }
                LoadReport(PathString, _View);
            }
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DivGridSection.Visible = false;
         DivGridCrew.Visible    = false;
         DivGridDept.Visible    = false;
         DivGridEmp.Visible     = false;
         DivShiftGrid.Visible   = false;
         DivLocGrid.Visible     = false;
         DivTypeGrid.Visible    = false;
         DivGridComapny.Visible = false;
         ReportViewer1.Visible  = true;
         LoadGridViews();
         ReportViewer1.Width  = 1080;
         ReportViewer1.Height = 700;
         SelectedTypes.Clear();
         SelectedCrews.Clear();
         SelectedDepts.Clear();
         SelectedEmps.Clear();
         SelectedLocs.Clear();
         SelectedComps.Clear();
         SelectedSections.Clear();
         SelectedShifts.Clear();
         RefreshLabels();
         LoadGridViews();
         DateTime date = DateTime.Today.Date.AddDays(-1);
         if (GlobalVariables.DeploymentType == false)
         {
             PathString = "/Reports/RDLC/DRDetailed.rdlc";
         }
         else
         {
             PathString = "/WMS/Reports/RDLC/DRDetailed.rdlc";
         }
         //List<ViewAttData> _View = new List<ViewAttData>();
         User               LoggedInUser = HttpContext.Current.Session["LoggedUser"] as User;
         QueryBuilder       qb           = new QueryBuilder();
         string             query        = qb.MakeCustomizeQuery(LoggedInUser);
         DataTable          dt           = qb.GetValuesfromDB("select * from ViewAttData " + query + " and AttDate = '" + date.Date.Year.ToString() + "-" + date.Date.Month.ToString() + "-" + date.Date.Day.ToString() + "'");
         List <ViewAttData> _View        = dt.ToList <ViewAttData>();
         LoadReport(PathString, _View);
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         CreateDatatable();
         DivGridSection.Visible = false;
         DivGridCrew.Visible    = false;
         DivGridDept.Visible    = false;
         DivGridEmp.Visible     = false;
         DivShiftGrid.Visible   = false;
         DivLocGrid.Visible     = false;
         DivTypeGrid.Visible    = false;
         ReportViewer1.Visible  = true;
         ReportViewer1.Width    = 1050;
         ReportViewer1.Height   = 700;
         SelectedTypes.Clear();
         SelectedCrews.Clear();
         SelectedDepts.Clear();
         SelectedEmps.Clear();
         SelectedLocs.Clear();
         SelectedSections.Clear();
         SelectedShifts.Clear();
         DivGridComapny.Visible = false;
         SelectedComps.Clear();
         RefreshLabels();
         LoadGridViews();
         string _period = DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString();
         if (GlobalVariables.DeploymentType == false)
         {
             PathString = "/Reports/RDLC/MLvApplication.rdlc";
         }
         else
         {
             PathString = "/WMS/Reports/RDLC/MLvApplication.rdlc";
         }
         User         LoggedInUser = HttpContext.Current.Session["LoggedUser"] as User;
         QueryBuilder qb           = new QueryBuilder();
         string       query        = qb.MakeCustomizeQuery(LoggedInUser);
         //DataTable dt = qb.GetValuesfromDB("select * from EmpView " + query);
         DataTable      dt   = qb.GetValuesfromDB("select * from EmpView ");
         List <EmpView> _emp = dt.ToList <EmpView>();
         LoadReport(PathString, GetLV(_emp, DateTime.Now.Month));
     }
 }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DivGridSection.Visible = false;
         DivGridCrew.Visible    = false;
         DivGridDept.Visible    = false;
         DivGridEmp.Visible     = false;
         DivShiftGrid.Visible   = false;
         DivLocGrid.Visible     = false;
         DivTypeGrid.Visible    = false;
         ReportViewer1.Visible  = true;
         ReportViewer1.Width    = 1050;
         ReportViewer1.Height   = 700;
         SelectedTypes.Clear();
         SelectedCrews.Clear();
         SelectedDepts.Clear();
         SelectedEmps.Clear();
         SelectedLocs.Clear();
         SelectedSections.Clear();
         SelectedShifts.Clear();
         DivGridComapny.Visible = false;
         SelectedComps.Clear();
         RefreshLabels();
         LoadGridViews();
         string _period = DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString();
         if (GlobalVariables.DeploymentType == false)
         {
             PathString = "/Reports/RDLC/MRDetailExcelP.rdlc";
         }
         else
         {
             PathString = "/WMS/Reports/RDLC/MRDetailExcelP.rdlc";
         }
         List <ViewMonthlyDataPer> _ViewList = new List <ViewMonthlyDataPer>();
         User         LoggedInUser           = HttpContext.Current.Session["LoggedUser"] as User;
         QueryBuilder qb    = new QueryBuilder();
         string       query = qb.MakeCustomizeQuery(LoggedInUser);
         DataTable    dt    = qb.GetValuesfromDB("select * from ViewMonthlyDataPer " + query + " and Period='" + _period + "'");
         _ViewList = dt.ToList <ViewMonthlyDataPer>();
         LoadReport(PathString, _ViewList);
     }
 }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DivGridSection.Visible = false;
                DivGridCrew.Visible    = false;
                DivGridDept.Visible    = false;
                DivGridEmp.Visible     = false;
                DivShiftGrid.Visible   = false;
                DivLocGrid.Visible     = false;
                DivTypeGrid.Visible    = false;
                ReportViewer1.Visible  = true;
                DivGridComapny.Visible = false;
                SelectedComps.Clear();
                ReportViewer1.Width  = 1050;
                ReportViewer1.Height = 700;
                SelectedTypes.Clear();
                SelectedCrews.Clear();
                SelectedDepts.Clear();
                SelectedEmps.Clear();
                SelectedLocs.Clear();
                SelectedSections.Clear();
                SelectedShifts.Clear();
                RefreshLabels();
                LoadGridViews();
                DateTime dateTo   = DateTime.Today.Date.AddDays(-1);
                DateTime dateFrom = DateTime.Today.Date.AddDays(-20);
                if (GlobalVariables.DeploymentType == false)
                {
                    PathString = "/Reports/RDLC/EmpAttSummary.rdlc";
                }
                else
                {
                    PathString = "/WMS/Reports/RDLC/EmpAttSummary.rdlc";
                }


                LoadReport(PathString, context.ViewPresentEmps.Where(aa => aa.AttDate >= dateFrom && aa.AttDate <= dateTo && aa.EmpID == 1).ToList());
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DivGridSection.Visible = false;
         DivGridCrew.Visible    = false;
         DivGridDept.Visible    = false;
         DivGridEmp.Visible     = false;
         DivShiftGrid.Visible   = false;
         DivLocGrid.Visible     = false;
         DivTypeGrid.Visible    = false;
         ReportViewer1.Visible  = true;
         ReportViewer1.Width    = 1050;
         ReportViewer1.Height   = 700;
         SelectedTypes.Clear();
         SelectedCrews.Clear();
         SelectedDepts.Clear();
         SelectedEmps.Clear();
         SelectedLocs.Clear();
         SelectedSections.Clear();
         SelectedShifts.Clear();
         RefreshLabels();
         LoadGridViews();
         if (GlobalVariables.DeploymentType == false)
         {
             PathString = "/Reports/RDLC/YLvConsumed.rdlc";
         }
         else
         {
             PathString = "/WMS/Reports/RDLC/YLvConsumed.rdlc";
         }
         User                  LoggedInUser = HttpContext.Current.Session["LoggedUser"] as User;
         QueryBuilder          qb           = new QueryBuilder();
         string                query        = qb.MakeCustomizeQuery(LoggedInUser);
         DataTable             dt           = qb.GetValuesfromDB("select * from ViewLvConsumed " + query);
         List <ViewLvConsumed> _ViewList    = dt.ToList <ViewLvConsumed>();
         LoadReport(PathString, _ViewList);
     }
 }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DivGridSection.Visible = false;
         DivGridCrew.Visible    = false;
         DivGridDept.Visible    = false;
         DivGridEmp.Visible     = false;
         DivShiftGrid.Visible   = false;
         DivLocGrid.Visible     = false;
         DivTypeGrid.Visible    = false;
         ReportViewer1.Visible  = true;
         ReportViewer1.Width    = 1050;
         ReportViewer1.Height   = 700;
         SelectedTypes.Clear();
         SelectedCrews.Clear();
         SelectedDepts.Clear();
         SelectedEmps.Clear();
         SelectedLocs.Clear();
         SelectedSections.Clear();
         SelectedShifts.Clear();
         DivGridComapny.Visible = false;
         SelectedComps.Clear();
         LoadGridViews();
         RefreshLabels();
         string _period = DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString();
         if (GlobalVariables.DeploymentType == false)
         {
             PathString = "/Reports/RDLC/MRSheetC.rdlc";
         }
         else
         {
             PathString = "/WMS/Reports/RDLC/MRSheetC.rdlc";
         }
         LoadReport(PathString, context.ViewMonthlyDatas.Where(aa => aa.Period == _period).ToList());
     }
 }