private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormEvaluationCriterionDefEdit FormECDE = new FormEvaluationCriterionDefEdit(_criterionDefsForEval[gridMain.GetSelectedIndex()]);

            FormECDE.ShowDialog();
            if (FormECDE.DialogResult == DialogResult.OK)
            {
                if (_criterionDefsForEval.Count != _itemOrder.Count)
                {
                    _itemOrder.Remove(_criterionDefsForEval[gridMain.GetSelectedIndex()].EvaluationCriterionDefNum);                    //Must be called before refreshing.
                }
                _criterionDefsForEval = EvaluationCriterionDefs.GetAllForEvaluationDef(_evalDefCur.EvaluationDefNum);
                SynchItemOrder();
                FillGrid();
            }
        }
        private void butCriterionAdd_Click(object sender, EventArgs e)
        {
            if (_evalDefCur.GradingScaleNum == 0)
            {
                MsgBox.Show(this, "Please select a grading scale before adding criterion.");
                return;
            }
            EvaluationCriterionDef evalCritDef = new EvaluationCriterionDef();

            evalCritDef.EvaluationDefNum = _evalDefCur.EvaluationDefNum;
            evalCritDef.GradingScaleNum  = _evalDefCur.GradingScaleNum;
            evalCritDef.IsNew            = true;
            FormEvaluationCriterionDefEdit FormECDE = new FormEvaluationCriterionDefEdit(evalCritDef);

            FormECDE.ShowDialog();
            if (FormECDE.DialogResult == DialogResult.OK)
            {
                _criterionDefsForEval = EvaluationCriterionDefs.GetAllForEvaluationDef(_evalDefCur.EvaluationDefNum);
                _itemOrder.Add(evalCritDef.EvaluationCriterionDefNum);                //Must be called after refreshing
                SynchItemOrder();
                FillGrid();
            }
        }
Example #3
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormEvaluationCriterionDefEdit FormECDE=new FormEvaluationCriterionDefEdit(_criterionDefsForEval[gridMain.GetSelectedIndex()]);
			FormECDE.ShowDialog();
			if(FormECDE.DialogResult==DialogResult.OK) {
				if(_criterionDefsForEval.Count!=_itemOrder.Count) {
					_itemOrder.Remove(_criterionDefsForEval[gridMain.GetSelectedIndex()].EvaluationCriterionDefNum);//Must be called before refreshing.
				}
				_criterionDefsForEval=EvaluationCriterionDefs.GetAllForEvaluationDef(_evalDefCur.EvaluationDefNum);
				SynchItemOrder();
				FillGrid();
			}
		}
Example #4
0
		private void butCriterionAdd_Click(object sender,EventArgs e) {
			if(_evalDefCur.GradingScaleNum==0) {
				MsgBox.Show(this,"Please select a grading scale before adding criterion.");
				return;
			}
			EvaluationCriterionDef evalCritDef=new EvaluationCriterionDef();
			evalCritDef.EvaluationDefNum=_evalDefCur.EvaluationDefNum;
			evalCritDef.GradingScaleNum=_evalDefCur.GradingScaleNum;
			evalCritDef.IsNew=true;
			FormEvaluationCriterionDefEdit FormECDE=new FormEvaluationCriterionDefEdit(evalCritDef);
			FormECDE.ShowDialog();
			if(FormECDE.DialogResult==DialogResult.OK) {
				_criterionDefsForEval=EvaluationCriterionDefs.GetAllForEvaluationDef(_evalDefCur.EvaluationDefNum);
				_itemOrder.Add(evalCritDef.EvaluationCriterionDefNum);//Must be called after refreshing
				SynchItemOrder();
				FillGrid();
			}
		}