/Docs/07-Implementacion/Source/trunk/EDUAR_Regular/EDUAR_SI/EDUAR_SI_Prueba/Form1.cs

http://blpm.googlecode.com/ · C# · 217 lines · 201 code · 16 blank · 0 comment · 0 complexity · fa0134bc38dbc4f907271c788e41405b MD5 · raw file

  1. using System;
  2. using System.Windows.Forms;
  3. using EDUAR_SI_BusinessLogic;
  4. namespace EDUAR_SI_Prueba
  5. {
  6. public partial class Form1 : Form
  7. {
  8. public Form1()
  9. {
  10. InitializeComponent();
  11. }
  12. private void btnImportarMySQL_Click(object sender, EventArgs e)
  13. {
  14. try
  15. {
  16. btnImportarMySQL.Enabled = false;
  17. BLImportarDatos objImportarDatos = new BLImportarDatos(ddlCadenaConexion.SelectedItem.ToString());
  18. objImportarDatos.ProcedimientoImportarDatos();
  19. }
  20. catch (Exception ex)
  21. {
  22. MessageBox.Show(ex.Message);
  23. }
  24. finally
  25. { btnImportarMySQL.Enabled = true; }
  26. }
  27. private void Form1_Load(object sender, EventArgs e)
  28. {
  29. ddlCadenaConexion.Items.Add(@"Data Source=SOFIA;Initial Catalog=EDUAR;Persist Security Info=True;User ID=sa;Password=tesis");
  30. ddlCadenaConexion.Items.Add(@"Data Source=SOFIA;Initial Catalog=EDUAR_DEV;Persist Security Info=True;User ID=sa;Password=tesis");
  31. ddlCadenaConexion.Items.Add(@"Data Source=alulau.redirectme.net,1433;Initial Catalog=EDUAR;Persist Security Info=True;User ID=sa;Password=tesis");
  32. ddlCadenaConexion.Items.Add(@"Data Source=alulau.redirectme.net,1433;Initial Catalog=EDUAR_DEV;Persist Security Info=True;User ID=sa;Password=tesis");
  33. ddlCadenaConexion.SelectedIndex = 1;
  34. }
  35. private void btnInformeInasitencia_Click(object sender, EventArgs e)
  36. {
  37. try
  38. {
  39. btnInformeInasistencia.Enabled = false;
  40. BLNotificarInasistencia objInforme = new BLNotificarInasistencia(ddlCadenaConexion.SelectedItem.ToString());
  41. objInforme.ProcedimientoNotificarInasistencia();
  42. }
  43. catch (Exception ex)
  44. {
  45. MessageBox.Show(ex.Message);
  46. }
  47. finally
  48. { btnInformeInasistencia.Enabled = true; }
  49. }
  50. private void btnInformeSanciones_Click(object sender, EventArgs e)
  51. {
  52. try
  53. {
  54. btnInformeSanciones.Enabled = false;
  55. BLNotificarSancion objInforme = new BLNotificarSancion(ddlCadenaConexion.SelectedItem.ToString());
  56. objInforme.ProcedimientoNotificarSancion();
  57. }
  58. catch (Exception ex)
  59. {
  60. MessageBox.Show(ex.Message);
  61. }
  62. finally
  63. { btnInformeSanciones.Enabled = true; }
  64. }
  65. private void btnAuxiliares_Click(object sender, EventArgs e)
  66. {
  67. try
  68. {
  69. btnAuxiliares.Enabled = false;
  70. BLImportarTablasAuxiliares objImportarDatos = new BLImportarTablasAuxiliares(ddlCadenaConexion.SelectedItem.ToString());
  71. objImportarDatos.ImportarPaisProvinciaLocalidad();
  72. }
  73. catch (Exception ex)
  74. {
  75. MessageBox.Show(ex.Message);
  76. }
  77. finally
  78. { btnAuxiliares.Enabled = true; }
  79. }
  80. private void btnAlumnos_Click(object sender, EventArgs e)
  81. {
  82. try
  83. {
  84. btnAlumnos.Enabled = false;
  85. BLImportarAlumnos objImportarDatos = new BLImportarAlumnos(ddlCadenaConexion.SelectedItem.ToString());
  86. objImportarDatos.ImportarAlumnos();
  87. }
  88. catch (Exception ex)
  89. {
  90. MessageBox.Show(ex.Message);
  91. }
  92. finally
  93. { btnAlumnos.Enabled = true; }
  94. }
  95. private void btnTutores_Click(object sender, EventArgs e)
  96. {
  97. try
  98. {
  99. btnTutores.Enabled = false;
  100. BLImportarTutores objImportarDatos = new BLImportarTutores(ddlCadenaConexion.SelectedItem.ToString());
  101. objImportarDatos.ImportarTutores();
  102. }
  103. catch (Exception ex)
  104. {
  105. MessageBox.Show(ex.Message);
  106. }
  107. finally
  108. { btnTutores.Enabled = true; }
  109. }
  110. private void btnPersonal_Click(object sender, EventArgs e)
  111. {
  112. try
  113. {
  114. btnPersonal.Enabled = false;
  115. BLImportarPersonal objImportarDatos = new BLImportarPersonal(ddlCadenaConexion.SelectedItem.ToString());
  116. objImportarDatos.ImportarPersonal();
  117. }
  118. catch (Exception ex)
  119. {
  120. MessageBox.Show(ex.Message);
  121. }
  122. finally
  123. { btnPersonal.Enabled = true; }
  124. }
  125. private void btnInfoAcademica_Click(object sender, EventArgs e)
  126. {
  127. try
  128. {
  129. btnInfoAcademica.Enabled = false;
  130. BLImportarConfiguracionAcademica objImportarDatos = new BLImportarConfiguracionAcademica(ddlCadenaConexion.SelectedItem.ToString());
  131. objImportarDatos.ImportarConfiguracionAcademica();
  132. }
  133. catch (Exception ex)
  134. {
  135. MessageBox.Show(ex.Message);
  136. }
  137. finally
  138. { btnInfoAcademica.Enabled = true; }
  139. }
  140. private void btnCalificaciones_Click(object sender, EventArgs e)
  141. {
  142. try
  143. {
  144. btnCalificaciones.Enabled = false;
  145. BLImportarCalificaciones objImportarDatos = new BLImportarCalificaciones(ddlCadenaConexion.SelectedItem.ToString());
  146. objImportarDatos.ImportarCalificaciones();
  147. }
  148. catch (Exception ex)
  149. {
  150. MessageBox.Show(ex.Message);
  151. }
  152. finally
  153. { btnCalificaciones.Enabled = true; }
  154. }
  155. private void btnSanciones_Click(object sender, EventArgs e)
  156. {
  157. try
  158. {
  159. btnSanciones.Enabled = false;
  160. BLImportarSanciones objImportarDatos = new BLImportarSanciones(ddlCadenaConexion.SelectedItem.ToString());
  161. objImportarDatos.ImportarSanciones();
  162. }
  163. catch (Exception ex)
  164. {
  165. MessageBox.Show(ex.Message);
  166. }
  167. finally
  168. { btnSanciones.Enabled = true; }
  169. }
  170. private void btnAsistencia_Click(object sender, EventArgs e)
  171. {
  172. try
  173. {
  174. btnAsistencia.Enabled = false;
  175. BLImportarAsistencia objImportarDatos = new BLImportarAsistencia(ddlCadenaConexion.SelectedItem.ToString());
  176. objImportarDatos.ImportarAsistencia();
  177. }
  178. catch (Exception ex)
  179. {
  180. MessageBox.Show(ex.Message);
  181. }
  182. finally
  183. { btnAsistencia.Enabled = true; }
  184. }
  185. private void btnDiasHorarios_Click(object sender, EventArgs e)
  186. {
  187. try
  188. {
  189. btnDiasHorarios.Enabled = false;
  190. BLImportarDiasHorarios objImportarDatos = new BLImportarDiasHorarios(ddlCadenaConexion.SelectedItem.ToString());
  191. objImportarDatos.ImportarDiasHorarios();
  192. }
  193. catch (Exception ex)
  194. {
  195. MessageBox.Show(ex.Message);
  196. }
  197. finally
  198. { btnDiasHorarios.Enabled = true; }
  199. }
  200. }
  201. }