Пример #1
0
        public ActionResult GetJobs(int?id, int?statusId)
        {
            int          adminId = Convert.ToInt16(Session["AdminId"]);
            JobViewModel _model  = new JobViewModel();
            jobServices  _ser    = new jobServices();

            if (id.HasValue)
            {
                _ser.DeleteJob(id.Value);
                _model        = _ser.getAlljobs(adminId, statusId);
                _model.status = statusId ?? 0;
                _model.Error  = "Job deleted Succesfully";
                return(View(_model));
            }
            _model        = _ser.getAlljobs(adminId, statusId);
            _model.status = statusId ?? 0;
            return(View(_model));
        }