public async Task<ActionResult> Create(ProcessTypeViewModel processtype)
        {
            if (ModelState.IsValid)
            {
                MSTProcessTypesDto data = new MSTProcessTypesDto
                {
                    Name = processtype.Name,
                    Description = processtype.Description,
                    Duration = processtype.Duration,
                    SeqNumber = processtype.SeqNumber,
                    LastUpdatedBy = this.CurrentName,
                };
                var result = await ProcessTypesRepository.AddAsync(data);
                if (result == Model.SaveResult.SUCCESS)
                    return RedirectToAction("Index");
            }

            return View(processtype);
        }
        public async Task<ActionResult> Edit(int id)
        {
            if (id == 0)
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);

            var processtype = await ProcessTypesRepository.SingleAsync(id);
            if (processtype == null)
                return HttpNotFound();
            ProcessTypeViewModel bind = new ProcessTypeViewModel
            {
                Id = processtype.Id,
                Name = processtype.Name,
                Description = processtype.Description,
                Duration = processtype.Duration,
                SeqNumber = processtype.SeqNumber,
                LastUpdatedBy = processtype.LastUpdatedBy,
                LastUpdate = processtype.LastUpdate,
            };
            return View(bind);
        }