public ActionResult MyCustomPostBack(string type, JArray gridFields, JObject typeParams, int gridIndex, int gridPageSize) { var Grid1 = UIHelper.Grid("Grid1"); string sql = string.Empty; var ttbSearch = UIHelper.TwinTriggerBox("ttbSearchMessage"); if (type == "trigger1") { ttbSearch.Text(String.Empty); ttbSearch.ShowTrigger1(false); } else if (type == "trigger2") { ttbSearch.ShowTrigger1(true); var triggerValue = typeParams.Value <string>("triggerValue"); sql = " and FName like '%" + triggerValue + "%'"; } sql = sql + getPowerConst("water"); Hashtable table = BASE_SHUICHANGDal.Search(gridIndex, gridPageSize, "a.FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], gridFields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); return(UIHelper.Result()); }
private void UpdateGrid(JArray Grid1_fields, int gridIndex, int gridPageSize) { var Grid1 = UIHelper.Grid("Grid1"); Hashtable table = BASE_SHUICHANGDal.Search(gridIndex, gridPageSize, "a.FCreateDate", "DESC", getPowerConst("water")); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); }
public ActionResult Index() { ViewBag.CoreWaterWorkNew = CheckPower("CoreWaterWorkNew"); ViewBag.CoreWaterWorkDelete = CheckPower("CoreWaterWorkDelete"); ViewBag.CoreWaterWorkEdit = CheckPower("CoreWaterWorkEdit"); Hashtable table = BASE_SHUICHANGDal.Search(0, 20, "a.FCreateDate", "DESC", getPowerConst("water")); ViewBag.Grid1DataSource = table["data"]; ViewBag.Grid1RecordCount = Int32.Parse(table["total"].ToString()); return(View()); }
public ActionResult Grid1_PageIndexChanged(JArray Grid1_fields, int Grid1_pageIndex, int gridPageSize, string searchMessage) { var Grid1 = UIHelper.Grid("Grid1"); string sql = string.Empty; if (!searchMessage.Equals("")) { sql = sql + " and FName like '%" + searchMessage + "%'"; } sql = sql + getPowerConst("water"); Hashtable table = BASE_SHUICHANGDal.Search(Grid1_pageIndex, gridPageSize, "a.FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); return(UIHelper.Result()); }