示例#1
0
        public int insertWeeklyCurrentAffairData(string WeekId, string WeekTitle, string WeekDate, string WeekFile)
        {
            try
            {
                Weekly_Current_Affair_Model tbl = new Weekly_Current_Affair_Model();
                tbl.content_id    = WeekId;
                tbl.content_title = WeekTitle;
                tbl.content_date  = WeekDate;
                tbl.content_file  = WeekFile;

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

            catch (Exception ex)
            { return(0); }
        }
        private void MAdapter_ItemClick(object sender, int e)
        {
            Weekly_Current_Affair_Model objmodel5 = weeklyList[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("pdfurlweeklyaffair", objmodel5.content_file);
                //WeeklyCurrentAffair_PDFReader objreader7 = new WeeklyCurrentAffair_PDFReader();
                //objreader7.Arguments = bundle8;
                //Activity.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, objreader7).AddToBackStack(null).Commit();
            }
        }