/// <summary> /// private constructor - for singleton /// </summary> private BL_imp() { myDal = DAL.FactoryDAL.getDAL; nextRoomNumber = Rooms.Count > 0 ? (from item in Rooms select item.RoomID).Max() + 1 : 1; nextAgencyNumber = Agencies.Count > 0 ? (from item in Agencies select item.AgencyID).Max() + 1 : 1; nextReservationNumber = Reservations.Count > 0 ? (from item in Reservations select item.ReservationID).Max() + 1 : 1; }
/// <summary> /// constructor /// </summary> public BL_SOAP_imp() { myDal = DAL.FactoryDAL.getDAL; nextRoomNumber = Rooms().Count > 0 ? (from item in Rooms() select item.RoomID).Max() + 1 : 1; nextAgencyNumber = Agencies().Count > 0 ? (from item in Agencies() select item.AgencyID).Max() + 1 : 1; nextReservationNumber = Reservations().Count > 0 ? (from item in Reservations() select item.ReservationID).Max() + 1 : 1; }
//protected DalFactory() { instance = null; } public static DAL.Idal getDal() { if (null == instance) { instance = new Dal_imp(); } return(instance); }
public Bl_imp() { dal = DAL.factoryDal.getDal(); initilizeArray(); NannyInitilize(); MotherInitilize(); ChildInitilize(); }
public static Idal getDal() { if (instance == null) { //instance = new Dal_imp(); instance = new Dal_XML_imp(); } return(instance); }
//CTOR creating factory public xmlInitilizer() { dal = DAL.factoryDal.getDal(); //initilizeArray(); //NannyInitilize(); //MotherInitilize(); //ChildInitilize(); //var mother = dal.getAllMothers(); //var nanny = dal.getAllNanny(); //var child = dal.getKids(); //SaveToXML(mother, "mother.xml"); //SaveToXML(nanny, "nanny.xml"); //SaveToXML(child, "child.xml"); }
//ctor public BL_imp() { dal = DAL.FactoryDal.getDal(); }
public Bl_imp() { dal = DAL.FactoryDal.GetDAL(); }
/// <summary> /// dal assigning /// </summary> public void Cass_BlAdapter() { dal = DAL.DalFactory.getReference(); }
public Bl_imp() { DAL.FactoryDal factory = new DAL.FactoryDal(); dal = factory.getDal(); }
DAL.Idal dal; //אובייקט מסוג מאגר נתונים public IBL_imp() //ctor { dal = DAL.SingeltonDAL.getInstance(); //יצירת מופע של דאל עבור שכבת בי_ל בשיטת הסינגלטון }
public Bl_base() { dal = DAL.FactoryDal.GetDal(); }
public All() { dimp = DAL.Factory.GetDal(); }
public Bl_imp() { dal = DAL.FactoryDal.getDal(); //enterData(); }
public IBLbasiccs() { dal = DAL.FactoryDal.getDal(); initializing(); }
public MyBl() { dal = DAL.FactoryDal.getDal(); // start(); }
static void Main(string[] args) { try { //BE.Contract c = (new BE.Contract { EmployerId = "123", EmployeeId = "203167416", IsInterview = true, IsSign = false, HourSalaryG = 100.0, DateBegingEmployin = new DateTime(2003, 04, 01), DateEndEmploying = new DateTime(2015, 04, 01), HoursNum = 180 }); //BE.Employee ee = (new BE.Employee { FirstName = "Riki", LastName = "Breuer", Id = "203167416", DateBirth = new DateTime(1992, 06, 02), PhoneNum = "054-8489320", Address = "59 Hakablan", degreeType = Degree.CertificateOnly, GraduateArmy = false, MyAccount = new BankAccount() }); //BE.Employer er = (new BE.Employer { Address = "9 Hadfus", CompanyName = "", DateEstablishment = new DateTime(2001, 05, 12), Field = "Access", FirstName = "Avi", Id = "123", IsCompany = false, LastName = "Ron", PhoneNum = "052-7145620" }); //BE.Specialization s = (new BE.Specialization { TariffMax = 100, TariffMin = 50, ExpertiseName = "cpp", Filed = FieldName.programmingLanguages }); //#region DAL Func. DAL.Idal dal = DAL.FactoryDal.GetDal(); // dal.AddContract(c); // dal.AddEmployee(ee); // dal.AddEmployer(er); // dal.AddSpecialization(s); // //dal.RemoveContract(c.ContractNum); // //dal.RemoveEmployee(ee.Id); // //dal.RemoveEmployer(er.Id); // //dal.RemoveSpecialization(s.SpecialNum); // c.HoursNum = 80; // dal.UpdateContract(c); // ee.LastName = "Waisboam"; // dal.UpdateEmployee(ee); // er.PhoneNum = "054-8496075"; // dal.UpdateEmployer(er); // s.TariffMax = 99; // dal.UpdateSpecialization(s); // foreach (var v in dal.GetAllContract()) // Console.WriteLine(v); // foreach (var v in dal.GetAllEmployee()) // Console.WriteLine(v); // foreach (var v in dal.GetAllEmployer()) // Console.WriteLine(v); // foreach (var v in dal.GetAllSpecialization()) // Console.WriteLine(v); // #endregion BL.IBL bl = BL.FactoryBL.GetBL(); //foreach (var v in bl.GetAllContract()) //{ Console.WriteLine(v.HourSalaryG); //Console.WriteLine(v.HourSalaryN); //} // bl.present(); //bl.bonus(); //foreach (var item in bl.IsArmy()) //{ // Console.WriteLine(item); //} //bl.invalidContract(); //foreach (var v in bl.GetAllContract()) // Console.WriteLine(v); //foreach (var v in bl.GetAllEmployee()) // Console.WriteLine(v); //foreach (var v in bl.GetAllEmployer()) // Console.WriteLine(v); //foreach (var v in bl.GetAllSpecialization()) // Console.WriteLine(v); //bl.RemoveContract(10000000); //Func<Employee,bool> predicate = item => //{ // return item.GraduateArmy == true; //} } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public BL_imp() { my_dal = DAL.FactoryDall.GetDal(); //init(); }
public Bl_list() { dal = DAL.FactoryDal.GetDal(); }