Beispiel #1
0
 public string GetLastSTAN()
 {
     try
     {
         string           STAN = "";
         tbl_transactions t    = new DAL.tbl_transactions();
         using (var db = new SoneriCISEntities())
         {
             t = db.tbl_transactions.OrderByDescending(a => a.ID).FirstOrDefault();
         }
         return(t.STAN);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
 public long GetLastID()
 {
     try
     {
         long             ID = 0;
         tbl_transactions t  = new DAL.tbl_transactions();
         using (var db = new SoneriCISEntities())
         {
             t = db.tbl_transactions.OrderByDescending(a => a.ID).FirstOrDefault();
         }
         return(t.ID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #3
0
 public bool CheckUniqueSTAN(string STAN)
 {
     try
     {
         tbl_transactions t = new DAL.tbl_transactions();
         using (var db = new SoneriCISEntities())
         {
             t = db.tbl_transactions.Where(a => a.STAN == STAN).FirstOrDefault();
         }
         if (t == null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }