public ActionResult LandTaxEdit(int id) { string query = string.Format("&appid={0}&tabid={1}&flag={2}", Request.QueryString["appid"], Request.QueryString["tabid"], Request.QueryString["flag"]); RoadFlow.Data.Model.LandTax model = new RoadFlow.Platform.LandTax().Get <RoadFlow.Data.Model.LandTax>(new KeyValuePair <string, object>("ID", id)); return(View(model)); }
public ActionResult LandTaxEdit(RoadFlow.Data.Model.LandTax model, int id) { //RoadFlow.Data.Model.LandTax model = new RoadFlow.Platform.LandTax().Get<RoadFlow.Data.Model.LandTax>(new KeyValuePair<string, object>("ID", id)); int result = new RoadFlow.Platform.LandTax().Update(model, id); if (result > 0) { return(RedirectToAction("LandTax", new { appid = Request["appid"] })); } return(View()); }
public ActionResult LandTax(FormCollection collection) { DataTable dt = new DataTable(); string keyword = string.Empty; string pager = string.Empty; string wher = string.Empty; string query = string.Empty; Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where = new Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object>(); if (collection != null) { if (!keyword.IsNullOrEmpty()) { keyword = Request["Keyword"]; where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("EnterpriseName", RoadFlow.Data.Model.SQLFilterType.CHARINDEX), keyword); } } query = string.Format("&appid={0}&tabid={1}&Keyword={2}&flag={3}", Request.QueryString["appid"], Request.QueryString["tabid"], keyword, Request.QueryString["flag"]); RoadFlow.Platform.LandTax db = new RoadFlow.Platform.LandTax(); dt = db.GetPagerData(out pager, query, pageSize, RoadFlow.Utility.Tools.GetPageNumber(), where); ViewBag.DisplayName = MyExtensions.GetModelDispalyName <RoadFlow.Data.Model.LandTax>(new List <string>() { "EnterpriseName", "YYS", "QYSDS", "GRSDS", "Area" }); //导入税收条数 DataTable all = db.GetAll(where); where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("EnterpriseID", RoadFlow.Data.Model.SQLFilterType.MINNotEqual), 0); DataTable matching = db.GetAll(where); ViewBag.All = all.Rows.Count; ViewBag.Matching = matching.Rows.Count; ViewBag.NotMatching = all.Rows.Count - matching.Rows.Count; ViewBag.Pager = pager; ViewBag.Keyword = keyword; return(View(dt)); }