摘要: 页面文件 脚本: 控制器: 阅读全文
posted @ 2018-05-22 17:02 水上浮萍cc 阅读(168) 评论(0) 推荐(0)
摘要: 单条数据查询时为了防止没有数据报错“未实例化”,要在差找不到的时候实例化 顺带一提一种新的if语句写法。。。 eg:a==b?" 判断为true后执行的语句":“false的语句” 我说的好像不是很清楚。。。 贴一段今天看到的讲的很棒的。。 ? : 运算符 我们已经在前面的章节中讲解了 条件运算符 阅读全文
posted @ 2018-05-22 11:18 水上浮萍cc 阅读(209) 评论(0) 推荐(0)
摘要: public ActionResult About() { List adsinfo_new = new List();//实例化一个LIST装载旧的表格 using (Model2 m2 = new Model2()) { adsinfo_new = m2.adsinf... 阅读全文
posted @ 2018-05-22 10:44 水上浮萍cc 阅读(363) 评论(0) 推荐(0)
摘要: public IQueryable List(string key = "", string page = "1", string pagesize = "5", string title = "") { int p = 1, size = 20; int.TryParse(page, out p);//将string类型的p和SIZE转化INT类型 int.TryParse(pagesize... 阅读全文
posted @ 2018-05-21 11:07 水上浮萍cc 阅读(263) 评论(0) 推荐(0)
摘要: 添加 单价 数量 总价 1 2 3 修改 保存 阅读全文
posted @ 2018-05-21 10:46 水上浮萍cc 阅读(176) 评论(0) 推荐(0)
摘要: 上一张 下一张 阅读全文
posted @ 2018-05-21 10:33 水上浮萍cc 阅读(262) 评论(0) 推荐(0)
摘要: var imagespolicy = "@string.Join("|", announcement.Select(d => d.Img))";//字符串拼接 @string.Join("间隔符", 集合名称.Select(d => d.Img))——select 的作用是只把集合的一部分属性提取出来 阅读全文
posted @ 2018-05-21 09:56 水上浮萍cc 阅读(111) 评论(0) 推荐(0)
摘要: 视图: @Html.LabelFor(model => model.tupian, htmlAttributes: new { @class = "control-label col-md-2" }) @Html.... 阅读全文
posted @ 2018-05-21 09:48 水上浮萍cc 阅读(267) 评论(0) 推荐(0)