public CashBox Create(int customerId, AssetTypeModel.EnterMode enterMode, int cashBoxID) { // Create new cashbox int areaId = (int)AssetAreaId.Cashbox; CashBox cashbox = new CashBox() { //CashBoxID = NextCashBoxId(customerId), // CashBoxID = cashBoxID, CustomerID = customerId, CashBoxName = "", CashBoxSeq = cashBoxID, CashBoxState = (int)AssetStateType.Pending, CashBoxType = (int)MeterGroups.Cashbox, OperationalStatus = (int)OperationalStatusType.Inactive, OperationalStatusTime = DateTime.Now, CashBoxLocationTypeId = (int)Duncan.PEMS.Entities.Enumerations.CashBoxLocationType.Inventory }; PemsEntities.CashBoxes.Add(cashbox); PemsEntities.SaveChanges(); // Create audit record. Audit(cashbox); return(cashbox); }
public DataKey Create(int customerId, AssetTypeModel.EnterMode enterMode, int dataKeyId) { // Create a new Meters entry. Meter newMeter = CreateBaseAsset(enterMode, dataKeyId, customerId, MeterGroups.Datakey); return(CreateDataKey(customerId, newMeter)); }