public void SelectParentItem(object obj) { int id = (int)obj; ControlSchedules del = ControlSchedulesList.First(d => d.ControlScheduleId == id); int index = ControlSchedulesList.IndexOf(del); SelectedControlScheduleId = index; }
public void AddNewItem() { var objectToAdd = NewControlSchedules; InputValidator.CheckIfInputsAreValid(ref objectToAdd); if (ModelGenerics.CreateByObject(objectToAdd)) { Initialize(); NewControlSchedules = new ControlSchedules { ProcessOrderNo = ControlSchedulesList.Last().ProcessOrderNo }; } else { //error } }