Ejemplo n.º 1
0
        public JsonResult SaveDetails(RosterListViewModel roster)
        {
            RosterServiceModel RosterModel;
            int CompanyId = (int)(Session["CompanyId"]);

            RosterModel = new RosterServiceModel()
            {
                Id         = roster.Id,
                CompanyId  = CompanyId,
                StartDate  = roster.StartDate == null ? DateTime.Now : roster.StartDate,
                EndDate    = roster.EndDate == null ? DateTime.Now : roster.EndDate,
                FinishTime = roster.FinishTime,
                StartTime  = roster.StartTime,
                UserId     = roster.UserId
            };
            _IRosterService.SaveRosterDetails(RosterModel);
            bool success = true;

            return(Json(success, JsonRequestBehavior.AllowGet));
        }