public void SelectParentItem(object obj) { int id = (int)obj; Productions del = ProductionsList.First(d => d.ProductionId == id); int index = ProductionsList.IndexOf(del); SelectedProductionId = index; }
public void AddNewItem() { var objectToAdd = NewProductions; InputValidator.CheckIfInputsAreValid(ref objectToAdd); //Autofills if (ModelGenerics.CreateByObject(objectToAdd)) { Initialize(); NewProductions = new Productions { ProcessOrderNo = ProductionsList.Last().ProcessOrderNo }; } else { //error } }