Advertisement
libdo

Untitled

Sep 26th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void BtnDel_Click(object sender, EventArgs e)
  2. {
  3. ShowDialog(DATE_DIALOG);
  4. }
  5.  
  6. protected override Dialog OnCreateDialog(int id)
  7. {
  8. switch (id)
  9. {
  10. case DATE_DIALOG:
  11. {
  12. return new DatePickerDialog(this, this, year, month, day);
  13. }
  14. break;
  15.  
  16. case DATE_DIALOG2:
  17. {
  18. return new DatePickerDialog(this, this, anio, mes, dia);
  19. }
  20. break;
  21. default:
  22. break;
  23. }
  24. return null;
  25. }
  26.  
  27. public void OnDateSet(DatePicker view, int year, int month, int dayOfMonth)
  28. {
  29. this.year = year;
  30. this.month = month;
  31. this.day = dayOfMonth;
  32. Toast.MakeText(this, "Seleccionaste :" + (month + 1) + "/" + day + "/" + year, ToastLength.Short).Show();
  33. string Del = (year + "-" + (month + 1) + "-" + day).ToString();
  34. btnDel.Text = Del;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement