Example #1
0
        public int insertExamAlertData(string AlertId, string AlertTitle, string AlertDate, string AlertFile)
        {
            try
            {
                ExamAlert_Model tbl = new ExamAlert_Model();
                tbl.content_id    = AlertId;
                tbl.content_title = AlertTitle;
                tbl.content_date  = AlertDate;
                tbl.content_file  = AlertFile;

                int i = db.Insert(tbl);
                return(i);
            }

            catch (Exception ex)
            { return(0); }
        }
        private void MAdapter_ItemClick(object sender, int e)
        {
            ExamAlert_Model objmodel5 = alertList[e];

            if (objmodel5.content_file == null || objmodel5.content_file == "")

            {
                Toast.MakeText(Activity, " Sorry...PDF is not available", ToastLength.Long).Show();
            }
            else
            {
                var uri    = Android.Net.Uri.Parse(objmodel5.content_file);
                var intent = new Intent(Intent.ActionView, uri);
                StartActivity(intent);

                //int counter = e;
                //Bundle bundle8 = new Bundle();
                //bundle8.PutString("pdfurl", objmodel5.content_file);
                //Global_PDF_Reader objreader7 = new Global_PDF_Reader();
                //objreader7.Arguments = bundle8;
                //Activity.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, objreader7).AddToBackStack(null).Commit();
            }
        }