private static LandRecordView AnalyzeLandRecord(IRow row) { var cells = GetCells(row, 0, 7); if (cells == null) { return(null); } var name = cells[0].ToString().Trim(); if (string.IsNullOrEmpty(name)) { return(null); } var a = .0; var model = new LandRecordView { ELName = name, Code = cells[1].ToString().Trim(), IllegalArea = double.TryParse(cells[2].ToString().Trim(), out a) ? a : .0, Area = double.TryParse(cells[3].ToString().Trim(), out a) ? a : .0, Score = double.TryParse(cells[5].ToString().Trim(), out a) ? a : .0, Remark = cells[7].ToString().Trim() }; return(model); }
public ActionResult Create(int id = 0, SystemData?systemdata = null, int?ELID = null, string name = null) { var model = Core.LandRecordViewManager.Get(id); if (model == null && systemdata.HasValue && ELID.HasValue) { model = new LandRecordView { ELID = ELID.Value, SystemData = systemdata.Value, ELName = name }; } ViewBag.Model = model; return(View()); }