示例#1
0
 public int ReceivePreliminaryLoadProfileShares(electricityProfile msgProfile)
 {
     Trace.WriteLine("ReceivePreliminaryLoadProfileShares");
     int result = 0;
     try
     {
         DataManager dataMan = new DataManager();
         dataMan.SaveProfile(msgProfile);
         result = 1;
     }
     catch (Exception rcpExc)
     {
         Trace.WriteLine("Error in RPLPS: " + rcpExc.Message);
         result = 0;
     }
     return result;
 }
示例#2
0
 public int ReceiveConsumptionProfile(electricityProfile profile)
 {
     Trace.WriteLine("ReceiveConsumptionProfile");
     int result = 0;
     try
     {
         DataManager dataMan = new DataManager();
         dataMan.SaveProfile(profile);
         result = 1;
     }
     catch (Exception rcpExc)
     {
         Trace.WriteLine("Error in RCP: " + rcpExc.Message);
         result = 0;
     }
     return result;
 }