예제 #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);
            }
        }
예제 #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();
 }
예제 #3
0
 public void DeleteLector(Lector lector)
 {
     client.DeleteLector(key, lector.Id);
 }
예제 #4
0
 public string GetLectorBirthday(Lector lector)
 {
     return client.GetLectorBirthdayById(key, lector.Id);
 }
예제 #5
0
 public void SetLectorPhotoData(Lector lector, string data)
 {
     client.SetLectorPhotoData(key, lector.Id, data);
 }
예제 #6
0
 public void AddLectorToSeminar(Lector lector, Seminar seminar)
 {
     client.AddLectorToSeminar(key, lector.Id, seminar.Id);
 }
예제 #7
0
 public void SetLectorBirthday(Lector lector, string Birthday)
 {
     client.SetLectorBirthdayById(key, lector.Id, Birthday);
 }
예제 #8
0
 public void SetLectorName(Lector lector, string Name)
 {
     client.SetLectorNameById(key, lector.Id, Name);
 }
예제 #9
0
 public void RemoveLectorFromSeminar(Lector lector, Seminar seminar)
 {
     client.RemoveLectorFromSeminar(key, lector.Id, seminar.Id);
 }
예제 #10
0
 public string GetLectorPhotoName(Lector lector)
 {
     return client.GetLectorPhotoName(key, lector.Id);
 }
예제 #11
0
 public string GetLectorName(Lector lector)
 {
     return client.GetLectorNameById(key, lector.Id);
 }
예제 #12
0
파일: Seminar.cs 프로젝트: pigovsky/T3
 public void RemoveLector(Lector lector)
 {
     sessionWraperFromWCF.RemoveLectorFromSeminar(lector, this);
     Lectors.Remove(lector);
 }
예제 #13
0
파일: Seminar.cs 프로젝트: pigovsky/T3
 public void AddLector(Lector lector)
 {
     sessionWraperFromWCF.AddLectorToSeminar(lector, this);
     Lectors.Add(lector);
 }