public void move_Click(object sender, RoutedEventArgs e) { ((Button)sender).Background = new SolidColorBrush(Color.FromRgb(150, 20, 20)); int id = ((PresantationTask)((Button)sender).DataContext).ID; InterfaceLayer.MoveToNext(id); ((Button)sender).Content = this.ID; }
public void move_Click(object sender, RoutedEventArgs e) { //InitializeComponent(); Button button = (Button)sender; PresantationTask task = (PresantationTask)button.DataContext; try { InterfaceLayer.MoveToNext(task.ID); errors.error = ""; refresh(); } catch (AlmogException exi) { errors.error = (String)exi.Value; } }
public void TestMoveColumn() { try { InterfaceLayer.MoveToNext(Saved_Task.getID()); List <int> list = TaskDAL.GetTaskByColumn(2); if (!list.Contains(Saved_Task.getID())) { Assert.Fail("didn't move the task to the correct column"); } } catch (MileStone4.AlmogException ex) { Assert.Fail((String)ex.Value, new object[] { ex }); } catch (Exception e) { Assert.Fail(e.Message, new object[] { e }); } }