Beispiel #1
0
 public void FromStateStruct(StateStruct stateStruct)
 {
     Active = stateStruct.Active;
     Machine = new Machine();
     Machine.Guid = stateStruct.Guid;
     RegisteredDate = stateStruct.RegisteredDate;
     Name = stateStruct.Name;
 }
Beispiel #2
0
 public StateStruct ToStateStruct()
 {
     StateStruct retStruct = new StateStruct();
     retStruct.Active = Active;
     retStruct.Guid = Guid;
     retStruct.Machine = Machine.Guid;
     retStruct.RegisteredDate = RegisteredDate;
     retStruct.Name = Name;
     retStruct.XmlInfo = GetInformationXML();
     return retStruct;
 }
 public bool UpdateState(string stateGuid, string xmlInfo, string machine)
 {
     DBState dbState = new DBState(dataProvider);
     dbState.Connection = connection;
     StateStruct state = new StateStruct();
     state.Guid = stateGuid;
     state.XmlInfo = xmlInfo;
     state.Machine = machine;
     return dbState.Save(state);
 }