public static bool AddDefault(ParkBox model) { if (model == null) { throw new ArgumentNullException("model"); } IParkBox factory = ParkBoxFactory.GetFactory(); bool result = factory.Add(model); if (result) { OperateLogServices.AddOperateLog <ParkBox>(model, OperateType.Add); } return(result); }
public static bool Add(ParkBox model) { if (model == null) { throw new ArgumentNullException("model"); } model.BoxID = GuidGenerator.GetGuid().ToString(); IParkBox factory = ParkBoxFactory.GetFactory(); bool result = factory.Add(model); if (result) { OperateLogServices.AddOperateLog <ParkBox>(model, OperateType.Add); } return(result); }