public bool CreateSchedule(BE_Schedule bE_Schedule) { _database = new MySQLDatabase(connectionString); bool bOk = true; BL_Invoice blInvoice = new BL_Invoice(); blInvoice.connectionString = connectionString; //blInvoice._database = _database; VE_Invoice invoice = blInvoice.CreateInvoiceGeneral(bE_Schedule.Invoice); bOk = (invoice != null); if (exist(bE_Schedule)) { bOk = bOk && new DA_Schedule(_database).UpdateSchedule(bE_Schedule); } else { bOk = bOk && new DA_Schedule(_database).CreateSchedule(bE_Schedule); } return(bOk); }