Exemple #1
0
       public string saveQCS(string heatseal,string location)
       {
 
           DBAccess db = new DBAccess(connections[connectionNames[0]].ConnectionString);
           return db.SaveQCS(heatseal, location);
          
       }
Exemple #2
0
        public Employee GetEmployee(int id)
        {
           

            DBAccess db = new DBAccess(connections[connectionNames[0]].ConnectionString);
            return db.GetEmployee(id);
        
        }
Exemple #3
0
 public void AddNote(string heatseal, string note)
 {
     DBAccess db = new DBAccess(connections[connectionNames[0]].ConnectionString);
     db.saveNote(heatseal, note);
  
 }
Exemple #4
0
 //public void GetCustomer(int orderID)
 //{
 //    activeCustomer =  db.GetCustomerInfo(orderID);
 //}
 //unfortunately the customer info is saved in a store specific database so we
 //have to look in all stores to find the info
 public bool GetCustomer(int customerID)
 {
     List<string> connectionNames = new List<string>() { "Store1Entities", "Store2Entities", "Store3Entities", "Store4Entities" };
     string indexString = customerID.ToString();
     int storeID = Int32.Parse(indexString[0].ToString());
     if (storeID < 0 || storeID > 4)
         return false;
     string storeconnectionstring = connectionNames[storeID - 1];
     //retrieve the connection string frpm app.config
     ConnectionStringSettingsCollection connections = ConfigurationManager.ConnectionStrings;
            
     DBAccess db = new DBAccess(connections[storeconnectionstring].ConnectionString);
     activeCustomer = db.GetCustomer(customerID);
     if (activeCustomer != null) return false;
     return true;
     
 }
Exemple #5
0
        public void OpenDB(string connectionString)
        {

            logger.Info("OpenDB " + connectionString);
            db = new DBAccess(connectionString);
     //       db.Database.CommandTimeout = int.MaxValue;
            logger.Info("OpenDB done " + connectionString);
        }