public ObservableCollection <ItemDafa3> CreateItem() { return(new ObservableCollection <ItemDafa3>(part.part.card_dafa3.Select(c => new ItemDafa3(c) { action = (t) => { newcost -= t; this.inTilData(Ico.getValue <db>().GetUnivdb().parts.ToList().Where(p => p.Id == part.part.Id).ToList().SingleOrDefault()); }, action_edit = (t) => { Sample4Content = new Editdafa3(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(Ico.getValue <db>().GetUnivdb().parts.ToList().Where(p => p.Id == part.part.Id).ToList().SingleOrDefault()); }, addtswiya = (t) => { Sample4Content = new Addtswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(Ico.getValue <db>().GetUnivdb().parts.ToList().Where(p => p.Id == part.part.Id).ToList().SingleOrDefault()); }, edittswiyaaction = (t) => { Sample4Content = new Edittswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } }))); }
public ObservableCollection <ItemDafa3> CreateItem() { return(new ObservableCollection <ItemDafa3>(part.part.card_dafa3.Select(c => new ItemDafa3(c) { action = (t) => { newcost -= t; this.inTilData(); }, action_edit = (t) => { Sample4Content = new Editdafa3(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(); }, addtswiya = (t) => { Sample4Content = new Addtswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(); }, edittswiyaaction = (t) => { Sample4Content = new Edittswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } }))); }
public ObservableCollection <ItemDafa3> CreateItem() { return(new ObservableCollection <ItemDafa3>(part.part.card_dafa3.Select(ct => new ItemDafa3(ct) { Viewdafa3VewModel = this, end = CancelSample4Dialog, action = (t) => { OpenSample4Dialog(); Sample4Content = new YesOrNo("هل أنت متأكد من قيامك بحذف هذه الحصة من العملية ,لا يمكن التراجع عن الحذف", async() => { AcceptSample4Dialog(); await Task.Run(() => { Ico.getValue <db>().GetUnivdb().parts.ToList().Where(c => c.Id == ct.id_part).ToList().SingleOrDefault().nowcost -= t; Ico.getValue <db>().GetUnivdb().card_dafa3.Remove(Ico.getValue <db>().GetUnivdb().card_dafa3.ToList().Where(c => c.Id == ct.Id).FirstOrDefault()); Ico.getValue <db>().savedb(); CancelSample4Dialog(); }); }, () => { CancelSample4Dialog(); }); }, action_edit = (t) => { Sample4Content = new Editdafa3(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(); }, addtswiya = (t) => { OpenSample4Dialog(); Sample4Content = new YesOrNo(" إذا أضفت التسوية لن تستطيع التراجع عن البطاقة, الرجاء والتأكد قبل ذالك ", () => { OpenSample4Dialog(); Sample4Content = new Addtswiya(t, AcceptSample4Dialog, CancelSample4Dialog); }, CancelSample4Dialog); }, edittswiyaaction = (t) => { Sample4Content = new Edittswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } }))); }