public ActionResult <object> Update([FromBody] b_video_resourcesVM model, int Video_ID)
        {
            b_video_resources_Entity entity = model.ConvertToT <b_video_resources_Entity>();

            this.SetUpdateUserInfo(entity);
            return(this._repository.Update(entity, Video_ID).ResponseSuccess());
        }
        public ActionResult <object> GetList([FromBody] b_video_resourcesVM model, int pageindex = 1, int pagesize = 24)
        {
            b_video_resources_Entity entity = model.ConvertToT <b_video_resources_Entity>();

            var(list, total) = this._repository.GetList(entity, pageindex, pagesize);
            return(list.ResponseSuccess("", total));
        }
        public ActionResult <object> Post([FromBody] b_video_resourcesVM model)
        {
            b_video_resources_Entity entity = model.ConvertToT <b_video_resources_Entity>();

            this.SetCreateUserInfo(entity);
            return(this._repository.Insert(entity).ResponseSuccess());
        }
        public ActionResult <object> Delete(int Video_ID)
        {
            b_video_resources_Entity entity = new b_video_resources_Entity();

            this.SetUpdateUserInfo(entity);
            this._repository.Update(entity, Video_ID);
            return(this._repository.Delete(Video_ID).ResponseSuccess());
        }
        public ActionResult <object> GetIndexList()
        {
            b_video_resources_Entity model = new b_video_resources_Entity();

            model.Video_Location = Video_Location.Index.ToString();
            model.Video_Status   = (int)Table_Status.Effective;
            var(list, total)     = this._repository.GetList(model, 1, 1);
            return(list.ResponseSuccess("", total));
        }
        /// <summary>
        /// 获取列表
        /// <summary>
        public (IEnumerable <b_video_resources_Entity>, int) GetList(b_video_resources_Entity model, int pageindex, int pagesize)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (model.Video_ID != 0)
            {
                dic["Video_ID"] = model.Video_ID;
            }
            if (model.Video_Name_CH != null)
            {
                dic["Video_Name_CH"] = model.Video_Name_CH;
            }
            if (model.Video_Name_HK != null)
            {
                dic["Video_Name_HK"] = model.Video_Name_HK;
            }
            if (model.Video_URL != null)
            {
                dic["Video_URL"] = model.Video_URL;
            }
            if (model.Video_Location != null)
            {
                dic["Video_Location"] = model.Video_Location;
            }
            if (model.Video_Status != null && model.Video_Status.HasValue)
            {
                dic["Video_Status"] = model.Video_Status;
            }
            if (model.Video_Seq >= 0)
            {
                dic["Video_Seq"] = model.Video_Seq;
            }
            if (pageindex >= 0)
            {
                dic["StartIndex"] = pageindex <= 1 ? 0 : (pageindex - 1) * pagesize;
            }
            if (pagesize > 0)
            {
                dic["SelectCount"] = pagesize;
            }
            var list = SQLHelperFactory.Instance.QueryMultipleByPage <b_video_resources_Entity>("Select_b_video_resources_List", dic, out int total);

            return(list, total);
        }
        /// <summary>
        /// 修改
        /// <summary>
        public bool Update(b_video_resources_Entity model, int Video_ID)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic["Video_ID"] = Video_ID;
            if (model.Video_Name_CH != null)
            {
                dic["Video_Name_CH"] = model.Video_Name_CH;
            }
            if (model.Video_Name_HK != null)
            {
                dic["Video_Name_HK"] = model.Video_Name_HK;
            }
            if (model.Video_URL != null)
            {
                dic["Video_URL"] = model.Video_URL;
            }
            if (model.Video_Location != null)
            {
                dic["Video_Location"] = model.Video_Location;
            }
            if (model.Video_Status != null && model.Video_Status.HasValue)
            {
                dic["Video_Status"] = model.Video_Status;
            }
            if (model.Video_Seq >= 0)
            {
                dic["Video_Seq"] = model.Video_Seq;
            }
            if (model.Update_UserId != null)
            {
                dic["Update_UserId"] = model.Update_UserId;
            }
            if (model.Update_User != null)
            {
                dic["Update_User"] = model.Update_User;
            }
            return(SQLHelperFactory.Instance.ExecuteNonQuery("Update_b_video_resources", dic) > 0);
        }