private void InitControlValuesForEdit(int lessonId)
        {
            train_lesson_basicInfo info = bEdit.select_info(lessonId);

            Name.Text           = info.Name;
            Name.Enabled        = false;
            Number.Text         = info.Number;
            Number.Enabled      = false;
            Time.Text           = info.Time.ToString();
            Time.Enabled        = false;
            Description.Text    = info.Description;
            Description.Enabled = false;

            Type.Value = info.Type;

            Type.DataBind();
            Type.Enabled = false;
            lessonType.DataBind();

            ContentType.Value = info.ContentTypeId;
            ContentType.DataBind();
            ContentType.Enabled = false;
            LinqContentType.DataBind();

            btnSave.Enabled = true;
        }
        private void InitControlValuesForEdit(int id)
        {
            train_course_view info = context.train_course_view.Single(i => i.Id == id);

            Name.Text           = info.Name;
            Name.Enabled        = false;
            Number.Text         = info.Number;
            Number.Enabled      = false;
            Time.Text           = info.Time.ToString();
            Time.Enabled        = false;
            Description.Text    = info.Description;
            Description.Enabled = false;

            Type.Value = info.Type;

            Type.DataBind();
            Type.Enabled = false;
            lessonType.DataBind();

            ContentType.Value = info.ContentTypeId;
            ContentType.DataBind();
            ContentType.Enabled = false;
            LinqContentType.DataBind();

            Place.Text    = info.Place;
            Place.Enabled = false;

            Class_time.Text    = info.Class_time;
            Class_time.Enabled = false;

            start_date.Date    = info.Start_date;
            start_date.Enabled = false;

            end_date.Date    = info.End_date;
            end_date.Enabled = false;

            EndChooseDate.Date    = info.End_choose_date;
            EndChooseDate.Enabled = false;

            Teacher.Value = info.Teacher;
            TeacherType.DataBind();
            //TeacherType.Enabled = false;

            Status.Value = info.Status;
            Status.DataBind();
            Status.Enabled = false;
            CourseStatus.DataBind();
            Create_time.Text    = info.Create_time.ToString();
            Create_time.Enabled = false;
        }