Ejemplo n.º 1
0
 public ActionResult SetStore(string ids)
 {
     if (!string.IsNullOrWhiteSpace(ids))
     {
         StdsysFilesStoreBLL stdsysfsbll = new StdsysFilesStoreBLL();
         var user = ERCHTMS.Code.OperatorProvider.Provider.Current();
         var list = ids.Split(',');
         foreach (var id in list)
         {
             var entity = stdsysfsbll.GetList(string.Format(" and userid='{0}' and stdsysid='{1}'", user.UserId, id)).FirstOrDefault();
             if (entity == null)
             {
                 entity = new StdsysFilesStoreEntity()
                 {
                     UserId   = user.UserId,
                     StdSysId = id
                 };
                 stdsysfsbll.SaveForm("", entity);
             }
         }
         return(Success("收藏成功。"));
     }
     else
     {
         return(Error("收藏失败。"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult RemoveStore(string ids)
 {
     if (!string.IsNullOrWhiteSpace(ids))
     {
         StdsysFilesStoreBLL stdsysfsbll = new StdsysFilesStoreBLL();
         var user = ERCHTMS.Code.OperatorProvider.Provider.Current();
         var list = stdsysfsbll.GetList(string.Format(" and userid='{0}' and stdsysid in ('{1}')", user.UserId, ids.Replace(",", "','"))).ToList();
         stdsysfsbll.RemoveForm(list);
         return(Success("取消成功。"));
     }
     else
     {
         return(Error("取消失败。"));
     }
 }