public static CReturnData getProKind(string strProKind)//B10 { CReturnData myData = new CReturnData(); MipSystemModule model = new MipSystemModule(); model.SQL = "SELECT * FROM MIP_CODES WHERE CLEVEL=@CLEVEL AND CSTATUS='0' and CKEY!='B2020' ORDER BY CORDER "; model.KEY = "CKEY"; model.NAME = "CNAME"; model.rowParameters = new SqlParameter("@CLEVEL", strProKind); List <Dictionary <string, string> > list = model.getProductList(); //List<Dictionary<string, string>> list = MIPCode.getProductList(strProKind); System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); //string jsonResult = fastJSON.JSON.ToJSON(list); string jsonResult = serializer.Serialize(list); myData.returnData = jsonResult; myData.nRet = 0; return(myData); }
public static CReturnData getProKind(string strProKind) { CReturnData myData = new CReturnData(); MipSystemModule m = new MipSystemModule(); m.SQL = "select FunctionDesc,SysFuncID,b.ModuleDesc,a.SysModID from SystemFunction a, SystemModule b where a.SysModID=b.SysModID and SysFuncID=@SysFuncID order by a.iOrder "; m.KEY = "SysModID"; m.NAME = "ModuleDesc"; m.ps = new System.Data.SqlClient.SqlParameter("@SysFuncID", strProKind); List <Dictionary <string, string> > list = m.getProductList(); System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); //string jsonResult = fastJSON.JSON.ToJSON(list); string jsonResult = serializer.Serialize(list); myData.returnData = jsonResult; return(myData); }