Пример #1
0
        public frmRegistrarNotas_profesor(MAlvaradoWS.courseSchedule courseSchedule)
        {
            InitializeComponent();
            lleno = false;
            this.txtCourse.Text         = courseSchedule.course.name;
            this.txtLevel.Text          = courseSchedule.course.level.ToString();
            this.txtSection.Text        = courseSchedule.classSection.name.ToString();
            controller                  = new MAlvaradoWS.DBControllerWSClient();
            this.courseScheduleSelected = courseSchedule;

            editado = false;
            grades  = new BindingList <MAlvaradoWS.grade> (controller.queryAllGradesByIDCourse(courseScheduleSelected.course.id));



            cboAno.DataSource    = controller.queryAllY();
            cboAno.DisplayMember = "yearJoel";
            MAlvaradoWS.year y;
            cboBimestre.DataSource    = controller.queryAllB();
            cboBimestre.DisplayMember = "bimesterJoel";


            dgvRegistroNotas.ColumnCount           = grades.Count + 1;
            dgvRegistroNotas.Columns[0].Name       = "name";
            dgvRegistroNotas.Columns[0].HeaderText = "Nombre";
            dgvRegistroNotas.Columns[0].ReadOnly   = true;
            int i = 1;

            foreach (MAlvaradoWS.grade g in grades)
            {
                dgvRegistroNotas.Columns[i].Name             = g.idGrade.ToString();
                dgvRegistroNotas.Columns[i].HeaderText       = g.description;
                dgvRegistroNotas.Columns[i].DataPropertyName = "value_";
                i++;
            }
        }