Example #1
0
 public int GetRelateCaseID()
 {
     if (s_RelatedObjectType == "Case")
     {
         return(n_RelatedObjectID);
     }
     else
     {
         var result = TheUow.ExecuteScalar(string.Format("SELECT TOP 1 n_CaseID FROM T_FileInCase WHERE s_IsMainCase = 'Y' AND n_FileID = {0}", n_RelatedObjectID));
         if (result != null)
         {
             return(Convert.ToInt32(result));
         }
     }
     return(-1);
 }