示例#1
0
 public HouseViewModel(House model, int labelForValue)
 {
     Id = model.Id;
     Street = model.Street;
     Number = model.Number;
     LabelForValue = labelForValue;
 }
示例#2
0
 public string CreateMessage(InputData data, SensorDry sensor, House house)
 {
     StringBuilder body = new StringBuilder();
     body.Append(house.Street);
     body.Append(house.Number);
     body.Append(sensor.Premises1.Name);
     body.Append(sensor.Door1.Name);
     body.Append(sensor.SensorDryType.Name);
     body.Append("изменил свое состояние на");
     if (data.Data == 1)
         body.Append(sensor.SensorDryType.SensorDryValueType.Value1);
     else
         body.Append(sensor.SensorDryType.SensorDryValueType.Value0);
     return body.ToString();
 }