Example #1
0
        public async Task AddDocSearchResult(Doc_Search d)
        {
            UseCaseBase addDoc = new AddSearchResultUseCase(d);

            addDoc.SetCallBack(this);
            await addDoc.Execute();
        }
Example #2
0
        public async Task AddDocSearch(Doc_Search d, IDoc_SearchCallback callback)
        {
            if (DBHandler.db == null)
            {
                DBHandler.DBConnection();
            }
            try
            {
                int x = await DBHandler.db.InsertAsync(d);

                if (x > 0)
                {
                    callback.Doc_SearchInsertSuccess(x);
                }
                else
                {
                    callback.Doc_SearchInsertFail();
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("Doc_Search insert DAO fail");
            }
        }
 public AddSearchResultUseCase(Doc_Search d)
 {
     this.doc = d;
 }