Пример #1
0
        //--------------//
        public void Sel_ByCodeAlbum_ByIDLang(HttpContext context)
        {
            String   jSonString = "";
            AlbumsBO albumBO    = new AlbumsBO();
            int      IDLang     = string.IsNullOrEmpty(context.Request.QueryString["IDLang"]) ? CORE_Language.sys_CUR_LANG : int.Parse(context.Request.QueryString["IDLang"]);
            string   CodeAlbum  = string.IsNullOrEmpty(context.Request.QueryString["CodeAlbum"]) ? "000" : context.Request.QueryString["CodeAlbum"].ToString();


            List <Albums> obj = albumBO.Sel_ByCodeAlbum_ByIDLang(CodeAlbum, IDLang).ToList();


            if (obj != null)
            {
                _converter.DateTimeFormat = "dd/MM/yyyy";
                jSonString = JsonConvert.SerializeObject(obj, _converter);
            }

            jSonString = "{\"data\":" + jSonString + "}";
            context.Response.Write(jSonString);
        }