Exemplo n.º 1
0
 public ActionResult AjaxAddToAlbum(FormCollection Fm)
 {
     Maticsoft.Model.SNS.UserAlbumDetail model = new Maticsoft.Model.SNS.UserAlbumDetail();
     Maticsoft.BLL.SNS.UserAlbumDetail detail2 = new Maticsoft.BLL.SNS.UserAlbumDetail();
     int targetID = Globals.SafeInt(Fm["TargetId"], 0);
     int type = (Fm["Type"] == "Product") ? 1 : 0;
     int albumID = Globals.SafeInt(Fm["AlbumId"], 0);
     if (albumID > 0)
     {
         string str = Fm["Des"];
         model.TargetID = targetID;
         model.Type = type;
         model.Description = str;
         model.AlbumUserId = base.currentUser.UserID;
         model.AlbumID = albumID;
         if (detail2.Exists(albumID, targetID, type))
         {
             return base.Content("Repeat");
         }
         if (detail2.AddEx(model))
         {
             return base.Content("Ok");
         }
     }
     return base.Content("No");
 }