fix clone oggetti
This commit is contained in:
@@ -101,6 +101,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
DoorModel answ = new DoorModel()
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
TypeId = TypeId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
@@ -108,6 +109,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
DateMod = adesso,
|
||||
UserIdMod = userId,
|
||||
DoorDescript = DoorDescript,
|
||||
Quantity = Quantity,
|
||||
UnitCost = UnitCost,
|
||||
DateLockExpiry = DateLockExpiry,
|
||||
UserIdLock = UserIdLock
|
||||
|
||||
@@ -158,25 +158,45 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public DoorOpModel ObjClone(string userId)
|
||||
public DoorOpModel ObjClone(string userId, int doorId)
|
||||
{
|
||||
DoorOpModel answ = new DoorOpModel();
|
||||
DateTime adesso = DateTime.Now;
|
||||
DoorOpModel answ = new DoorOpModel()
|
||||
if (doorId == 0)
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = DoorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
JsoncActVal = JsoncActVal,
|
||||
userConfirm = userConfirm,
|
||||
DtConfirm = DtConfirm
|
||||
};
|
||||
answ = new DoorOpModel()
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = DoorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
JsoncActVal = JsoncActVal,
|
||||
userConfirm = userConfirm,
|
||||
DtConfirm = DtConfirm
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = new DoorOpModel()
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = doorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
JsoncActVal = JsoncActVal,
|
||||
userConfirm = userConfirm,
|
||||
DtConfirm = DtConfirm
|
||||
};
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user