示例#1
0
 private void CargarListaMedicacion(String _filtro)
 {
     try
     {
         int indice;
         foreach (var item in E.TRAEMEDICAMENTOS(_filtro))
         {
             indice = dataGridListado.Rows.Add();
             dataGridListado.Rows[indice].Cells[(int)Col_Lista.ID].Value          = item.art_CodGen;
             dataGridListado.Rows[indice].Cells[(int)Col_Lista.DESCRIPCION].Value = item.art_DescGen + " " + item.artele_Desc2 + " " + item.artele_Desc1;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void TraeMedicacionPaciente(string _idMedicamento)
 {
     try
     {
         CultureInfo culture = new CultureInfo("en-US");
         this.dataGridViewMedicamentos.Rows.Clear();
         int indice;
         foreach (var item in E.TRAEMEDICAMENTOS(_idMedicamento).ToList())
         {
             indice = dataGridViewMedicamentos.Rows.Add();
             dataGridViewMedicamentos.Rows[indice].Cells[(int)Col_Medicamentos.MEDICAMENTOID].Value = item.art_CodGen;
             dataGridViewMedicamentos.Rows[indice].Cells[(int)Col_Medicamentos.DROGA].Value         = item.art_DescGen;
             dataGridViewMedicamentos.Rows[indice].Cells[(int)Col_Medicamentos.POTENCIA].Value      = item.artele_Desc2;
             dataGridViewMedicamentos.Rows[indice].Cells[(int)Col_Medicamentos.PRESENTACION].Value  = item.artele_Desc1;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }