Beispiel #1
0
 private CSCloudCommandRecord ModelToCommandRecord(Command c)
 {
     return new CSCloudCommandRecord
     {
         ClientName = c.Client.Name,
         Code = (CSCloud.Enums.CSCloudCommandCode)Enum.Parse(typeof(CSCloud.Enums.CSCloudCommandCode), c.Code, true),
         Date = c.Date,
         Result = (CSCloud.Enums.CSCloudResult)Enum.Parse(typeof(CSCloud.Enums.CSCloudResult), c.Result, true),
     };
 }
Beispiel #2
0
        private Command CommandToModel(string clientName, CSCloudCommand command, CSCloudResult result)
        {
            var c = new CSCloud.DAL.Command();
            c.Date = DateTime.UtcNow;
            c.Client = new Client { Name = clientName };
            c.Code = command.Code.ToString();
            c.Result = result.ToString();

            return c;
        }