Ejemplo n.º 1
0
        public JsonResult GetEventsById(int id)
        {
            jobServices _ser   = new jobServices();
            var         model  = _ser.GetjobbyId(id);
            jobModel    _model = new Controllers.JsonController.jobModel();

            _model.AssignTo  = model.AssignTo;
            _model.Detail    = model.Detail;
            _model.EndDate   = Convert.ToDateTime(model.EndDate.Value.Date).ToString("MM/dd/yyyy hh:mm:ss tt");
            _model.StartDate = Convert.ToDateTime(model.StartDate.Value.Date).ToString("MM/dd/yyyy hh:mm:ss tt");
            _model.StatusId  = model.StatusId;
            _model.TypeId    = model.TypeId;
            _model.PoNumber  = model.PoNumber;
            _model.Name      = model.Name;
            _model.IsActive  = model.IsActive.Value;
            return(base.Json(_model, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult index(int?id, int?statusId)
        {
            int             adminId   = Convert.ToInt16(Session["AdminId"]);
            tblJobMaster    _model    = new tblJobMaster();
            jobServices     _services = new jobServices();
            contactServices _ser      = new contactServices();

            ViewData["users"]    = _ser.GetaAllContactsByAdminId(adminId);
            ViewData["type"]     = _services.getAllJobtypes(adminId);
            ViewData["status"]   = _services.getAllStatus();
            ViewData["statusId"] = statusId ?? 0;
            if (id.HasValue)
            {
                _model = _services.GetjobbyId(id.Value);
                return(View("editjob", _model));
            }
            if (TempData["error"] != null)
            {
                ViewData["error"] = TempData["error"].ToString();
            }
            return(View("job", _model));
        }