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("tiaofeng");
            Hashtable table = BASE_TIAOFENGDal.SearchTF(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_TIAOFENGDal.SearchTF(gridIndex, gridPageSize, "a.FCreateDate", "DESC", getPowerConst("tiaofeng"));

            Grid1.DataSource(table["data"], Grid1_fields);
            Grid1.RecordCount(Int32.Parse(table["total"].ToString()));
        }
        public ActionResult Index()
        {
            ViewBag.CoreTiaoFengNew    = CheckPower("CoreTiaoFengNew");
            ViewBag.CoreTiaoFengDelete = CheckPower("CoreTiaoFengDelete");
            ViewBag.CoreTiaoFengEdit   = CheckPower("CoreTiaoFengEdit");
            Hashtable table = BASE_TIAOFENGDal.SearchTF(0, 20, "a.FCreateDate", "DESC", getPowerConst("tiaofeng"));

            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("tiaofeng");
            Hashtable table = BASE_TIAOFENGDal.SearchTF(Grid1_pageIndex, gridPageSize, "a.FCreateDate", "DESC", sql);

            Grid1.DataSource(table["data"], Grid1_fields);
            Grid1.RecordCount(Int32.Parse(table["total"].ToString()));

            return(UIHelper.Result());
        }