private void MAdapter_ItemClick(object sender, int e) { Vocabulary_Model objmodelvoc = vocabularyList[e]; if (objmodelvoc.content_file == null || objmodelvoc.content_file == "") { Toast.MakeText(Activity, " Sorry...PDF is not available", ToastLength.Long).Show(); } else { var uri = Android.Net.Uri.Parse(objmodelvoc.content_file); var intent = new Intent(Intent.ActionView, uri); StartActivity(intent); //int counter = e; //Bundle bundle_voc = new Bundle(); //bundle_voc.PutString("pdfurlvocabulary", objmodelvoc.content_file); //Vocabulary_PDFReader objreader_voc = new Vocabulary_PDFReader(); //objreader_voc.Arguments = bundle_voc; //Activity.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, objreader_voc).AddToBackStack(null).Commit(); } }
public int insertVocabularyData(string VocId, string VocTitle, string VocDate, string VocFile) { try { Vocabulary_Model tbl = new Vocabulary_Model(); tbl.content_id = VocId; tbl.content_title = VocTitle; tbl.content_date = VocDate; tbl.content_file = VocFile; int i = db.Insert(tbl); return(i); } catch (Exception ex) { return(0); } }