private void GetPirceAddJf() { int sk = Convert.ToInt32(context.Request.QueryString["sk"]); bool zf = true; if (sk < 0) { sk = sk * -1; zf = false; } int id = Convert.ToInt32(context.Request.QueryString["id"]); if (context.Request.QueryString["id"] != null) { Model.memberType modelmt = bllmt.GetModel(id); string isfee = context.Request.QueryString["NoCardFee"];//是否免卡费 List <Model.AddPrice> listapp = bllap.GetModelList("AddPice<=" + sk + " order by AddPice desc"); int cz = 0; if (isfee == "not") { cz = sk; } else { if (isfee == "1") { cz = sk; } else { cz = sk - Convert.ToInt32(modelmt.typePrice); } } int zs = 0; int zsjf = 0; if (listapp.Count > 0) { // //zsjf = ; int num = Convert.ToInt32(cz) / Convert.ToInt32(listapp[0].AddPice); for (int i = 0; i < num; i++) { zs = Convert.ToInt32(listapp[0].ZsPice); cz += zs; zsjf += Convert.ToInt32(listapp[0].ZsJf); } } if (!zf) { cz = cz * -1; zsjf = zsjf * -1; } JavaScriptSerializer js = new JavaScriptSerializer(); var obj = new { cz = cz, zsjf = zsjf }; string str = js.Serialize(obj); context.Response.Write(str); } else { } }