Example #1
0
        /// <summary>
        /// 搜索产品类型
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        public ActionResult SeachProductTypeInfo(FormCollection collection)
        {
            String Name = collection.Get("Name").Trim().ToString();//上下两种方法都可以获取数据

            int row = int.Parse(Request["rows"].ToString());
            int pageindex = int.Parse(Request["page"].ToString());
            ProductTypeData ProductTypejson = new ProductTypeData();
            int total;
            ProductTypejson.rows = productTypeBLL.GetProductTypesBySerach(pageindex, row, out total, Name);
            ProductTypejson.total = total;
            JavaScriptSerializer json = new JavaScriptSerializer();
            string Str = json.Serialize(ProductTypejson);//
            return Content(Str, "text/html;charset=UTF-8");
        }
Example #2
0
 /// <summary>
 /// 加载json数组对象
 /// </summary>
 /// <returns></returns>
 public ActionResult LoadProductTypejson()
 {
     int row = int.Parse(Request["rows"].ToString());
     int pageindex = int.Parse(Request["page"].ToString());
     ProductTypeData ProductTypejson = new ProductTypeData();
     int total;
     ProductTypejson.rows = productTypeBLL.GetProductTypesList(pageindex, row, out total);
     ProductTypejson.total = total;
     JavaScriptSerializer json = new JavaScriptSerializer();
     string Str = json.Serialize(ProductTypejson);//
     return Content(Str, "text/html;charset=UTF-8");
 }