internal static String Save(DB.ITM_BOM_RecipeLine entry, DataContext dataContext)
        {
            try
            {
                if (dataContext.EntityInventoryContext.GetEntityState(entry) == EntityState.Detached)
                {
                    dataContext.EntityInventoryContext.ITM_BOM_RecipeLine.Add(entry);
                }

                Validation.ValidateEntity(dataContext.EntityInventoryContext, entry);
            }
            catch (Validation.EntityValidationException ex)
            {
                return(dataContext.PackageValidationException());
            }

            return("Success");
        }
 public static DB.ITM_BOM_RecipeLine GetPreviousItem(DB.ITM_BOM_RecipeLine ITM_BOM_RecipeLine, DataContext dataContext)
 {
     return(dataContext.EntityInventoryContext.ITM_BOM_RecipeLine.OrderByDescending(o => o.Id).Where(n => n.Id == ITM_BOM_RecipeLine.Id && n.Id < ITM_BOM_RecipeLine.Id && n.RecipeId == ITM_BOM_RecipeLine.RecipeId).FirstOrDefault());
 }
 public static void Delete(DB.ITM_BOM_RecipeLine entry, DataContext dataContext)
 {
     dataContext.EntityInventoryContext.ITM_BOM_RecipeLine.Remove(entry);
 }