private void FormAddRegistrationLecture_Load(object sender, EventArgs e)
        {
            if (lecture == null)
            {
                lecture = new TLecture();
            }
            bsLecture.DataSource = lecture;

            if (!string.IsNullOrEmpty(lecture.Image))
            {
                pBLecturePicture.Image = Image.FromFile(lecture.Image);
            }
        }
        public void LoadLecture()
        {
            string error = string.Empty;

            this.Lectures = TLecture.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане от базата данни");
                return;
            }

            bsLecture.DataSource = Lectures;
        }
 public FormAddRegistrationLecture(TLecture l)
 {
     InitializeComponent();
     lecture = l;
 }