예제 #1
0
        public ActionResult DepreciationViewParameters()
        {
            PrepareYearMonths prepareYearMonths = new PrepareYearMonths();
            YearMonths        yearMonths        = prepareYearMonths.GetYearMonths();

            yearMonths.SetForDepreciationView();
            return(View(yearMonths));
        }
예제 #2
0
 public ActionResult DepreciationPlanParameters([Bind(Include = "StartMonth, StartYear, EndMonth, EndYear")] YearMonths yearMonths)
 {
     return(RedirectToAction("DepreciationPlan", new {
         startMonth = yearMonths.StartMonth,
         startYear = yearMonths.StartYear,
         endMonth = yearMonths.EndMonth,
         endYear = yearMonths.EndYear
     }));
 }
예제 #3
0
        public ActionResult DepreciationPlanParameters()
        {
            PrepareYearMonths prepareYearMonths = new PrepareYearMonths();
            YearMonths        yearMonths        = prepareYearMonths.GetYearMonths();

            yearMonths.EndYear = DateTime.Now.Year + 1;

            return(View(yearMonths));
        }
 public WorkingHoursViewModel()
 {
     _timer          = new DispatcherTimer();
     _timer.Tick    += new EventHandler(timer_tick);
     _timer.Interval = new TimeSpan(0, 0, 1);
     _timer.Start();
     _selectedDate     = DateTime.Now;
     Employees         = new BindableCollection <EmployeeModel>();
     _selectedEmployee = Employees.First();
     Hours             = new BindableCollection <HoursModel>();
     Hours.Refresh();
     YearMonths.Refresh();
     MessageQueue = new SnackbarMessageQueue(TimeSpan.FromMilliseconds(5000));
 }
        public List <PRDYearMonthCrustReqDate> GetSearchInformation()
        {
            using (_context)
            {
                var Data = (from r in _context.PRD_YearMonthFinishReqDate.AsEnumerable()
                            //where r.RecordStatus == "NCF"

                            join s in _context.PRD_YearMonthSchedule on r.ScheduleID equals s.ScheduleID into Schedules
                            from s in Schedules.DefaultIfEmpty()

                            join y in _context.PRD_YearMonth on(s == null? null: s.YearMonID) equals y.YearMonID into YearMonths
                            from y in YearMonths.DefaultIfEmpty()

                            join st in _context.SYS_Store on(y == null?null:y.ProductionFloor) equals st.StoreID into Stores
                            from st in Stores.DefaultIfEmpty()

                            join c in _context.SYS_Store on(y == null? null: y.ConcernStore) equals c.StoreID into ConcernStores
                            from c in ConcernStores.DefaultIfEmpty()
                            orderby r.RequisitionDateID descending

                            select new PRDYearMonthCrustReqDate
                {
                    RequisitionDateID = r.RequisitionDateID,
                    ScheduleID = r.ScheduleID,
                    ScheduleNo = s == null? null: s.ScheduleNo,

                    RequisitionNo = r.RequisitionNo,
                    RequiredDate = Convert.ToDateTime(r.RequiredDate).ToString("dd'/'MM'/'yyyy"),
                    RecordStatus = (r.RecordStatus == "NCF" ? "Not Confirmed" : "Confirmed"),
                    PrepareDate = Convert.ToDateTime(s == null ? null : s.PrepareDate).ToString("dd'/'MM'/'yyyy"),

                    YearMonID = (y == null? 0: y.YearMonID),
                    ScheduleMonth = (y == null ? null : y.ScheduleMonth),
                    ScheduleMonthName = (y == null ? null : DalCommon.ReturnMonthName(y.ScheduleMonth)),
                    ScheduleYear = (y == null ? null : y.ScheduleYear),
                    ProductionFloor = (y == null ? null : y.ProductionFloor),
                    ProductionFloorName = (st == null ? null : st.StoreName),
                    ConcernStore = (y == null ? null : y.ConcernStore),
                    ConcernStoreName = (c == null ? null : c.StoreName),
                    Remark = r.Remark
                }).ToList();

                return(Data);
            }
        }