public Transaction_Data(List <Backend.Transaction> TDB, List <Backend.Receipt> list) { DB = TDB; receiptDB = list; emartDataContext = new EmartDataContext(); Encryption.encryption(DB, path); }
public Employee_Data(List <Backend.Employee> EDB) { DB = EDB; if (!Contains("admin")) { DB.Add(new Backend.Employee("admin", "admin", "admin", "Man", "0", 0.0, "0", "Admin")); } emartDataContext = new EmartDataContext(); }
public User_Data(List <Backend.User> UDB) { DB = UDB; Backend.User admin = new Backend.User("admin", "admin", "admin"); if (!Contains(admin)) { DB.Add(admin); } sqlDB = new EmartDataContext(); }
public Main() { InitializeComponent(); EmartDataContext emartDataContext = new EmartDataContext(); //data classes of the enities List <DAL.User> userSqlDB = (from s in emartDataContext.Users select s).ToList(); List <Backend.User> userDB = Change.UserDalToBackendList(userSqlDB); User_Data user_data = new User_Data(userDB); List <DAL.Customer> clubMemberSqlDB = (from s in emartDataContext.Customers select s).ToList(); List <Club_Member> clubMemberDB = Change.CustomerDalToBackendList(clubMemberSqlDB); ClubMember_Data clubMember_data = new ClubMember_Data(clubMemberDB); List <DAL.Department> departmentSqlDB = (from s in emartDataContext.Departments select s).ToList(); List <Backend.Department> departmentDB = Change.DepartmentDalToBackendList(departmentSqlDB); Department_Data department_data = new Department_Data(departmentDB); List <DAL.Employee> EmployeeSqlDB = (from s in emartDataContext.Employees select s).ToList(); List <Backend.Employee> EmployeeDB = Change.EmployeeDalToBackendList(EmployeeSqlDB); Employee_Data employee_data = new Employee_Data(EmployeeDB); List <DAL.Product> productSqlDB = (from s in emartDataContext.Products select s).ToList(); List <Backend.Product> productDB = Change.ProductDalToBackendList(productSqlDB); Product_Data product_data = new Product_Data(productDB); List <DAL.Transaction> transactionSqlDB = (from s in emartDataContext.Transactions select s).ToList(); List <Backend.Transaction> transactionDB = Change.TransactionDalToBackendList(transactionSqlDB); List <DAL.Recipt> reciptSqlDB = (from s in emartDataContext.Recipts select s).ToList(); List <Backend.Receipt> reciptDB = Change.ReciptDalToBackendList(reciptSqlDB); Transaction_Data transaction_data = new Transaction_Data(transactionDB, reciptDB); Location_Data location_data = new Location_Data(); // managers DAL_Manager dal_manager = new DAL_Manager(user_data, clubMember_data, department_data, employee_data, product_data, transaction_data, location_data); BL_Manager BL_manager = new BL_Manager(dal_manager); Window mw = new MainWindow(BL_manager); mw.Show(); this.Close(); }
public User_Data() { DB = new List <Backend.User>(); DB.Add(new Backend.User("admin", "admin", "admin")); sqlDB = new EmartDataContext(); }
public Transaction_Data() { DB = new List <Backend.Transaction>(); receiptDB = new List <Backend.Receipt>(); emartDataContext = new EmartDataContext(); }
public Employee_Data() { DB = new List <Backend.Employee>(); DB.Add(new Backend.Employee("admin", "admin", "admin", "Man", "0", 0.0, "0", "Admin")); emartDataContext = new EmartDataContext(); }
public Location_Data() { sqlDB = new EmartDataContext(); }
public ClubMember_Data(List <Club_Member> CMDB) { DB = CMDB; sqlDB = new EmartDataContext(); }
public Location_BL(Location_Data ld) { itsDAL = ld; sqlDB = new EmartDataContext(); }
public ClubMember_Data() { DB = new List <Club_Member>(); sqlDB = new EmartDataContext(); }
public Product_Data(List <Backend.Product> PDB) { DB = PDB; emartDataContext = new EmartDataContext(); }
public Product_Data() { DB = new List <Backend.Product>(); emartDataContext = new EmartDataContext(); }
public Department_Data(List <Backend.Department> DDB) { DB = DDB; emartDataContext = new EmartDataContext(); }
public Department_Data() { DB = new List <Backend.Department>(); DB.Add(new Backend.Department("defult", "0"));//defult department, only in use when removing departmetnt in exsisting object emartDataContext = new EmartDataContext(); }