// check if a Folder name exists // daniela, january 15th, 2007 // public bool AddNewFolder(Guid ownerId, string folderName, ref Guid folderId) public static bool CustomFolderExists(string folderName, string folderId, string userId) { bool returnValue = false; SqlCommand sqlAdd = DBHelper.GetDBCommand("Mail_CustomFolderExists", CommandType.StoredProcedure); DBHelper.AddINParamToSqlCommand(ref sqlAdd, "@UserId", SqlDbType.VarChar, userId); DBHelper.AddINParamToSqlCommand(ref sqlAdd, "@FolderId", SqlDbType.VarChar, folderId); DBHelper.AddINParamToSqlCommand(ref sqlAdd, "@FolderName", SqlDbType.NVarChar, folderName); DBHelper.AddOUTParamToSqlCommand(ref sqlAdd, "@Exist", SqlDbType.Bit); DBHelper.AddRVParamToSqlCommand(ref sqlAdd); DBHelper.ExecuteNonQuery(ref sqlAdd); returnValue = (Boolean)sqlAdd.Parameters["@Exist"].Value; sqlAdd = null; return returnValue; }