Beispiel #1
0
		public string CheckIsClassExists(string getGrade,string getClass,ref bool isOk)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess() )
			{
				try
				{
				
					int gradeNumber = Convert.ToInt32(getGrade.Replace(" ",""));
					int classNumber = Convert.ToInt32(getClass.Replace(" ",""));

					DataTable dtClass = optionDataAccess.IsExistClass(gradeNumber,classNumber);
					
					if ( dtClass.Rows.Count > 0 )
					{
						isOk = true;
						return "ok";
					}
					else
					{
						isOk = false;
						return "班级不存在请重试!";
					}
				}
				catch(Exception e)
				{
					isOk = false;
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return "班级号码应该为数字!";
				}
			}
		}