public VD_COURSE getDetailsCourse(string CourseID) { VD_COURSE course = new VD_COURSE(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_COURSE", CourseID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { course.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"]); course.Name = Convert.ToString(ds.Tables[0].Rows[0]["Name"]); course.Descriptions = Convert.ToString(ds.Tables[0].Rows[0]["Descriptions"]); course.CourseType = Convert.ToInt32(ds.Tables[0].Rows[0]["CourseType"]); course.CourseTypeName = Convert.ToString(ds.Tables[0].Rows[0]["CourseTypeName"]); course.FromDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["FromDate"]); course.ToDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["ToDate"]); course.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); course.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); } } return(course); }
public VD_About getDetailsAbout(string ID) { VD_About info = new VD_About(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_ABOUT", ID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"]); info.Name = Convert.ToString(ds.Tables[0].Rows[0]["Name"]); info.URL = Convert.ToString(ds.Tables[0].Rows[0]["URL"]); info.ShortDescription = Convert.ToString(ds.Tables[0].Rows[0]["ShortDescription"]); info.MetaDescription = Convert.ToString(ds.Tables[0].Rows[0]["MetaDescription"]); info.MetaKeywords = Convert.ToString(ds.Tables[0].Rows[0]["MetaKeywords"]); info.MetaTitle = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitle"]); info.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); info.CreatedDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["CreatedDate"]); } } return(info); }
public VD_Category getDetailsCategory(string ID) { VD_Category info = new VD_Category(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_CATEGORY", ID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.CategoryID = Convert.ToString(ds.Tables[0].Rows[0]["CategoryID"]); info.CategoryName = Convert.ToString(ds.Tables[0].Rows[0]["CategoryName"]); info.MetaDescription = Convert.ToString(ds.Tables[0].Rows[0]["MetaDescription"]); info.MetaKeywords = Convert.ToString(ds.Tables[0].Rows[0]["MetaKeywords"]); info.MetaTitle = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitle"]); info.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); info.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); info.IsHomeIndex = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsHomeIndex"]); } } return(info); }
public VD_HOCVIEN getDetailsHocVien(string ID) { VD_HOCVIEN info = new VD_HOCVIEN(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_HOCVIEN", ID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"]); info.FullName = Convert.ToString(ds.Tables[0].Rows[0]["FullName"]); info.CMND = Convert.ToString(ds.Tables[0].Rows[0]["CMND"]); info.PhapDanh = Convert.ToString(ds.Tables[0].Rows[0]["PhapDanh"]); info.Birthday = Convert.ToDateTime(ds.Tables[0].Rows[0]["Birthday"]); info.Phone1 = Convert.ToString(ds.Tables[0].Rows[0]["Phone1"]); info.Phone2 = Convert.ToString(ds.Tables[0].Rows[0]["Phone2"]); info.Address = Convert.ToString(ds.Tables[0].Rows[0]["Address"]); info.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); info.AreasID = Convert.ToInt64(ds.Tables[0].Rows[0]["AreasID"]); info.AreasName = Convert.ToString(ds.Tables[0].Rows[0]["AreasName"]); info.CourseID = Convert.ToInt64(ds.Tables[0].Rows[0]["CourseID"]); info.CourseName = Convert.ToString(ds.Tables[0].Rows[0]["CourseName"]); info.UserTypeID = Convert.ToString(ds.Tables[0].Rows[0]["UserTypeID"]); info.UserTypeName = Convert.ToString(ds.Tables[0].Rows[0]["UserTypeName"]); info.CreatedDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["CreatedDate"]); info.IsApproval = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsApproval"]); } } return(info); }
public List <VD_POST> getAllPostByCategory(string CategoryCode) { List <VD_POST> lst = new List <VD_POST>(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GETLIST_POST_BY_CATEGORY", CategoryCode); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { lst.Add(new VD_POST { ID = Convert.ToInt64(row["ID"]), CategoryID = Convert.ToString(row["CategoryID"]), CategoryName = Convert.ToString(row["CategoryName"]), MetaTitleCategory = Convert.ToString(row["MetaTitleCategory"]), MainMenuID = Convert.ToString(row["MainMenuID"]), MainMenuName = Convert.ToString(row["MainMenuName"]), MetaTitleMainMenu = Convert.ToString(row["MetaTitleMainMenu"]), SubMenuID = Convert.ToString(row["SubMenuID"]), SubMenuName = Convert.ToString(row["SubMenuName"]), MetaTitleSubMenu = Convert.ToString(row["MetaTitleSubMenu"]), TitlePost = Convert.ToString(row["TitlePost"]), ContentPost = Convert.ToString(row["ContentPost"]), CreatedBy = Convert.ToString(row["CreatedBy"]), CreatedDate = Convert.ToDateTime(row["CreatedDate"]), ChangeBy = Convert.ToString(row["ChangeBy"]), ChangeDate = Convert.ToDateTime(row["ChangeDate"]), IsPublish = Convert.ToBoolean(row["IsPublish"]), IsSlide = Convert.ToBoolean(row["IsSlide"]), IsHome = Convert.ToBoolean(row["IsHome"]), IsActive = Convert.ToBoolean(row["IsActive"]), Comment = Convert.ToString(row["Comment"]), ImagesDisplay = Convert.ToString(row["ImagesDisplay"]), ShortDescription = Convert.ToString(row["ShortDescription"]), MetaDescription = Convert.ToString(row["MetaDescription"]), MetaKeywords = Convert.ToString(row["MetaKeywords"]), MetaTitle = Convert.ToString(row["MetaTitle"]), AdminComment = Convert.ToString(row["AdminComment"]) }); } } } return(lst); }
public VD_MainMenu getDetailsMainMenu(string ID) { VD_MainMenu info = new VD_MainMenu(); List <VD_SubMenu> lstSub = new List <VD_SubMenu>(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_MAINMENU", ID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.MainMenuID = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuID"]); info.MainMenuName = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuName"]); info.MetaDescription = Convert.ToString(ds.Tables[0].Rows[0]["MetaDescription"]); info.MetaKeywords = Convert.ToString(ds.Tables[0].Rows[0]["MetaKeywords"]); info.MetaTitle = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitle"]); info.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); info.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); } if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0) { foreach (DataRow row in ds.Tables[1].Rows) { lstSub.Add(new VD_SubMenu { ID = Convert.ToInt64(row["ID"]), MainMenuID = Convert.ToString(row["MainMenuID"]), MainMenuName = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuName"]), SubMenuID = Convert.ToString(row["SubMenuID"]), SubMenuName = Convert.ToString(row["SubMenuName"]), MetaTitleMainMenu = Convert.ToString(row["MetaTitleMainMenu"]), MetaDescription = Convert.ToString(row["MetaDescription"]), MetaKeywords = Convert.ToString(row["MetaKeywords"]), MetaTitle = Convert.ToString(row["MetaTitle"]), IsActive = Convert.ToBoolean(row["IsActive"]), zIndex = Convert.ToInt32(row["zIndex"]) }); } } } info.lstSubMenu = lstSub; return(info); }
public VD_POST getPostIndexByCategory(string CateID) { VD_POST info = new VD_POST(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_POST_INDEX_BY_CATEGORY", CateID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"]); info.CategoryID = Convert.ToString(ds.Tables[0].Rows[0]["CategoryID"]); info.CategoryName = Convert.ToString(ds.Tables[0].Rows[0]["CategoryName"]); info.MetaTitleCategory = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitleCategory"]); info.MainMenuID = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuID"]); info.MainMenuName = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuName"]); info.MetaTitleMainMenu = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitleMainMenu"]); info.SubMenuID = Convert.ToString(ds.Tables[0].Rows[0]["SubMenuID"]); info.SubMenuName = Convert.ToString(ds.Tables[0].Rows[0]["SubMenuName"]); info.MetaTitleSubMenu = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitleSubMenu"]); info.TitlePost = Convert.ToString(ds.Tables[0].Rows[0]["TitlePost"]); info.ContentPost = Convert.ToString(ds.Tables[0].Rows[0]["ContentPost"]); info.CreatedBy = Convert.ToString(ds.Tables[0].Rows[0]["CreatedBy"]); info.CreatedDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["CreatedDate"]); info.ChangeBy = Convert.ToString(ds.Tables[0].Rows[0]["ChangeBy"]); info.ChangeDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["ChangeDate"]); info.IsPublish = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsPublish"]); info.IsSlide = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsSlide"]); info.IsHome = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsHome"]); info.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); info.Comment = Convert.ToString(ds.Tables[0].Rows[0]["Comment"]); info.ImagesDisplay = Convert.ToString(ds.Tables[0].Rows[0]["ImagesDisplay"]); info.ShortDescription = Convert.ToString(ds.Tables[0].Rows[0]["ShortDescription"]); info.MetaDescription = Convert.ToString(ds.Tables[0].Rows[0]["MetaDescription"]); info.MetaKeywords = Convert.ToString(ds.Tables[0].Rows[0]["MetaKeywords"]); info.MetaTitle = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitle"]); info.AdminComment = Convert.ToString(ds.Tables[0].Rows[0]["AdminComment"]); } } return(info); }
public VD_AREAS getDetailsAreas(string AreasID) { VD_AREAS areas = new VD_AREAS(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_AREAS", AreasID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { areas.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"]); areas.Name = Convert.ToString(ds.Tables[0].Rows[0]["Name"]); areas.Descriptions = Convert.ToString(ds.Tables[0].Rows[0]["Descriptions"]); areas.Quantity = Convert.ToInt32(ds.Tables[0].Rows[0]["Quantity"]); areas.PersonRegister = _DBAccess.countPersonOnAreas("WEB_VD_COUNT_PERSON_AREAS", Convert.ToInt64(ds.Tables[0].Rows[0]["ID"])); areas.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); areas.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); } } return(areas); }