Beispiel #1
0
 public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(System.String) && value is CDoctor)
     {
         CDoctor obj = (CDoctor)value;
         return(string.Format(@"{0}{1}", obj.bm.bmdm, obj.zgmc));
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
Beispiel #2
0
 private void dataGridView1_SizeChanged(object sender, EventArgs e)
 {
     try
     {
         SelDoctor = GSettings.Doctors.Where(dd => dd.zgdm == (int)this.dataGridView1.SelectedRows[0].Cells["zgdm"].Value).First();
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }