/// <summary> /// 新增 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool add(Stock model) { var sql = string.Format("insert into dbo.a_Stock values({0},'{1}',{2},{3},{4},{5})", model.GoodsId, model.AddTime.ToString(), model.EmpId, model.WareId, model.Price, model.Num); using (BaseContext db = new BaseContext()) { var querylist = db.Database.ExecuteSqlCommand(sql); if (querylist > 0) { return true; } else { return false; } } }
/// <summary> /// 修改 /// </summary> /// <param name="model"></param> public static void edit(Stock model) { EditEntry<Stock>(model, "AddTime"); }