Пример #1
0
        //==========================================================
        public void Sel_ByIDLang(HttpContext context)
        {
            String jSonString = "";
            CategoryLevel1BO aCategoryLevel1BO = new CategoryLevel1BO();
            bool Disable =!String.IsNullOrEmpty(context.Request.QueryString["Disable"])?Convert.ToBoolean(context.Request.QueryString["Disable"]):false;
            int IDLang = !string.IsNullOrEmpty(context.Request.QueryString["IDLang"].ToString()) ? int.Parse(context.Request.QueryString["IDLang"]) : 1;

            List<CategoryLevel1> obj = String.IsNullOrEmpty(context.Request.QueryString["Disable"]) ?
            aCategoryLevel1BO.Sel_ByIDLang(IDLang).ToList() : aCategoryLevel1BO.Sel_ByIDLang(IDLang, Disable).ToList();

            if (obj != null)
            {
                _converter.DateTimeFormat = "dd/MM/yyyy";

                jSonString = JsonConvert.SerializeObject(obj, _converter);
            }
            jSonString = "{\"data\":" + jSonString + "}";
            context.Response.Write(jSonString);
        }