private long RegisterDoc(long registerId, string documentname) { long documentid = 0; using (Database db = new MySqlDatabase()) { string documenthash = Convert.ToBase64String(CertificateManager.CalculateHash(documentname)); documentid = db.RegisterDocument(registerId, documentname, documenthash); } return documentid; }
private long RegisterDoc(long registerid, string documentname) { long documentid = 0; using (Database db = new MySqlDatabase()) { string documenthash = Convert.ToBase64String(CertificateManager.CalculateHash(documentname)); string[] strArray = documentname.Split('/'); string path = "/" + strArray[strArray.Length - 1]; documentid = db.RegisterDocument(registerid, path, documenthash); } return documentid; }