public MarketPagePersonalViewModel() { LoadProducts(); reportsLogic = ReportsLogic.GetInstance(); CountSmall = reportsLogic.GetCountProducts(); Condition = "Visible"; Position = StaffsLogic.GetPosition(); FirstName = StaffsLogic.GetName(); LastName = StaffsLogic.GetSurname(); IsView = false; ViewProduct = new RelayCommand <int>(Data); DeleteProduct = new RelayCommand <int>(Delete); NameText = "Изменить"; IsReadonlyName = true; PriceText = "Изменить"; IsReadonlyPrice = true; CountText = "Изменить"; IsReadonlyCount = true; WeightText = "Изменить"; IsReadonlyWeight = true; ColorText = "Изменить"; IsReadonlyColor = true; DescriptionText = "Изменить"; IsReadonlyDescription = true; saveId = -1; }
public MarketPageDirectorViewModel(StaffsLogic staffsLogic) { this.staffsLogic = staffsLogic; Staffs = new ObservableCollection <Staff>(StaffsLogic.GetList()); Condition = "Visible"; Position = StaffsLogic.GetPosition(); FirstName = StaffsLogic.GetName(); LastName = StaffsLogic.GetSurname(); UpdateStaff = new RelayCommand <int>(Update); DeleteStaff = new RelayCommand <int>(Delete); }
public MarketPageAdminViewModel(StaffsLogic staffsLogic) { this.staffsLogic = new StaffsLogic(); Staffs = new ObservableCollection <Staff>(StaffsLogic.GetList()); Condition = "Visible"; Position = StaffsLogic.GetPosition(); FirstName = StaffsLogic.GetName(); LastName = StaffsLogic.GetSurname(); RewriteLogin = new RelayCommand <int>(UpdateLogin); RewritePassword = new RelayCommand <int>(UpdatePassword); RewriteRights = new RelayCommand <int>(UpdateRights); }
public EditStaffViewModel(StaffsLogic staffsLogic, int id) { this.staffsLogic = staffsLogic; this.id = id; Condition = "Visible"; Positions = new List <string> { "Директор", "Персонал интернет-магазина", "Администратор интернет-магазина" }; Name = StaffsLogic.GetName(id); Surname = StaffsLogic.GetSurname(id); Position = StaffsLogic.GetPosition(id); startName = Name; startSurname = Surname; startPosition = Position; }