示例#1
0
        }//--------------------

        //##################################END TEXTBOX txtSearch EVENTS##########################################################

        //####################################################DATAGRIDVIEW dgvList EVENTS####################################################
        //event is raised when the mouse is enter
        private void dgvListCellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 0)
            {
                this.dgvList.BeginEdit(true);

                DataGridViewCell dgvCell = this.dgvList.Rows[e.RowIndex].Cells["sysid_schedule"];

                dgvCell.ErrorText = String.Empty;

                this.dgvList[0, e.RowIndex].ReadOnly = false;

                String strTemp = String.Empty;

                if (_teacherLoadingManager.HasConflictSchedule((System.Data.DataTable) this.dgvList.DataSource,
                                                               this.dgvList.Rows[e.RowIndex].Cells["sysid_schedule"].Value.ToString(), _employeeId, ref strTemp))
                {
                    this.dgvList[0, e.RowIndex].ReadOnly = true;
                    this.dgvList.ShowRowErrors           = true;
                }


                this.dgvList.EndEdit();
            }
            else
            {
                this.dgvList.Rows[e.RowIndex].ReadOnly = true;
            }
        }//-----------------------