/// <summary> /// Empty data context is used when the from is loaded without ID (the from is in "insert mode") /// </summary> /// <param name="error"></param> /// <returns></returns> public TagEmployeeDataContext GetEmptyDataContext(out string error) { TagEmployeeDataContext dataContext = new TagEmployeeDataContext(); error = null; dataContext.modelNotifiedForTagEmployeeMain = new ModelNotifiedForTagEmployee(); return(dataContext); }
public TagEmployeeDataContext GetDataContext(int TagEmployeeID, out string error) { TagEmployeeDataContext dataContext = new TagEmployeeDataContext(); error = null; dataContext.modelNotifiedForTagEmployeeMain = GetTagEmployeeByID(TagEmployeeID, out error); dataContext.modelNotifiedForEmployees = GetAll_Employees(out error); dataContext.modelNotifiedForTag = GetAll_Tag(out error); dataContext.PopulateComboBoxesItemSource(); return(dataContext); }