Ejemplo n.º 1
0
        public ActionResult Delete(string ActivityId)
        {
            int AmActivityId = 0;

            Int32.TryParse(ActivityId, out AmActivityId);
            if (AmActivityId == 0)
            {
                return(View("Error"));
            }
            if (DMLObj.ActivityHasItem(AmActivityId))
            {
                ModelState.AddModelError("Name", "این فعالیت دارای چندین جزء در درون خودش است، برای حذف ابتدا آنها را حذف نمایید.");
            }
            return(View(DMLObj.GetActivityById(AmActivityId)));
        }
Ejemplo n.º 2
0
        public ActionResult ShowActivity(string ActivityId, string ProcessId)
        {
            int AmActivityId = 0;

            Int32.TryParse(ActivityId, out AmActivityId);
            int AmProcessId = 0;

            Int32.TryParse(ProcessId, out AmProcessId);
            if (AmActivityId == 0)
            {
                return(View("Error"));
            }

            SysAdminModelShowActivity model = new SysAdminModelShowActivity();
            List <NavViewModel>       Nav   = null;

            model.ActivityItemGropus = DMLObj.GetActivityAllItemsByActivityId(AmActivityId);
            model.Activity           = DMLObj.GetActivityById(AmActivityId);
            model.Unit       = null;
            model.Navigation = Nav;
            model.Process    = DMLObj.GetProcessById(AmProcessId);
            return(View(model));
        }