Ejemplo n.º 1
0
        public void Sel_ByIDAlbum_ByIDLang(HttpContext context)
        {
            String jSonString = "";
            int IDAlbum = Convert.ToInt32(context.Request.QueryString["IDAlbum"]);
            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;
            CategoryLevel1BO aCategoryLevel1BO = new CategoryLevel1BO();
            List<CategoryLevel1> obj = String.IsNullOrEmpty(context.Request.QueryString["Disable"]) ?

                aCategoryLevel1BO.Sel_ByIDAlbum_ByIDLang(IDAlbum, IDLang) : aCategoryLevel1BO.Sel_ByIDAlbum_ByIDLang(IDAlbum, IDLang, Disable);
            if (obj != null)
            {
                _converter.DateTimeFormat = "dd/MM/yyyy";

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