using LeaRun.Application.Busines.InstallManage; using LeaRun.Application.Entity.InstallManage; using LeaRun.Util; using LeaRun.Util.WebControl; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LeaRun.Application.Web.Areas.InstallManage.Controllers { public class ThroughWaterController : MvcControllerBase { private InstallApplyBLL InstallApplybll = new InstallApplyBLL(); // // GET: /InstallManage/ThroughWater/ public ActionResult Index() { return View(); } public ActionResult GetListJson(string startTime, string endTime, String type, Pagination pagination) { InstallApplyEntity entity = new InstallApplyEntity(); if (type == null) { entity.SurveyType = 1; entity.budgetType = 1; entity.MasterVerifyType = 1; entity.PayMentType = 1; entity.ConstructionType = 2; entity.AcceptType = 1; entity.ThroughWaterType = 0; } else { entity.SurveyType = 1; entity.budgetType = 1; entity.MasterVerifyType = 1; entity.PayMentType = 1; entity.ConstructionType = 2; entity.AcceptType = 1; entity.ThroughWaterType = int.Parse(type); } if (!string.IsNullOrEmpty(startTime) && !string.IsNullOrEmpty(endTime)) { var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity); var watch = CommonHelper.TimerStart(); var JsonData = new { rows = JsonConvert.DeserializeObject(data), total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } else { entity.SurveyType = 1; entity.budgetType = 1; entity.MasterVerifyType = 1; entity.PayMentType = 1; entity.ConstructionType = 2; entity.AcceptType = 1; entity.ThroughWaterType = 0 ; var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity); var watch = CommonHelper.TimerStart(); var JsonData = new { rows = JsonConvert.DeserializeObject(data), total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } return Content(""); } public ActionResult UpdateType(String appId, String Type) { InstallApplybll.UpdateThroughWater(appId, Type); return Success("成功"); } } }