Exemplo n.º 1
0
        public bool CreateInfo(InformationContract newIF)
        {
            Information i = new Information {
                idCate = newIF.idCate, idUser = newIF.idUser, titleInfo = newIF.titleInfo, contentInfo = newIF.contentInfo, hideInfo = newIF.hideInfo, newInfo = newIF.newInfo, token = newIF.token
            };

            if (Repositories.CreateInfo(i) == true)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        public bool UpdateInfo(InformationContract i)
        {
            Information info = new Information();

            info.titleInfo   = i.titleInfo;
            info.idCate      = i.idCate;
            info.contentInfo = i.contentInfo;
            info.idInfor     = i.idInfor;
            if (Repositories.UpdateInfo(info) == true)
            {
                return(true);
            }
            return(false);
        }