Ejemplo n.º 1
0
 public ObservableCollection<LinksModel> Download_Links(long LastModifiedDate, long ServerLastModifiedDate)
 {
     ObservableCollection<LinksModel> result = new ObservableCollection<LinksModel>();
     try
     {
         using (var repository = new LinksRepository())
         {
             result = repository.GetCatLinks(LastModifiedDate, ServerLastModifiedDate);
         }
     }
     catch (Exception)
     {
         ;
     }
     return result;
 }
 public string LinksUpdate(string KeySesion, string IdLinks, string LinkUrl, string LinkName)
 {
     string res = "";
     LinksRepository LinkUpdate = new LinksRepository();
     try
     {
         LinkUpdate.Links_Update(KeySesion, IdLinks, LinkUrl, LinkName);
     }
     catch (Exception ex)
     {
         var err = ex.Message;
     }
     return res;
 }
 public string LinksDelete(string KeySesion, string IdLink)
 {
     string res = "";
     LinksRepository LinkDelete = new LinksRepository();
     try
     {
         LinkDelete.Links_Delete(KeySesion, IdLink);
     }
     catch (Exception ex)
     {
         var err = ex.Message;
     }
     return res;
 }
 public string LinksInsert(string KeySesion, string LinkUrl, string LinkName)
 {
     string res = "";
     LinksRepository LinkInsert = new LinksRepository();
     try
     {
         LinkInsert.Links_Insert(KeySesion, LinkUrl, LinkName);
     }
     catch (Exception ex)
     {
         var err = ex.Message;
     }
     return res;
 }
 public ObservableCollection<LinksModel> Download_LinksSelec(string KeySesion)
 {
     ObservableCollection<LinksModel> result = new ObservableCollection<LinksModel>();
     try
     {
         using (var repository = new LinksRepository())
         {
             result = repository.get_Links(KeySesion.ToString());
         }
     }
     catch (Exception)
     {
         ;
     }
     return result;
 }