コード例 #1
0
 public EditObservant(Observant o)
 {
     InitializeComponent();
     db = new DBHandler();
     observant = o;
     imgString = o.SerializedImage;
     lblName.Content = observant.Name;
     lblAddress.Content = observant.Address;
     lblNationality.Content = observant.Nationality;
     lblDescription.Content = observant.Description;
     tbxName.Text = observant.Name;
     tbxAddress.Text = observant.Address;
     tbxNationality.Text = observant.Nationality;
     tbxDescription.Text = observant.Description;
     if (o.SerializedImage.ToUpper() != "PLACEHOLDER")
     {
         imgPicture.Source = db.StringToImage(o.SerializedImage);
     }
 }
コード例 #2
0
 public EditInformant(Informant i)
 {
     InitializeComponent();
     db                     = new DBHandler();
     informant              = i;
     imgString              = informant.SerializedImage;
     lblName.Content        = informant.Name;
     lblAddress.Content     = informant.Address;
     lblNationality.Content = informant.Nationality;
     lblDescription.Content = informant.Description;
     lblMoP.Content         = informant.MethodOfPayment;
     lblCurrency.Content    = informant.Currency;
     tbxName.Text           = informant.Name;
     tbxAddress.Text        = informant.Address;
     tbxNationality.Text    = informant.Nationality;
     tbxDescription.Text    = informant.Description;
     tbxMoP.Text            = informant.MethodOfPayment;
     tbxCurrency.Text       = informant.Currency;
     if (informant.SerializedImage.ToUpper() != "PLACEHOLDER")
     {
         imgPicture.Source = db.StringToImage(informant.SerializedImage);
     }
 }
コード例 #3
0
 public AddObservant()
 {
     InitializeComponent();
     db        = new DBHandler();
     imgstring = "Placeholder";
 }