Esempio n. 1
0
		private void butGradingScale_Click(object sender,EventArgs e) {
			//Although there can be multiple grading scales on the same evaluation, it is highly discouraged. 
			//The grades must be manually calculated since the only calculated grades are scales that match the evaluation.
			//This could be changed later by forcing all scales to have point values and giving each EvaluationCriterion a "rubrick" gradingscale.
			//This change would require that Evaluations be given a different kind of grading scale that allowed for percentage ranges.
			//This would then be calculated into a grade for the reports that could use a similar grading scale.
			//These changes may not be necessary if the customers prefers the current method.
			FormGradingScales FormGS=new FormGradingScales();
			FormGS.IsSelectionMode=true;
			FormGS.ShowDialog();
			if(FormGS.DialogResult==DialogResult.OK) {
				textGradeScaleName.Text=FormGS.SelectedGradingScale.Description;
				_gradeScale=FormGS.SelectedGradingScale;
				_evalCritDef.GradingScaleNum=_gradeScale.GradingScaleNum;
				if(FormGS.SelectedGradingScale.ScaleType==EnumScaleType.Weighted) {
					textPoints.Visible=true;
					labelPoints.Visible=true;
					textPoints.Text=_evalCritDef.MaxPointsPoss.ToString();
				}
				else {
					textPoints.Visible=false;
					labelPoints.Visible=false;
					textPoints.Text="";
				}
			}
		}
Esempio n. 2
0
		private void butOK_Click(object sender,EventArgs e) {
			if(gridMain.GetSelectedIndex()==-1) {
				MsgBox.Show(this,"Select a grading scale first.");
				return;
			}
			SelectedGradingScale=_listGradingScales[gridMain.GetSelectedIndex()];
			DialogResult=DialogResult.OK;
		}
Esempio n. 3
0
		private void butAdd_Click(object sender,EventArgs e) {
			GradingScale gradingScaleNew=new GradingScale();
			gradingScaleNew.GradingScaleNum=GradingScales.Insert(gradingScaleNew);
			gradingScaleNew.IsNew=true;
			FormGradingScaleEdit FormGSE=new FormGradingScaleEdit(gradingScaleNew);
			FormGSE.ShowDialog();
			FillGrid();
		}
Esempio n. 4
0
 ///<summary></summary>
 public static void Update(GradingScale gradingScale)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), gradingScale);
         return;
     }
     Crud.GradingScaleCrud.Update(gradingScale);
 }
Esempio n. 5
0
 ///<summary></summary>
 public static long Insert(GradingScale gradingScale)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         gradingScale.GradingScaleNum = Meth.GetLong(MethodBase.GetCurrentMethod(), gradingScale);
         return(gradingScale.GradingScaleNum);
     }
     return(Crud.GradingScaleCrud.Insert(gradingScale));
 }
Esempio n. 6
0
		private void gridMain_DoubleClick(object sender,EventArgs e) {
			if(IsSelectionMode) {
				SelectedGradingScale=_listGradingScales[gridMain.GetSelectedIndex()];
				DialogResult=DialogResult.OK;
				return;
			}
			FormGradingScaleEdit FormGSE=new FormGradingScaleEdit(_listGradingScales[gridMain.GetSelectedIndex()]);
			FormGSE.ShowDialog();
			FillGrid();
		}
Esempio n. 7
0
		private void FormEvaluationCriterionDefEdit_Load(object sender,EventArgs e) {
			textDescript.Text=_evalCritDef.CriterionDescript;
			_gradeScale=GradingScales.GetOne(_evalCritDef.GradingScaleNum);
			textGradeScaleName.Text=_gradeScale.Description;
			checkIsCategoryName.Checked=_evalCritDef.IsCategoryName;
			if(_gradeScale.ScaleType==EnumScaleType.Weighted) {
				textPoints.Visible=true;
				labelPoints.Visible=true;
				textPoints.Text=_evalCritDef.MaxPointsPoss.ToString();
			}
		}
Esempio n. 8
0
		public static bool IsDupicateDescription(GradingScale gradingScaleCur) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetBool(MethodBase.GetCurrentMethod(),gradingScaleCur);
			}
			string command="SELECT COUNT(*) FROM gradingscale WHERE Description = '"+POut.String(gradingScaleCur.Description)+"' "
				+"AND GradingScaleNum != "+POut.Long(gradingScaleCur.GradingScaleNum);
			int count=PIn.Int(Db.GetCount(command));
			if(count>0) {
				return true;
			}
			return false;
		}
Esempio n. 9
0
		public static bool IsInUseByEvaluation(GradingScale gradingScaleCur) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetBool(MethodBase.GetCurrentMethod(),gradingScaleCur);
			}
			string command="SELECT COUNT(*) FROM evaluation,evaluationcriterion "
				+"WHERE evaluation.GradingScaleNum = "+POut.Long(gradingScaleCur.GradingScaleNum)+" "
				+"OR evaluationcriterion.GradingScaleNum = "+POut.Long(gradingScaleCur.GradingScaleNum);
			int count=PIn.Int(Db.GetCount(command));
			if(count>0) {
				return true;
			}
			return false;
		}
Esempio n. 10
0
        public static bool IsDupicateDescription(GradingScale gradingScaleCur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetBool(MethodBase.GetCurrentMethod(), gradingScaleCur));
            }
            string command = "SELECT COUNT(*) FROM gradingscale WHERE Description = '" + POut.String(gradingScaleCur.Description) + "' "
                             + "AND GradingScaleNum != " + POut.Long(gradingScaleCur.GradingScaleNum);
            int count = PIn.Int(Db.GetCount(command));

            if (count > 0)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 11
