private void Getprice() { string txt_number = context.Request.Form["typeid"]; List <Model.Goods> list = null; if (context.Request.Form["isb"] != null) { list = fmgood.GetModelList("(Goods_number like '%" + txt_number + "%' or Goods_name like '%" + txt_number + "%' or Goods_spell like '%" + txt_number + "%') and Goods_ifType=1 and Goods_jf!=0"); } else { list = fmgood.GetModelList("(Goods_number like '%" + txt_number + "%' or Goods_name like '%" + txt_number + "%' or Goods_spell like '%" + txt_number + "%') and Goods_ifType=1"); } JavaScriptSerializer js = new JavaScriptSerializer(); string str = js.Serialize(list); string finalStr = "{data:" + str + "}"; context.Response.Write(finalStr); }
private void GoodsCate() { string id = context.Request.QueryString["id"]; List <Model.Goods> listg = BLLG.GetModelList("Goods_categories=" + id); if (listg.Count > 0) { context.Response.Write("ok"); } else { context.Response.Write("err"); } }