Exemplo n.º 1
0
        public ActionResult IndexExecute(int Key)
        {
            if (!CanRead)
            {
                return(GotoErrorPage(CannotAddText));
            }
            var info = new DataTypeInfo()
            {
                Key = Key
            };
            var service = Container.GetService <IDataTypeService>();

            if (Key > 0)
            {
                ViewBag.Operation = "修改";
                var item = service.GetModels(dt => dt.keyid == Key).FirstOrDefault();
                info = DataTypeInfo.ConvertoToDataTypeInfo(item);
            }
            ViewBag.Operation = "添加";
            return(View(info));
        }