예제 #1
0
        public List <VD_About> getListAbout()
        {
            List <VD_About> lst = new List <VD_About>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GET_LIST_ABOUT");
            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_About
                        {
                            ID               = Convert.ToInt64(row["ID"]),
                            Name             = Convert.ToString(row["Name"]),
                            URL              = Convert.ToString(row["URL"]),
                            ShortDescription = Convert.ToString(row["ShortDescription"]),
                            MetaDescription  = Convert.ToString(row["MetaDescription"]),
                            MetaKeywords     = Convert.ToString(row["MetaKeywords"]),
                            MetaTitle        = Convert.ToString(row["MetaTitle"]),
                            IsActive         = Convert.ToBoolean(row["IsActive"]),
                            CreatedDate      = Convert.ToDateTime(row["CreatedDate"])
                        });
                    }
                }
            }

            return(lst);
        }
예제 #2
0
        public List <VD_MainMenu> getListMainMenu()
        {
            List <VD_MainMenu> lst = new List <VD_MainMenu>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_MAINMENU");
            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_MainMenu
                        {
                            MainMenuID      = Convert.ToString(row["MainMenuID"]),
                            MainMenuName    = Convert.ToString(row["MainMenuName"]),
                            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"]),
                            lstSubMenu      = getDetailsMainMenu(row["MainMenuID"].ToString()).lstSubMenu
                        });
                    }
                }
            }

            return(lst);
        }
예제 #3
0
        public List <VD_COURSE> getListCourse()
        {
            List <VD_COURSE> lstCourse = new List <VD_COURSE>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_COURSE");
            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)
                    {
                        lstCourse.Add(new VD_COURSE
                        {
                            ID             = Convert.ToInt64(row["ID"]),
                            Name           = Convert.ToString(row["Name"]),
                            Descriptions   = Convert.ToString(row["Descriptions"]),
                            CourseType     = Convert.ToInt32(row["CourseType"]),
                            CourseTypeName = Convert.ToString(row["CourseTypeName"]),
                            FromDate       = Convert.ToDateTime(row["FromDate"]),
                            ToDate         = Convert.ToDateTime(row["ToDate"]),
                            IsActive       = Convert.ToBoolean(row["IsActive"]),
                            zIndex         = Convert.ToInt32(row["zIndex"])
                        });
                    }
                }
            }

            return(lstCourse);
        }
예제 #4
0
        public List <VD_AREAS> getListAreas()
        {
            List <VD_AREAS> lstAreas = new List <VD_AREAS>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_AREAS");
            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)
                    {
                        lstAreas.Add(new VD_AREAS
                        {
                            ID             = Convert.ToInt64(row["ID"]),
                            Name           = Convert.ToString(row["Name"]),
                            Descriptions   = Convert.ToString(row["Descriptions"]),
                            Quantity       = Convert.ToInt32(row["Quantity"]),
                            PersonRegister = _DBAccess.countPersonOnAreas("WEB_VD_COUNT_PERSON_AREAS", Convert.ToInt64(row["ID"])),
                            IsActive       = Convert.ToBoolean(row["IsActive"]),
                            zIndex         = Convert.ToInt32(row["zIndex"])
                        });
                    }
                }
            }

            return(lstAreas);
        }
예제 #5
0
        public List <VD_Category> getListCategory()
        {
            List <VD_Category> lst = new List <VD_Category>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_CATEGORY");
            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_Category
                        {
                            CategoryID      = Convert.ToString(row["CategoryID"]),
                            CategoryName    = Convert.ToString(row["CategoryName"]),
                            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"]),
                            IsHomeIndex     = Convert.ToBoolean(row["IsHomeIndex"])
                        });
                    }
                }
            }

            return(lst);
        }
예제 #6
0
        public List <VD_POST> getListPost()
        {
            List <VD_POST> lst = new List <VD_POST>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_POST");
            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);
        }
예제 #7
0
        public List <VD_HOCVIEN> getListHocVien()
        {
            List <VD_HOCVIEN> lst = new List <VD_HOCVIEN>();

            _DBAccess = new DBController();
            DataSet ds = new DataSet();

            ds = _DBAccess.GetEntityList("WEB_VD_GETLIST_HOCVIEN");
            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_HOCVIEN
                        {
                            ID           = Convert.ToInt64(row["ID"]),
                            FullName     = Convert.ToString(row["FullName"]),
                            CMND         = Convert.ToString(row["CMND"]),
                            PhapDanh     = Convert.ToString(row["PhapDanh"]),
                            Birthday     = Convert.ToDateTime(row["Birthday"]),
                            Phone1       = Convert.ToString(row["Phone1"]),
                            Phone2       = Convert.ToString(row["Phone2"]),
                            Address      = Convert.ToString(row["Address"]),
                            zIndex       = Convert.ToInt32(row["zIndex"]),
                            AreasID      = Convert.ToInt64(row["AreasID"]),
                            AreasName    = Convert.ToString(row["AreasName"]),
                            CourseID     = Convert.ToInt64(row["CourseID"]),
                            CourseName   = Convert.ToString(row["CourseName"]),
                            UserTypeID   = Convert.ToString(row["UserTypeID"]),
                            UserTypeName = Convert.ToString(row["UserTypeName"]),
                            CreatedDate  = Convert.ToDateTime(row["CreatedDate"]),
                            IsApproval   = Convert.ToBoolean(row["IsApproval"])
                        });
                    }
                }
            }

            return(lst);
        }