public void SetPaymentFree() { try { String query = String.Format("UPDATE Customer SET User3 = 0 WHERE CustId = '{0}'", this.customerID); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
public void Register() { try { String query = String.Format("INSERT INTO PaymentsUsers (UserName, Password, Name) VALUES ('{0}', '{1}', '{2}')", user.userName, user.password, user.name); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
public void SavePhone(Phone phone) { try { String query = String.Format(@"INSERT INTO PaymentsCustomerPhone (FKCustomerSL, PhoneType, Phone) VALUES ('{0}', '{1}', '{2}')", this.fkHolder, phone.phoneType, phone.phone); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
private void InsertQueueByUser() { try { String query = String.Format(@"INSERT INTO PaymentsQueueUsers (FKQueueU, FKUser) VALUES ({0}, {1})", this.pkQueueU, this.pkUser); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
private void UpdateQueueByUser() { try { String query = String.Format(@"UPDATE PaymentsQueueUsers SET FKQueueU = {0} WHERE FKUser = {1}", this.pkQueueU, this.pkUser); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
public void Save() { try { String query = String.Format(@"INSERT INTO PaymentsRecord (FKUser, FKCusId, FKCallType, PhoneCalled, FkStatusCall, Coments, StartDate, FinalDate) VALUES ({0}, '{1}', {2}, '{3}', {4}, '{5}', '{6}', '{7}')", fkUser, PKCustomer, fkCallType, phoneCalled, fkStatusCall, coments, startTime.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
public void SaveQueueU(String queueName, String moraValue, String historialMoraValue, String status, String productoFinanciadoValue, String creditoSimpleValue, String arrendamientoValue) { try { String query = String.Format(@"INSERT INTO PaymentsQueueU (QueueUName) VALUES ('{0}')", queueName); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); SetPKQueueU(queueName); SaveQueueMix(moraValue, historialMoraValue, status, productoFinanciadoValue, creditoSimpleValue, arrendamientoValue); } catch (Exception ex) { throw ex; } }
public void SaveAddrees(Address information) { try { String query = String.Format(@"INSERT INTO PaymentsGuaranteeAddress (FKGuarantee, AddressType, Address, BetweenStreets, Colony, City, AreaCode, Reference) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}')", this.pkGuarantee, information.addressType, information.myAddress, information.betweenStreets, information.colony, information.city, information.CP, information.reference); DataBaseSettings db = new DataBaseSettings(); db.ExecuteQuery(query); } catch (Exception ex) { throw ex; } }
private void SaveQueueMix(String moraValue, String historialMoraValue, String status, String productoFinanciadoValue, String creditoSimpleValue, String arrendamientoValue) { try { SetPKQueueC(); String query = String.Empty; DataBaseSettings db = new DataBaseSettings(); foreach (int pkQueueC in pkQueueC) { switch (pkQueueC) { case 1: query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, moraValue); break; case 3: query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, historialMoraValue); break; case 6: query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, status); break; case 8: query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, productoFinanciadoValue); break; /* * case 9: * query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, creditoSimpleValue); * break; * * case 10: * query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU, Value) VALUES ({0}, {1}, '{2}')", pkQueueC, this.pkQueueU, arrendamientoValue); * break; */ default: query = String.Format(@"INSERT INTO PaymentsQueueMix (FKQueueC, FKQueueU) VALUES ({0}, {1})", pkQueueC, this.pkQueueU); //without value break; } db.ExecuteQuery(query); } } catch (Exception ex) { throw ex; } }