private void addtolistcompliance() { if (!max_number.Text.Equals("")) { max_numbers = Convert.ToInt32(max_number.Text); } if (compliancetype.Equals("")) { Toast.MakeText(Activity, "Please Select ComplianceType", ToastLength.Short).Show(); return; } if (selecteditem.Equals("")) { Toast.MakeText(Activity, "Please Select FileType", ToastLength.Short).Show(); return; } if (selectedextensions.Equals("")) { Toast.MakeText(Activity, "Please Select File Extension", ToastLength.Short).Show(); return; } if (max_numbers <= 0) { Toast.MakeText(Activity, "Please Enter maximum number", ToastLength.Short).Show(); return; } ComplianceJoinTable addtolistcompliace = new ComplianceJoinTable(); addtolistcompliace.complianceType = compliancetype; addtolistcompliace.file_format = selectedextensions; addtolistcompliace.file_type = selecteditem; addtolistcompliace.max_numbers = max_numbers; CreateTaskFrag.modelsaddcompliance.Add(addtolistcompliace); gridattachmentlist = new GridForAttachmentCreateReference(Activity, CreateTaskFrag.modelsaddcompliance); complianceGridview.Adapter = gridattachmentlist; gridattachmentlist.NotifyDataSetChanged(); //selecteditem = null; //selectedextensions = null; //max_num = null; //compliancetype = null; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // GetPermissionAsync(); isRecording = false; SetContentView(Resource.Layout.compaliance_layout); restService = new ServiceHelper(); dbHelper = new DbHelper(); con = new InternetConnection(); geo = new Geolocation(); geolocation = geo.GetGeoLocation(ApplicationContext); compliance = new Compliance(); complianceJoinTables = new List <ComplianceJoinTable>(); comp = new Compliance(); tap = geolocation.Split(","); // tap = "26.449923,80.331871".Split(","); getData(); ComplianceJoinTable comjoin = new ComplianceJoinTable(); prefs1 = PreferenceManager.GetDefaultSharedPreferences(this); // checkbox1 = prefs1.GetBoolean("checkboxvalue", true); // string position = Intent.GetStringExtra("Position")?? "Data not available..."; // PostServiceComplianceAsync(); camera = FindViewById <ImageButton>(Resource.Id.imageButton1); videobutton = FindViewById <ImageButton>(Resource.Id.imageButton2); location = FindViewById <ImageButton>(Resource.Id.imageButton4); mike = FindViewById <ImageButton>(Resource.Id.imageButton3); //mikestop = FindViewById<ImageButton>(Resource.Id.imageButton5); //mikeplay = FindViewById<ImageButton>(Resource.Id.mikeplay); imagecaptured = FindViewById <ImageView>(Resource.Id.imageView1); description = FindViewById <EditText>(Resource.Id.ed2); taskdescription = FindViewById <TextView>(Resource.Id.taskdescription); taskname = FindViewById <TextView>(Resource.Id.taskName); taskdetail = FindViewById <TextView>(Resource.Id.taskDetail); deadlinedate = FindViewById <TextView>(Resource.Id.deadlineDate); createdBy = FindViewById <TextView>(Resource.Id.createdBy); creation_date = FindViewById <TextView>(Resource.Id.creationDate); //imagelayout = FindViewById<LinearLayout>(Resource.Id.linearlayout1); rl1 = FindViewById <LinearLayout>(Resource.Id.rl1); rl2 = FindViewById <LinearLayout>(Resource.Id.rl2); rl3 = FindViewById <LinearLayout>(Resource.Id.rl3); rl4 = FindViewById <LinearLayout>(Resource.Id.rl4); // getData(); // taskname.Text = comp.task_name.ToString(); taskdescription.Text = comp.description; createdBy.Text = comp.task_created_by; creation_date.Text = comp.task_creation_date; //markedto.Text = comp.markTo; creation_date.Text = comp.task_creation_date; submit = FindViewById <Button>(Resource.Id.buttonSubmit); // taskname= submit.Click += SubmitCompliance; // seekbar = FindViewById<SeekBar>(Resource.Id.seekbar); //mike.Click += delegate //{ // audioplay(); //}; location.Click += delegate { if (shapes1.shapes[0].type == "polygon") { polygon(); } else if (shapes1.shapes[0].type == "circle") { isMarkerOutsideCircle(); if (isMarkerOutsideCircle() == true) { Toast.MakeText(this, "Latitude-Longitude is inside the circle", ToastLength.Long).Show(); } else { Toast.MakeText(this, "Latitude-Longitude is outside the circle", ToastLength.Long).Show(); } } else { // map marked } //var geoUri = Android.Net.Uri.Parse("geo:26.8467,80.9462"); //var mapIntent = new Intent(Intent.ActionView, geoUri); //StartActivity(mapIntent); }; //if (imagelayout != null) //{ // imagelayout.RemoveView(i); //} //mike.Click += RecordAudio; string path = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/test.mp4"; camera.Click += BtnCamera_Click; videobutton.Click += VideoClick; }