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("flow"); Hashtable table = BASE_LIULIANGDal.SearchLL(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_LIULIANGDal.SearchLL(gridIndex, gridPageSize, "a.FCreateDate", "DESC", getPowerConst("flow")); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); }
public ActionResult Index() { ViewBag.CoreFlowNew = CheckPower("CoreFlowNew"); ViewBag.CoreFlowDelete = CheckPower("CoreFlowDelete"); ViewBag.CoreFlowEdit = CheckPower("CoreFlowEdit"); Hashtable table = BASE_LIULIANGDal.SearchLL(0, 20, "a.FCreateDate", "DESC", getPowerConst("flow")); 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("flow"); Hashtable table = BASE_LIULIANGDal.SearchLL(Grid1_pageIndex, gridPageSize, "a.FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); return(UIHelper.Result()); }