Exemple #1
0
 public tbl_File_Paths GetFilePathByTypeID2(string typeID)
 {
     try
     {
         tbl_File_Paths row = new DAL.tbl_File_Paths();
         using (var db = new SoneriCISEntities())
         {
             row = db.tbl_File_Paths.FirstOrDefault(e => e.PathType == typeID);
         }
         return(row);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public bool UpdateFilePath(tbl_File_Paths row)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_File_Paths val = new DAL.tbl_File_Paths();
             val          = db.tbl_File_Paths.Where(a => a.ID == row.ID).FirstOrDefault();
             val.PathType = row.PathType;
             val.Path     = row.Path;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }