Exemplo n.º 1
0
        public EditLectorDialog(SessionWraperFromWCF client, Lector lector)
        {
            InitializeComponent();
            this.client = client;
            this.lector = lector;

            if (lector!=null)
            {
                if (lector.Name!=null)
                    textBoxName.Text = lector.Name;
                if (lector.Birthday != null)
                    try
                    {
                        dateTimePickerBirthday.Value = DateTime.Parse(lector.Birthday);
                    }
                    catch (Exception e) { }
                if (lector.LectorPhotoName != null)
                    pictureBoxPhoto.Image = Image.FromFile(Lector.img + lector.LectorPhotoName);
            }
        }
Exemplo n.º 2
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     if (lector == null)
         lector = client.CreateLector(textBoxName.Text);
     else
         lector.Name = textBoxName.Text;
     lector.Birthday = dateTimePickerBirthday.Value.ToString("yyyy-MM-dd");
     if (photoData !=null)
         lector.LectorPhotoData = photoData;
     Hide();
 }
Exemplo n.º 3
0
 public void DeleteLector(Lector lector)
 {
     client.DeleteLector(key, lector.Id);
 }
Exemplo n.º 4
0
 public string GetLectorBirthday(Lector lector)
 {
     return client.GetLectorBirthdayById(key, lector.Id);
 }
Exemplo n.º 5
0
 public void SetLectorPhotoData(Lector lector, string data)
 {
     client.SetLectorPhotoData(key, lector.Id, data);
 }
Exemplo n.º 6
0
 public void AddLectorToSeminar(Lector lector, Seminar seminar)
 {
     client.AddLectorToSeminar(key, lector.Id, seminar.Id);
 }
Exemplo n.º 7
0
 public void SetLectorBirthday(Lector lector, string Birthday)
 {
     client.SetLectorBirthdayById(key, lector.Id, Birthday);
 }
Exemplo n.º 8
0
 public void SetLectorName(Lector lector, string Name)
 {
     client.SetLectorNameById(key, lector.Id, Name);
 }
Exemplo n.º 9
0
 public void RemoveLectorFromSeminar(Lector lector, Seminar seminar)
 {
     client.RemoveLectorFromSeminar(key, lector.Id, seminar.Id);
 }
Exemplo n.º 10
0
 public string GetLectorPhotoName(Lector lector)
 {
     return client.GetLectorPhotoName(key, lector.Id);
 }
Exemplo n.º 11
0
 public string GetLectorName(Lector lector)
 {
     return client.GetLectorNameById(key, lector.Id);
 }
Exemplo n.º 12
0
 public void RemoveLector(Lector lector)
 {
     sessionWraperFromWCF.RemoveLectorFromSeminar(lector, this);
     Lectors.Remove(lector);
 }
Exemplo n.º 13
0
 public void AddLector(Lector lector)
 {
     sessionWraperFromWCF.AddLectorToSeminar(lector, this);
     Lectors.Add(lector);
 }