示例#1
0
        void btnOK_Click(object sender, EventArgs e)
        {
            //if (_TrainPlacedeliteList==null)
            //_TrainPlacedeliteList = new List<TrainPlace>();
            _AppointClassSubjectItemList.Clear();
            foreach (AppointClass pro in this._List)
            {
                var groupcaptain = new AppointClass();
                groupcaptain.AppointClassID   = pro.AppointClassID;
                groupcaptain.AppointClassName = pro.AppointClassName;
                groupcaptain.Note             = pro.Note;

                if (pro.Choose)
                {
                    _AppointClassSubjectItemList.Add(groupcaptain);
                }
            }
            if (_AppointClassSubjectItemList.Count == 0)
            {
                MsgBox.ShowInfo("请选中数据行");
                return;
            }
            else
            {
                this.DialogResult = DialogResult.OK;
            }
        }
 void FormSelectService_Load(object sender, EventArgs e)
 {
     currentService             = new AppointClass();
     _list                      = new AppointClassDao().GetByIDList(idlist);
     gc_AppointClass.DataSource = _list;
     gc_AppointClass.RefreshDataSource();
 }
 /// <summary>
 ///     值改变
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cLookUp_EditValueChanged(object sender, EventArgs e)
 {
     if (ListIsValid == null)
     {
         return;
     }
     CurrentAppointClass = EditValue == null
             ? null
             : ListIsValid.Find(model => model.AppointClassID == Convert.ToInt32(EditValue));
 }
示例#4
0
 void FormSelectService_Load(object sender, EventArgs e)
 {
     currentService = new AppointClass();
     if (!new StudentAppointClassDao().Exist(currentService.AppointClassID, iStudentID))
     {
         new StudentAppointClassDao().Insert(iStudentID);
     }
     _list    = new AppointClassDao().GetList();
     DataList = new StudentAppointClassDao().GetListByStudentID(iStudentID);
     foreach (StudentAppointClass stuappointclass in DataList)
     {
         CheckRightData(stuappointclass);
     }
     gc_AppointClass.DataSource = _list;
     gc_AppointClass.RefreshDataSource();
 }