Exemplo n.º 1
0
        public static string CheckUploadDocumentID(string fileName)
        {
            string id;

            WhiteBears.DatabaseHelper dh = new WhiteBears.DatabaseHelper();
            DataRow[] a = dh.RunSelectQuery($"SELECT DocumentId FROM Document WHERE FileName = '{fileName}'");
            return(a[0][0].ToString());
        }
Exemplo n.º 2
0
 public static int CheckDocumentVersionDB(string fileName)
 {
     WhiteBears.DatabaseHelper dh = new WhiteBears.DatabaseHelper();
     DataRow[] a = dh.RunSelectQuery($"SELECT MAX(version) FROM DocumentVersion JOIN Document ON Document.DocumentID = DocumentVersion.DocumentID  WHERE FileName ='{fileName}'");
     try
     {
         return(Convert.ToInt32(a[0][0]));
     }
     catch
     {
         return(0);
     }
 }