public void InitBal(BloodBankBAL balBank, BloodDonationCampBAL balCamp, BloodDonorBAL balDonor, BloodDonorDonationBAL balDonation, BloodInventoryBAL balInventory, HospitalBAL balHospital, TransactionBAL balTransaction) { try { this.balBank = balBank; this.balCamp = balCamp; this.balDonor = balDonor; this.balDonation = balDonation; this.balInventory = balInventory; this.balHospital = balHospital; this.balTransaction = balTransaction; } catch (System.Data.SqlClient.SqlException ex) { MessageHandler.ShowErrorMessage(ex.Message); } catch (ValidationException ex) { MessageHandler.ShowErrorMessage(ex.Message); } catch (ConnectedDalException ex) { MessageHandler.ShowErrorMessage(ex.Message); } catch (Exception ex) { MessageHandler.ShowErrorMessage(ex.Message); } }
void InitBal() { string connectionString = ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString; balBank = new BloodBankBAL(connectionString); balCamp = new BloodDonationCampBAL(connectionString); balDonor = new BloodDonorBAL(connectionString); balDonation = new BloodDonorDonationBAL(connectionString); balInventory = new BloodInventoryBAL(connectionString); balHospital = new HospitalBAL(connectionString); balTransaction = new TransactionBAL(connectionString); }
public void Attach(BloodBankBAL balBank) { this.balBank = balBank; }