Example #1
0
        public VD_POST getDetailsPost(long ID)
        {
            VD_POST info = new VD_POST();

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

            ds = _DBAccess.getPostByID("WEB_VD_GET_DETAILS_POST", 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.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);
        }