public ActionResult Create(PDCPMS.Modules.Authority.Model.BlockAddModel model) { if (model == null || model.block == null) { TempData["HintMessage"] = new PDCPMS.Application.HintMessage { Content = "操作失败,系统发生了一个错误" }; return RedirectToAction("Add"); } Module domainmodel = new Module(model.block.Name, model.block.AddDate, model.block.Description, model.block.Status); ReadOnlyCollection<BrokenRule> brokenRules = domainmodel.GetBrokenRules(); if (brokenRules.Count != 0) { TempData["HintMessage"] = new PDCPMS.Application.HintMessage { Content = "你的输入有误,模块添加失败" }; TempData["BrokenRules"] = brokenRules; TempData["InvalidModel"] = model; } repository.Add(domainmodel); unitOfWork.Commit(); TempData["HintMessage"] = new PDCPMS.Application.HintMessage { Content = string.Format("模块({0})添加成功", model.block.Name) }; return RedirectToAction("Index"); }
public ReportSortModel(PDCPMS.Model.Common.PipeType pipeTye, PDCPMS.Model.Common.Pipe pipe, Producer Producer) { this.pipe = pipe; this.pipetype = pipetype; this.Producer = Producer; }