Ejemplo n.º 1
0
 /// <summary>
 /// Gets the formatted sysdate.
 /// </summary>
 /// <param name="format">The format.</param>
 /// <returns></returns>
 static public string GetFormattedSysdate(string format)
 {
     try
     {
         var sysdateSet = new ActiveRecordSet {
             Query = "Select TO_CHAR(sysdate,'" + format + "') as CurrentDate FROM dual"
         };
         if (sysdateSet.Execute() && sysdateSet.MoveNext())
         {
             return(sysdateSet["CurrentDate"].ToString());
         }
     }
     catch (Exception ex)
     {
         LogError(ex.Message, "GetFormattedSysdate");
     }
     return(string.Empty);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the sysdate as string.
 /// </summary>
 /// <param name="instance">The instance.</param>
 /// <returns></returns>
 static public string GetSysdateAsString(string instance)
 {
     try
     {
         var sysdateSet = new ActiveRecordSet(instance)
         {
             Query = "Select SYSDATE from dual"
         };
         if (sysdateSet.Execute() && sysdateSet.MoveNext())
         {
             return(sysdateSet["SYSDATE"].ToString());
         }
     }
     catch (Exception ex)
     {
         LogError(ex.Message, "GetSysdateAsString");
     }
     return(string.Empty);
 }
Ejemplo n.º 3
0
 public static string GetCallClaimIdFromCallId(string callId, string instance)
 {
     try
     {
         var records = new ActiveRecordSet
         {
             Instance = instance,
             Query    = string.Format("select call_claim_id from call_claim where call_id = {0}", callId)
         };
         if (records.Execute() && records.MoveNext())
         {
             return(records[0].ToString());
         }
     }
     catch (Exception ex)
     {
         GeneralUtility.LogError(ex.Message, "GetCallClaimIdFromCallId");
     }
     return(string.Empty);
 }