Esempio n. 1
0
        public ActionResult Edit(int id)
        {
            var model = new CreateEditViewModel();
            var job   = jobProvider.GetJob(id);

            Mapper.DynamicMap(job, model);

            return(PartialView("CreateEdit", model));
        }
Esempio n. 2
0
        public async void Delete(int?areaID, long jobID)
        {
            await Task.Run(() =>
            {
                int tempArea = 0;

                if (!areaID.HasValue)
                {
                    var _area = areaID.ToString();
                    if (_area.Length == 6)
                    {
                        tempArea = int.Parse(_area.Remove(4) + "00");
                    }
                }

                if (tempArea == 0)
                {
                    var job = JobProvider.GetJob(jobID);

                    if (job == null)
                    {
                        return;
                    }

                    tempArea = job.AreaID;
                }

                AreaIndexManager.Instance.Delete(Enums.IndexDataType.Job, tempArea, jobID);
                JobIndexManager.Instance.Delete(Enums.IndexDataType.Job, tempArea, jobID);
            });
        }
Esempio n. 3
0
        public async void Add(long jobID)
        {
            await Task.Run(() =>
            {
                var item = JobProvider.GetJob(jobID);

                AreaIndexManager.Instance.Insert(item);
                JobIndexManager.Instance.Insert(item);
            });
        }