示例#1
0
        internal static String Save(DB.ITM_BOM_RecipeLine entry, DataContext dataContext)
        {
            try
            {
                if (dataContext.EntityInventoryContext.GetEntityState(entry) == System.Data.Entity.EntityState.Detached)
                {
                    dataContext.EntityInventoryContext.ITM_BOM_RecipeLine.Add(entry);
                }
            }
            catch (System.Data.Entity.Validation.DbEntityValidationException ex)
            {
                return(dataContext.PackageValidationException());
            }

            return("Success");
        }
示例#2
0
 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());
 }
示例#3
0
 public static void Delete(DB.ITM_BOM_RecipeLine entry, DataContext dataContext)
 {
     dataContext.EntityInventoryContext.ITM_BOM_RecipeLine.Remove(entry);
 }