public GoodsViewModel() { _mainDataContext = new DataContext(); _mainDataContext.Goods.Load(); GoodsItemList = _mainDataContext.Goods.Local.ToBindingList(); AddGoodsCommad = new DelegetCommand(AddGoodsCommandEv); DeleteGoodsCommand = new DelegetCommand(DeleteGoodsCommandEv, IsGoodsCommands); EdutGoodsCommand = new DelegetCommand(EditGoodsCommandEv, IsGoodsCommands); AdditionViewGoodsCommand = new DelegetCommand(AdditionViewGoodsCommandEv, IsGoodsCommands); }
public MainViewModel() { GoodsPage = new Goods(); StateStoragePage = new StateStorage(); StateRobotPage = new StateRobot(); DocumentPage = new Document(); StateBoxPage = new StateBox(); SelectPage = new DelegetCommand(SelCom); CurrentPage = GoodsPage; }
public AddGoodsViewModel(DataContext data) { NewGoods = new Goods(); ListSeassons = new List <string>() { "winter", "spring", "summer", "autumn", "none" }; DataContextInfo = data; _csvFile = new CsvInterfase(); LoadFileCommand = new DelegetCommand(LoadFile); CloseWindowCommand = new DelegetCommand(CloseWindow); EntryGoodsCommand = new DelegetCommand(AddGoods); }
public EditeGoodsViewModel(Goods NowGoods, DataContext data) { ListSeassons = new List <string>() { "winter", "spring", "summer", "autumn", "none" }; SelectSeassons = NowGoods.Seassons; NewGoods = NowGoods; ImgSourse = NewGoods.Img; DataContextInfo = data; _csvFile = new CsvInterfase(); LoadFileCommand = new DelegetCommand(LoadFile); CloseWindowCommand = new DelegetCommand(CloseWindow); EntryGoodsCommand = new DelegetCommand(EditGoods); }
public AdditionViewModel(Goods ParamGoods) { SelectGoods = ParamGoods; CloseWindow = new DelegetCommand(Closeu, (obj) => false); }