Пример #1
0
        public MyResult <object> GetOneScenic(int id)
        {
            ScenicDto model = new ScenicDto {
                Id = id
            };

            return(SetingService.GetOneScenic(model));
        }
Пример #2
0
 public MyResult <object> AnnounceAdd_Update([FromBody] AnnounceDto model)
 {
     if (!string.IsNullOrEmpty(model.Id.ToString()) && model.Id > 0)
     {
         return(SetingService.UpdateAnnounce(model));
     }
     return(SetingService.AddAnnounce(model));
 }
Пример #3
0
 public MyResult <object> BannerAdd_Updata([FromBody] BannerDto model)
 {
     if (!string.IsNullOrEmpty(model.Pic) && model.Pic.Length > 1000)
     {
         var fileName = DateTime.Now.GetTicket().ToString();
         model.Pic = ImageHandlerUtil.SaveBase64Image(model.Pic, $"{fileName}.png", Constants.BANNER_PATH);
     }
     return(SetingService.AddBanner(model));
 }
Пример #4
0
 public MyResult <object> SaveMessageType([FromBody] MessageTypeDto model)
 {
     if (!string.IsNullOrEmpty(model.Pic) && model.Pic.Length > 1000)
     {
         var fileName = DateTime.Now.GetTicket().ToString();
         model.Pic = ImageHandlerUtil.SaveBase64Image(model.Pic, $"{fileName}.png", Constants.MessageType_PATH);
     }
     if (model.Id.HasValue)
     {
         return(SetingService.UpdateMessageType(model));
     }
     return(SetingService.AddMessageType(model));
 }
Пример #5
0
 public MyResult <object> DelMessageType([FromBody] MessageTypeDto model)
 {
     return(SetingService.DelMessageType(model));
 }
Пример #6
0
 public MyResult <object> DelScenic([FromBody] ScenicDto model)
 {
     return(SetingService.DelScenic(model));
 }
Пример #7
0
 public MyResult <object> ScenicList([FromBody] ScenicDto model)
 {
     return(SetingService.GetScenic(model));
 }
Пример #8
0
 public MyResult <object> DelBannerPic([FromBody] BannerDto model)
 {
     return(SetingService.DelBanner(model.Id));
 }
Пример #9
0
 public MyResult <object> BannerManagerList([FromBody] BannerDto model)
 {
     return(SetingService.GetBanner(model));
 }
Пример #10
0
 public MyResult <object> GetAnnounceTitle()
 {
     return(SetingService.GetAnnounceTitle());
 }
Пример #11
0
 public MyResult <object> GetOneAnnounce(int id)
 {
     return(SetingService.GetOneAnnounce(id));
 }
Пример #12
0
 public MyResult <object> UpdateAnnounce([FromBody] AnnounceDto model)
 {
     return(SetingService.UpdateAnnounce(model));
 }
Пример #13
0
 public MyResult <object> DelAnnounce(int id)
 {
     return(SetingService.DelAnnounce(id));
 }
Пример #14
0
 public MyResult <object> GetAnnounces([FromBody] AnnounceDto model)
 {
     return(SetingService.GetAnnounces(model));
 }