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 Name like '%" + triggerValue + "%'"; } Hashtable table = Panda_CustomerDal.Search(gridIndex, gridPageSize, "FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], gridFields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); Grid1.PageSize(gridPageSize); return(UIHelper.Result()); }
public ActionResult Index() { Hashtable table = Panda_CustomerDal.Search(0, 20, "FCreateDate", "DESC", ""); ViewBag.Grid1DataSource = table["data"]; ViewBag.Grid1RecordCount = Int32.Parse(table["total"].ToString()); return(View()); }
private void UpdateGrid(JArray Grid1_fields, int gridIndex, int gridPageSize) { var Grid1 = UIHelper.Grid("Grid1"); string sql = string.Empty; //sql = sql + " and FDictID = " + Grid1_selectedRows; Hashtable table = Panda_CustomerDal.Search(gridIndex, gridPageSize, "FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); }
public ActionResult Index() { ViewBag.CoreCustomerNew = CheckPower("CoreCustomerNew"); ViewBag.CoreCustomerDelete = CheckPower("CoreCustomerDelete"); ViewBag.CoreCustomerEdit = CheckPower("CoreCustomerEdit"); Hashtable table = Panda_CustomerDal.Search(0, 20, "FCreateDate", "DESC", ""); 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 Name like '%" + searchMessage + "%'"; } Hashtable table = Panda_CustomerDal.Search(Grid1_pageIndex, gridPageSize, "FCreateDate", "DESC", sql); Grid1.DataSource(table["data"], Grid1_fields); Grid1.RecordCount(Int32.Parse(table["total"].ToString())); return(UIHelper.Result()); }