예제 #1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormEvaluationEdit FormEE = new FormEvaluationEdit(Evaluations.GetOne(PIn.Long(gridMain.Rows[gridMain.GetSelectedIndex()].Tag.ToString())));

            FormEE.ShowDialog();
            FillGrid();
        }
예제 #2
0
        /// <summary>The selected Def from the grid will be copied into a brand new Evaluation and saved to the DB. This includes all EvaluationCriterion as well. Used when creating a new Evaluation.</summary>
        private void CopyDefToEvaluation()
        {
            EvaluationDef evalDef = EvaluationDefs.GetOne(PIn.Long(gridMain.Rows[gridMain.GetSelectedIndex()].Tag.ToString()));
            Evaluation    evalNew = new Evaluation();

            evalNew.DateEval        = DateTime.Today;
            evalNew.EvalTitle       = evalDef.EvalTitle;
            evalNew.GradingScaleNum = evalDef.GradingScaleNum;
            evalNew.InstructNum     = Security.CurUser.ProvNum;
            evalNew.SchoolCourseNum = evalDef.SchoolCourseNum;
            evalNew.EvaluationNum   = Evaluations.Insert(evalNew);
            List <EvaluationCriterionDef> evalCritDefs = EvaluationCriterionDefs.GetAllForEvaluationDef(evalDef.EvaluationDefNum);
            EvaluationCriterion           evalCrit;

            for (int i = 0; i < evalCritDefs.Count; i++)
            {
                evalCrit = new EvaluationCriterion();
                evalCrit.CriterionDescript = evalCritDefs[i].CriterionDescript;
                evalCrit.EvaluationNum     = evalNew.EvaluationNum;
                evalCrit.GradingScaleNum   = evalCritDefs[i].GradingScaleNum;
                evalCrit.IsCategoryName    = evalCritDefs[i].IsCategoryName;
                evalCrit.ItemOrder         = evalCritDefs[i].ItemOrder;
                evalCrit.MaxPointsPoss     = evalCritDefs[i].MaxPointsPoss;
                EvaluationCriterions.Insert(evalCrit);
            }
            evalNew.IsNew = true;
            FormEvaluationEdit FormEE = new FormEvaluationEdit(evalNew);

            FormEE.ShowDialog();
        }
예제 #3
0
		/// <summary>The selected Def from the grid will be copied into a brand new Evaluation and saved to the DB. This includes all EvaluationCriterion as well. Used when creating a new Evaluation.</summary>
		private void CopyDefToEvaluation() {
			EvaluationDef evalDef=EvaluationDefs.GetOne(PIn.Long(gridMain.Rows[gridMain.GetSelectedIndex()].Tag.ToString()));
			Evaluation evalNew=new Evaluation();
			evalNew.DateEval=DateTime.Today;
			evalNew.EvalTitle=evalDef.EvalTitle;
			evalNew.GradingScaleNum=evalDef.GradingScaleNum;
			evalNew.InstructNum=Security.CurUser.ProvNum;
			evalNew.SchoolCourseNum=evalDef.SchoolCourseNum;
			evalNew.EvaluationNum=Evaluations.Insert(evalNew);
			List<EvaluationCriterionDef> evalCritDefs=EvaluationCriterionDefs.GetAllForEvaluationDef(evalDef.EvaluationDefNum);
			EvaluationCriterion evalCrit;
			for(int i=0;i<evalCritDefs.Count;i++) {
				evalCrit=new EvaluationCriterion();
				evalCrit.CriterionDescript=evalCritDefs[i].CriterionDescript;
				evalCrit.EvaluationNum=evalNew.EvaluationNum;
				evalCrit.GradingScaleNum=evalCritDefs[i].GradingScaleNum;
				evalCrit.IsCategoryName=evalCritDefs[i].IsCategoryName;
				evalCrit.ItemOrder=evalCritDefs[i].ItemOrder;
				evalCrit.MaxPointsPoss=evalCritDefs[i].MaxPointsPoss;
				EvaluationCriterions.Insert(evalCrit);
			}
			evalNew.IsNew=true;
			FormEvaluationEdit FormEE=new FormEvaluationEdit(evalNew);
			FormEE.ShowDialog();
		}
예제 #4
0
파일: FormEvaluations.cs 프로젝트: mnisl/OD
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormEvaluationEdit FormEE=new FormEvaluationEdit(Evaluations.GetOne(PIn.Long(gridMain.Rows[gridMain.GetSelectedIndex()].Tag.ToString())));
			FormEE.ShowDialog();
			FillGrid();
		}