Exemple #1
0
        // GET: Report
        public ActionResult Index()
        {
            CReportPeriod   crp = new CReportPeriod();
            CDateParameters cdp = new CDateParameters();

            cdp.dFrom = crp.getFirstReportDate();
            cdp.dTo   = crp.getLastReportDate();
            if (cdp.dFrom > cdp.dTo)
            {
                cdp.dFrom = cdp.dTo;
            }
            ViewBag.dFromStr = cdp.dFrom.ToShortDateString();
            return(View(cdp));
        }
        // GET: TimeReg
        /// <summary>
        /// Index view
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            CDateParameters       ct = new CDateParameters();
            pdsTidRedLiveEntities db = new pdsTidRedLiveEntities();
            DateTime today           = DateTime.Today.AddDays(-1);
            DateTime dtStartDate     = today.AddDays(DayOfWeek.Monday - today.DayOfWeek);

            ct.dFrom = dtStartDate;
            ct.dTo   = dtStartDate.AddDays(6);

            int        userId = Convert.ToInt32(Session["userId"]);
            CTimeTrack ctc    = new CTimeTrack();

            ViewBag.myCustomers = ctc.getMyCustomers(userId);
            return(View(ct));
        }