0
        public static bool IsInUseByEvaluation(GradingScale gradingScaleCur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetBool(MethodBase.GetCurrentMethod(), gradingScaleCur));
            }
            string command = "SELECT COUNT(*) FROM evaluation,evaluationcriterion "
                             + "WHERE evaluation.GradingScaleNum = " + POut.Long(gradingScaleCur.GradingScaleNum) + " "
                             + "OR evaluationcriterion.GradingScaleNum = " + POut.Long(gradingScaleCur.GradingScaleNum);
            int count = PIn.Int(Db.GetCount(command));

            if (count > 0)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 12
0
		private void FormEvaluationEdit_Load(object sender,EventArgs e) {
			//This window fills all necessary data on load. This eliminates the need for multiple calls to the database.
			textDate.Text=_evalCur.DateEval.ToShortDateString();
			textTitle.Text=_evalCur.EvalTitle;
			_evalGradeScale=GradingScales.GetOne(_evalCur.GradingScaleNum);
			_listEvalGradeItems=GradingScaleItems.Refresh(_evalCur.GradingScaleNum);
			textGradeScaleName.Text=_evalGradeScale.Description;
			_provInstructor=Providers.GetProv(_evalCur.InstructNum);
			textInstructor.Text=_provInstructor.GetLongDesc();
			_provStudent=Providers.GetProv(_evalCur.StudentNum);
			if(_provStudent!=null) {
				textStudent.Text=_provStudent.GetLongDesc();
			}
			textCourse.Text=SchoolCourses.GetDescript(_evalCur.SchoolCourseNum);
			textGradeNumberOverride.Text=_evalCur.OverallGradeNumber.ToString();
			textGradeShowingOverride.Text=_evalCur.OverallGradeShowing;
			_listEvalCrits=EvaluationCriterions.Refresh(_evalCur.EvaluationNum);
			for(int i=0;i<_listEvalCrits.Count;i++) {
				if(_listEvalCrits[i].IsCategoryName) {
					continue;
				}
				GradingScale critGradeScale=GradingScales.GetOne(_listEvalCrits[i].GradingScaleNum);
				if(!_critGradeScales.ContainsKey(critGradeScale.GradingScaleNum)) {
					_critGradeScales.Add(critGradeScale.GradingScaleNum,critGradeScale);
				}
				if(!_critGradeItems.ContainsKey(critGradeScale.GradingScaleNum)) {
					_critGradeItems.Add(critGradeScale.GradingScaleNum,GradingScaleItems.Refresh(critGradeScale.GradingScaleNum));
				}
			}
			FillGridCriterion();
			RecalculateGrades();
			//Since there is no override column in the database, we check for equality of the calculated grade and the grade on the evaluation.
			//If they are different then the grade was overwritten at some point.
			if(textGradeNumber.Text==textGradeNumberOverride.Text) {
				textGradeNumberOverride.Text="";
			}
			if(textGradeShowing.Text==textGradeShowingOverride.Text) {
				textGradeShowingOverride.Text="";
			}
		}
Esempio n. 13
0
		private void FormEvaluationCriterionEdit_Load(object sender,EventArgs e) {
			//There is always going to be an EvaluationCriterion when coming into this window.
			_gradingScale=GradingScales.GetOne(_evalCritCur.GradingScaleNum);
			textCriterionDescript.Text=_evalCritCur.CriterionDescript;
			textGradingScale.Text=_gradingScale.Description;
			textNote.Text=_evalCritCur.Notes;
			_listGradeItems=GradingScaleItems.Refresh(_evalCritCur.GradingScaleNum);
			//if(!_gradingScale.IsPercentage) {
			//	textGradeNumber.ReadOnly=true;
			//	textGradeShowingPercent.Visible=false;
			//	for(int i=0;i<_listGradeItems.Count;i++) {
			//		comboGradeShowing.Items.Add(_listGradeItems[i].GradeShowing);
			//		if(_listGradeItems[i].GradeShowing==_evalCritCur.GradeShowing) {
			//			comboGradeShowing.SelectedIndex=i;
			//			textGradeNumber.Text=_evalCritCur.GradeNumber.ToString();
			//		}
			//	}
			//}
			//else {
			//	comboGradeShowing.Visible=false;
			//	textGradeNumber.Text=_evalCritCur.GradeNumber.ToString();
			//	textGradeShowingPercent.Text=_evalCritCur.GradeShowing;
			//}
		}
Esempio n. 14
0
		public FormGradingScaleEdit(GradingScale gradingScaleCur) {
			InitializeComponent();
			Lan.F(this);
			_gradingScaleCur=gradingScaleCur;
		}
Esempio n. 15
0
		///<summary></summary>
		public static long Insert(GradingScale gradingScale){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				gradingScale.GradingScaleNum=Meth.GetLong(MethodBase.GetCurrentMethod(),gradingScale);
				return gradingScale.GradingScaleNum;
			}
			return Crud.GradingScaleCrud.Insert(gradingScale);
		}
Esempio n. 16
0
		///<summary></summary>
		public static void Update(GradingScale gradingScale){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				Meth.GetVoid(MethodBase.GetCurrentMethod(),gradingScale);
				return;
			}
			Crud.GradingScaleCrud.Update(gradingScale);
		}