//TODO: If possible move it some place else or modify the implementation /// <summary> /// Needs to be implemented better /// </summary> /// <param name="modeID">The mode ID.</param> /// <param name="itemID">The Item's ID</param> /// <param name="unitID">The Unit's ID</param> /// <returns></returns> public static int GetActivityUsingFEFO(int modeID, int itemID, int unitID) { var activity = new Activity(); activity.LoadFromRawSql(HCMIS.Repository.Queries.Activity.SelectFirstActivityUsingFEFO(itemID, unitID)); if (activity.RowCount == 0) //If there is no stock, then just return the first activity { activity.LoadFirstActivityByMode(modeID); } return(activity.ID); /* * TODO: This Should not be implemented this way we are suppose to load All activity Sorted by FEFO * we need to change this as soon as possible i believe we can speed up approval page by removing really unnecessary trip * to the Database */ }
//TODO: If possible move it some place else or modify the implementation /// <summary> /// Needs to be implemented better /// </summary> /// <param name="modeID">The mode ID.</param> /// <param name="itemID">The Item's ID</param> /// <param name="unitID">The Unit's ID</param> /// <returns></returns> public static int GetActivityUsingFEFO(int modeID,int itemID, int unitID) { var activity = new Activity(); activity.LoadFromRawSql(HCMIS.Repository.Queries.Activity.SelectFirstActivityUsingFEFO(itemID, unitID)); if (activity.RowCount == 0) //If there is no stock, then just return the first activity { activity.LoadFirstActivityByMode(modeID); } return activity.ID; /* * TODO: This Should not be implemented this way we are suppose to load All activity Sorted by FEFO * we need to change this as soon as possible i believe we can speed up approval page by removing really unnecessary trip * to the Database */ }