private void queryOddsCountDX() { if (Request["rowData"] != null && Request["blur"] != null) { SeoWebSite.BLL.odds_dx odds_dxbll = new SeoWebSite.BLL.odds_dx(); JArray rowData = JArray.Parse(Request.Form["rowData"]); List <string> oddsList = new List <string>(); foreach (JObject item in rowData) { if (!string.IsNullOrEmpty((string)item["caa"]) && !string.IsNullOrEmpty((string)item["cab"]) && !string.IsNullOrEmpty((string)item["cac"]) && !string.IsNullOrEmpty((string)item["cba"]) && !string.IsNullOrEmpty((string)item["cbb"]) && !string.IsNullOrEmpty((string)item["cbc"])) { string[] sa = { (string)item["caa"], (string)item["cab"], (string)item["cac"], (string)item["cba"], (string)item["cbb"], (string)item["cbc"], item["companyid"].ToString() }; oddsList.Add(string.Join(",", sa)); } } JArray data1 = new JArray(); JArray data2 = new JArray(); JObject obj = JObject.Parse("{blur:" + Request.Form["blur"] + "}"); DataSet ds = odds_dxbll.queryOddsCount(oddsList, float.Parse(Request.Form["blur"]), Convert.ToInt32(Request.Form["scheduleType"])); int totalCount = int.Parse(ds.Tables[0].Rows[0]["totalCount"].ToString()); if (totalCount > 0) { obj.Add("dxycount1", ds.Tables[0].Rows[0][0].ToString()); obj.Add("dxzcount1", ds.Tables[0].Rows[0][1].ToString()); obj.Add("dxscount1", ds.Tables[0].Rows[0][2].ToString()); obj.Add("totalCount1", totalCount); } //ds = odds_rqbll.queryOddsCount(oddsList, 2, float.Parse(Request.Form["blur"]), Convert.ToInt32(Request.Form["scheduleType"])); //totalCount = int.Parse(ds.Tables[0].Rows[0]["totalCount"].ToString()); //if (totalCount > 0) //{ // obj.Add("rqycount2", ds.Tables[0].Rows[0][0].ToString()); // obj.Add("rqzcount2", ds.Tables[0].Rows[0][1].ToString()); // obj.Add("rqscount2", ds.Tables[0].Rows[0][2].ToString()); // obj.Add("totalCount2", totalCount); //} JArray data = new JArray(); data.Add(obj); responseText = "{success:true,data:" + data.ToString() + "}"; } }
private void queryOddsCountDX() { if (Request["rowData"] != null && Request["blur"] != null) { SeoWebSite.BLL.odds_dx odds_dxbll = new SeoWebSite.BLL.odds_dx(); JArray rowData = JArray.Parse(Request.Form["rowData"]); List<string> oddsList = new List<string>(); foreach (JObject item in rowData) { if (!string.IsNullOrEmpty((string)item["caa"]) && !string.IsNullOrEmpty((string)item["cab"]) && !string.IsNullOrEmpty((string)item["cac"]) && !string.IsNullOrEmpty((string)item["cba"]) && !string.IsNullOrEmpty((string)item["cbb"]) && !string.IsNullOrEmpty((string)item["cbc"])) { string[] sa = { (string)item["caa"], (string)item["cab"], (string)item["cac"], (string)item["cba"], (string)item["cbb"], (string)item["cbc"], item["companyid"].ToString() }; oddsList.Add(string.Join(",", sa)); } } JArray data1 = new JArray(); JArray data2 = new JArray(); JObject obj = JObject.Parse("{blur:" + Request.Form["blur"] + "}"); DataSet ds = odds_dxbll.queryOddsCount(oddsList, float.Parse(Request.Form["blur"]), Convert.ToInt32(Request.Form["scheduleType"])); int totalCount = int.Parse(ds.Tables[0].Rows[0]["totalCount"].ToString()); if (totalCount > 0) { obj.Add("dxycount1", ds.Tables[0].Rows[0][0].ToString()); obj.Add("dxzcount1", ds.Tables[0].Rows[0][1].ToString()); obj.Add("dxscount1", ds.Tables[0].Rows[0][2].ToString()); obj.Add("totalCount1", totalCount); } //ds = odds_rqbll.queryOddsCount(oddsList, 2, float.Parse(Request.Form["blur"]), Convert.ToInt32(Request.Form["scheduleType"])); //totalCount = int.Parse(ds.Tables[0].Rows[0]["totalCount"].ToString()); //if (totalCount > 0) //{ // obj.Add("rqycount2", ds.Tables[0].Rows[0][0].ToString()); // obj.Add("rqzcount2", ds.Tables[0].Rows[0][1].ToString()); // obj.Add("rqscount2", ds.Tables[0].Rows[0][2].ToString()); // obj.Add("totalCount2", totalCount); //} JArray data = new JArray(); data.Add(obj); responseText = "{success:true,data:" + data.ToString() + "}"; } }