public List <Workorder> GetWorkorderList(string contractType, string status) { var workorderList = WorkorderAccessor.FetchWorkorder(contractType, status); if (workorderList.Count > 0) { return(workorderList); } else { return(workorderList); } }
public static int AddWorkorder(Workorder wNew) { try { int i = WorkorderAccessor.NewWorkorder(wNew); if (i != 0) { return(i); } else { throw new ApplicationException("Record not updated! An error occured."); //throw new ApplicationException(i.ToString()); } } catch (Exception) { throw; } }