/// <summary> /// 根据id查询新闻公告 /// </summary> /// <returns></returns> public static NewsInfo GetNewsInfo(int Sysno) { var result = NewsDA.GetNewsInfo(Sysno); if (result == null) { result = new NewsInfo(); } return(result); }
/// <summary> /// 查询sp首页10条新闻公告 /// </summary> /// <returns></returns> public static List <NewsInfo> GetTop10NewsInfoList() { var result = NewsDA.GetTop10NewsInfoList(); if (result == null) { result = new List <NewsInfo>(); } return(result); }
public decimal ArticlesInsert(NewsInfo pInfo) { try { NewsDA objDA = new NewsDA(); return(objDA.ArticlesInsert(pInfo)); } catch (Exception ex) { Logger.LogException(ex); return(ErrorCode.Error); } }
public decimal Update_Status(string p_case_code, decimal p_status, string p_note, string p_user_name) { try { NewsDA objDA = new NewsDA(); return(objDA.Update_Status(p_case_code, p_status, p_note, p_user_name)); } catch (Exception ex) { Logger.LogException(ex); return(-1); } }
public NewsInfo ArticlesGetByCaseCode(string p_Case_Code, string pLanguage) { try { NewsDA objDA = new NewsDA(); DataSet ResultData = objDA.ArticlesGetByCaseCode(p_Case_Code, pLanguage); return(CBO <NewsInfo> .FillObjectFromDataSet(ResultData)); } catch (Exception ex) { Logger.LogException(ex); return(new NewsInfo()); } }
public List <NewsInfo> NewsStatic(string language) { try { NewsDA _da = new NewsDA(); DataSet _ds = _da.NewsStatic(language); return(CBO <NewsInfo> .FillCollectionFromDataSet(_ds)); } catch (Exception ex) { Logger.LogException(ex); return(new List <NewsInfo>()); } }
public List <NewsInfo> ArticlesGetByPage(string pLanguage, string pTitle, DateTime pNgayCongBo, int pStart, int pEnd, ref decimal pTotalRecord) { try { NewsDA _da = new NewsDA(); DataSet _ds = _da.ArticlesGetByPage(pLanguage, pTitle, pNgayCongBo, pStart, pEnd, ref pTotalRecord); return(CBO <NewsInfo> .FillCollectionFromDataSet(_ds)); } catch (Exception ex) { Logger.LogException(ex); return(new List <NewsInfo>()); } }
public List <NewsInfo> ArticleHomeSearch(string p_key_search, ref decimal p_total_record, string p_from = "1", string p_to = "10", string p_sort_type = "ALL") { try { NewsDA _da = new NewsDA(); DataSet _ds = _da.NewsHomeSearch(p_key_search, p_from, p_to, p_sort_type, ref p_total_record); return(CBO <NewsInfo> .FillCollectionFromDataSet(_ds)); } catch (Exception ex) { Logger.LogException(ex); return(new List <NewsInfo>()); } }
public static void LoadNews() { try { NewsDA _newsDa = new NewsDA(); var portalSearchNews = new PortalSearchNewsIndex { Start = 1, End = 0, Id = 0 }; var pTotal = 0; var ds = _newsDa.GetForPortalDetail(portalSearchNews, ref pTotal); c_lstNew = CBO <News> .FillCollectionFromDataSet(ds); c_lstNew = c_lstNew.OrderByDescending(m => m.Id).ToList(); } catch (Exception ex) { Logger.Log.Error(ex.ToString()); } }
public PhongThuy(string filePath) { CanChiDictionary = new Dictionary <int, string> { { 1, "Giáp Tý" }, { 2, "Ất Sửu" }, { 3, "Bính Dần" }, { 4, "Đinh Mão" }, { 5, "Mậu Thìn" }, { 6, "Kỷ Tỵ" }, { 7, "Canh Ngọ" }, { 8, "Tân Mùi" }, { 9, "Nhâm Thân" }, { 10, "Quý Dậu" }, { 11, "Giáp Tuất" }, { 12, "Ất Hợi" }, { 13, "Bính Tý" }, { 14, "Đinh Sửu" }, { 15, "Mậu Dần" }, { 16, "Kỷ Mão" }, { 17, "Canh Thìn" }, { 18, "Tân Tỵ" }, { 19, "Nhâm Ngọ" }, { 20, "Quý Mùi" }, { 21, "Giáp Thân" }, { 22, "Ất Dậu" }, { 23, "Bình Tuất" }, { 24, "Đinh Hợi" }, { 25, "Mậu Tý" }, { 26, "Kỷ Sửu" }, { 27, "Canh Dần" }, { 28, "Tân Mão" }, { 29, "Nhâm Thìn" }, { 30, "Quý Tỵ" }, { 31, "Giáp Ngọ" }, { 32, "Ất Mùi" }, { 33, "Bình Thân" }, { 34, "Đinh Dậu" }, { 35, "Mậu Tuất" }, { 36, "Kỷ Hợi" }, { 37, "Canh Tý" }, { 38, "Tân Sửu" }, { 39, "Nhâm Dần" }, { 40, "Quý Mão" }, { 41, "Giáp Thìn" }, { 42, "Ất Tỵ" }, { 43, "Bính Ngọ" }, { 44, "Đinh Mùi" }, { 45, "Mậu Thân" }, { 46, "Kỷ Dậu" }, { 47, "Canh Tuất" }, { 48, "Tân Hợi" }, { 49, "Nhâm Tý" }, { 50, "Quý Sửu" }, { 51, "Giáp Dần" }, { 52, "Ất Mão" }, { 53, "Bính Thìn" }, { 54, "Đinh Tỵ" }, { 55, "Mậu Ngọ" }, { 56, "Kỷ Mùi" }, { 57, "Canh Thân" }, { 58, "Tân Dậu" }, { 59, "Nhâm Tuất" }, { 0, "Quý Hợi" } }; PhongThuyDictionary = new Dictionary <int, Menh>(); // var arrMenh = ReadFileExcel(filePath); NewsDA _NewsDA = new NewsDA(); DataSet _ds = _NewsDA.Feng_Shui_GetAll(); List <Menh> arrMenh = CBO <Menh> .FillCollectionFromDataSet(_ds); var start = 1948; foreach (var item in arrMenh) { var soCanChi = (start - 3) % 60; item.CanChi = CanChiDictionary[soCanChi]; PhongThuyDictionary.Add(soCanChi, item); start++; var _Menh = new Menh { Ten = item.Ten, MauTuongSinh = item.MauTuongSinh, MauTuongKhac = item.MauTuongKhac }; soCanChi = (start - 3) % 60; _Menh.CanChi = CanChiDictionary[soCanChi]; PhongThuyDictionary.Add(soCanChi, _Menh); start++; } }
public IEnumerable <DataStructure.News> Search(IConnectionHandler connectionHandler, string text) { var newsDa = new NewsDA(connectionHandler); return(newsDa.Search(text)); }
public async Task <IEnumerable <DataStructure.News> > GetTopNewsAsync(IConnectionHandler connectionHandler, int topCount, bool isSelected) { var newsDa = new NewsDA(connectionHandler); return(await newsDa.GetTopNewsAsync(topCount, isSelected)); }
public IEnumerable <DataStructure.News> GetTopNews(IConnectionHandler connectionHandler, int topCount, bool isSelected) { var newsDa = new NewsDA(connectionHandler); return(newsDa.GetTopNews(topCount, isSelected)); }
public IEnumerable <DataStructure.News> GetByCategory(IConnectionHandler connectionHandler, Guid categoryId, int?topCount) { var newsDa = new NewsDA(connectionHandler); return(newsDa.GetByCategory(categoryId, topCount)); }
public NewsContentController() { _newsDa = new NewsDA("#"); _categoryDa = new CategoryDA("#"); }
public NewsBL() { newsDA = new NewsDA(); }