Example #1
0
 public string[] GetDeviceProfileList(string UserId)
 {
     string[] UseList = null;
     try
     {
         AppLog.WriteErrorLog("Function (GET) : DeviceProfile/GetDeviceProfileList");
         if (UserId != "-2")
         {
             UseList = QueryBuilder.GetArrayList("CONCAT(DeviceMastreId,'-',DeviceName, '-', DeviceNo,'-',DeviceDateTime,'-',UserId) AS FullName",
                                                 "gdt_deviceprofile AS gdtdp Inner Join  gdt_device AS gdtd ON gdtd.DeviceMastreId = gdtdp .DeviceId",
                                                 " Where UserId = '" + UserId + "'");
         }
         else
         {
             UseList = QueryBuilder.GetArrayList("CONCAT(DeviceMastreId,'-',DeviceName, '-', DeviceNo,'-',DeviceDateTime,'-',UserId) AS FullName",
                                                 "gdt_deviceprofile AS gdtdp Inner Join  gdt_device AS gdtd ON gdtd.DeviceMastreId = gdtdp .DeviceId",
                                                 " group by DeviceMastreId ");
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
     finally
     {
     }
     return(UseList);
 }
Example #2
0
 public string[] GetDeviceScheduleList(string DeviceId)
 {
     string[] UseList = null;
     try
     {
         AppLog.WriteErrorLog("Function : DeviceProfile/GetDeviceScheduleList");
         UseList = QueryBuilder.GetArrayList("CONCAT(Intervall,'-',RPhase,'-', YPhase,'-',BPhase,'-',SunriseSunset,'-',ScheduleType) AS FullName",
                                             "gdt_deviceschedule",
                                             " Where (DeviceId = '" + DeviceId + "') AND (IsActive = 1)");
     }
     catch (Exception ex)
     {
         return(null);
     }
     finally
     {
     }
     return(UseList);
 }