public static ProductPosition GenerateRandomProductPosition(Product prod, Center cent) { Random rand = new Random(); return(new ProductPosition(prod, cent, rand.Next(46))); }
public ObservableCollection <Truck> GetTrucks(Center center) { return(repository.GetTrucks(center)); }
public ProductPosition(Product prod, Center cent, int num) { product = prod; productCenter = cent; NumberOfProduct = num; }
public ObservableCollection <Require> GetDBRequiersTo(Center center) { return(repository.GetDBRequiersTo(center)); }
public ObservableCollection <ProductPosition> GetDBCenterProductsPosition(Center center) { return(repository.GetDBCenterProductsPosition(center)); }
public Trip GetTripForSlots(Center center) { return(repository.GetTripForSlots(center)); }
public Employee(string sorname, string name, string second_name, string role, string password, string phone, Center center) { Sorname = sorname; Name = name; SecondName = second_name; if (role.Equals("Admin") || role.Equals("Employee") || role.Equals("Администратор") || role.Equals("Сотрудник")) { this.role = role; } else { throw new Exception("Неверно указан статус. Допустимые значение: Admin/Employee/Администратор/Сотрудник"); } //Шифрование var md5 = MD5.Create(); byte[] hash = md5.ComputeHash(Encoding.UTF8.GetBytes(password)); string result = ""; foreach (byte bit in hash) { result += bit; } this.password = result; // this.center = center; phoneNumber = phone; }
public void closeTrip(Center center) { CurrentCenter = center; if_busy = false; controller.UpdateTruck(this); }
public void SendInTrip() { CurrentCenter = controller.GetDBCenters().Where(c => c.Id == 17).FirstOrDefault(); SetBusy(); controller.UpdateTruck(this); }
public Truck(string reg, float cnsmpshn, int slots, int load_cap, int volume_cap, bool busy, Center center) { Id = reg; fuel_consumption = cnsmpshn; this.slots = slots; load_capacity = load_cap; volume_capcity = volume_cap; if_busy = busy; CurrentCenter = center; }