示例#1
0
        public ContentResult Edit(Enter enter, List <EnterItem> items)
        {
            string result = "{success:false,Id:1}";

            try
            {
                enter.EnterItem.AddRange(items);
                Enter row = dao.FindById(enter.Id);
                dao.DeleteItems(row.EnterItem);
                row.InjectFrom(enter);

                dao.Update();

                result = "{success:true}";
            }
            catch { }

            return(new ContentResult
            {
                Content = result
            });
        }