コード例 #1
0
        public AjaxResult GetSuppliers()
        {
            var ajaxResult = new AjaxResult();

            try
            {
                using (SupplierBL supplierBL = new SupplierBL())
                {
                    ajaxResult.Data    = supplierBL.GetAllSupplierViewModel();
                    ajaxResult.Success = true;
                }
            }
            catch (Exception)
            {
                ajaxResult.Success   = false;
                ajaxResult.Messenger = "Có lỗi xảy ra khi lấy danh sách các nhà cung cấp để đổ dữ liệu xuống client. Vui lòng liên hệ MISA!";
            }
            return(ajaxResult);
        }