Example #1
0
		public DataSet getClassInfo(string className,string classNumber,string gradeNumber,bool isForStu)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.GetClassList(className,classNumber,gradeNumber,isForStu);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}
			}
		}
Example #2
0
		public DataSet GetStuCard(string getGrade,string getClass,string getName,string getNumber,string getCardNumber)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.GetStuCard(getGrade,getClass,getName,getNumber,getCardNumber);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}
			}
		}
Example #3
0
 public void AddOrUpdateBackupPath(string path)
 {
     using (OptionDataAccess optionDataAccess = new OptionDataAccess())
     {
         try
         {
             optionDataAccess.AddOrUpdateBackupPath(path);
         }
         catch (Exception ex)
         {
             Util.WriteLog(ex.Message, Util.EXCEPTION_LOG_TITLE);
         }
     }
 }
Example #4
0
		public void WriteStuCardInfoXLS(string getPath)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess() )
			{
				try
				{
					optionRules.WriteStuCardInfoXLS(optionDataAccess.GetStuInfo(),getPath);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
				}
			}
		}
Example #5
0
		public void InsertTeaInfo(Option option)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					optionDataAccess.InsertTeaInfo(option);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
				}
			}
		}
Example #6
0
		public void InsertMachine(string terminalNumbers,string machineVol)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					optionDataAccess.InsertMachine(terminalNumbers,machineVol);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
				}
			}
		}
Example #7
0
		public int InsertNewStudentForGradeChange(string stuName,int stuGrade,int stuClass,string stuType)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess()  )
			{
				try
				{
					return optionDataAccess.InsertNewStudentForGradeChange(stuName,stuGrade,stuClass,stuType);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return -1;
				}	
			}
		}
Example #8
0
		public int UpdateClassNameByNumber(string getGradeNumber,string getClassNumber,string getClassName)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess() )
			{
				try
				{
					return optionDataAccess.UpdateClassNameByNumber(getGradeNumber,getClassNumber,getClassName);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return -1;
				}
			}
		}
Example #9
0
		public int UpdateGradeInfo(string getOriNumber,string getChNumber,string getChName,string getChRemark)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.UpdateGradeInfo(getOriNumber,getChNumber,getChName,getChRemark);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}	
Example #10
0
		public bool ExecuteKillSysdbProcesses()
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					optionDataAccess.KillSysdbProcesses();
					return true;
				}
				catch(Exception ex)
				{
					Util.WriteLog(ex.Message,Util.EXCEPTION_LOG_TITLE);
					return false;
				}
			}
		}
Example #11
0
		public DataSet GetMachine()
		{	
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.GetMachine();
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}
			}
		}	
Example #12
0
		public bool ExecuteRestoreDiff(string root)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					optionDataAccess.ExecuteRestoreDiff(root);
					return true;
				}
				catch(Exception ex)
				{
					Util.WriteLog(ex.Message,Util.EXCEPTION_LOG_TITLE);
					return false;
				}
			}
		}
Example #13
0
		public bool AddBackupJob(int type,string root)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					optionDataAccess.AddBackupJob(type,root);
					return true;
				}
				catch(Exception ex)
				{
					Util.WriteLog(ex.Message,Util.EXCEPTION_LOG_TITLE);
					return false;
				}
			}
		}
Example #14
0
 public string GetBackupPath()
 {
     var backupPath = string.Empty;
     using (OptionDataAccess optionDataAccess = new OptionDataAccess())
     {
         try
         {
             backupPath = optionDataAccess.GetBackupPath();
         }
         catch (Exception ex)
         {
             Util.WriteLog(ex.Message, Util.EXCEPTION_LOG_TITLE);
         }
         return backupPath;
     }
 }
Example #15
0
		public int DeleteClassInfo(string getOriClassNumber,string getOriGradeNumber)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.DeleteClassInfo(getOriClassNumber,getOriGradeNumber);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #16
0
		public DataTable GetClassNumberList(string getGradeNumber)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess() )
			{
				try
				{
					return optionDataAccess.GetClassNumberList(getGradeNumber);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}
			}
		}
Example #17
0
		private int UpdateStudentInfo(Option option)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.UpdateStudentInfo(option);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #18
0
		public bool UpdateStudentForGradeChange(string getName,int getGrade,int getClass,string getType)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess()  )
			{
				bool rtnValue = false;
				try
				{
					int isStudentExisits = optionDataAccess.UpdateStudentForGradeChange(getName,getGrade,getClass,getType);

					if ( isStudentExisits != 0 ) rtnValue = true;
					else rtnValue = false;
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					rtnValue = false;
				}

				return rtnValue;
			}
		}
Example #19
0
		public int UpdateTeaInfo(string getID,string getName,string getNumber,string getDept,string getDuty,string getGender)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.UpdateTeaInfo(getID,getName,getNumber,getDept,getDuty,getGender);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #20
0
		public DataTable GetStuNameByNumber(string stuNumber)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess()  )
			{
				try
				{
					return optionDataAccess.GetStuNameByNumber(stuNumber);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}	
			}
		}
Example #21
0
		public int UpdateTeaCardInfo(string getID,string getNumber,int getSeq,DateTime getDate)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.UpdateTeaCardInfo(getID,getNumber,getSeq,getDate);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #22
0
		public int InsertStuInfo(Option option)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.InsertStuInfo(option);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #23
0
		public int DeleteTeaCardInfo(string getID,int getSeq)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.DeleteTeaCardInfo(getID,getSeq);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #24
0
		public int InsertMachine(string getAddr,string getType,string getVol)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.InsertMachine(getAddr,getType,getVol);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return -1;
				}
			}
		}
Example #25
0
		public int UpdateMachineInfo(int getOriMachineAddr,int getOriMachineType,int getChMachineAddr,int getChMachineType,int getChMachineVol)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.UpdateMachineInfo(getOriMachineAddr,getOriMachineType,getChMachineAddr,getChMachineType,getChMachineVol);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);

					if ( e.Message.IndexOf("重复键") > 0 )
						return -1;
					else
						return 0;
				}
			}
		}
Example #26
0
		public DataSet GetTeaBasicInfo(string getDept,string getDuty,string getName,string getNumber)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.GetTeaBasicInfo(getDept,getDuty,getName,getNumber);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return null;
				}
			}
		}
Example #27
0
		public int DeleteMachineInfo(int getMachineAddr,int getMachineType)
		{
			using (OptionDataAccess optionDataAccess = new OptionDataAccess())
			{
				try
				{
					return optionDataAccess.DeleteMachineInfo(getMachineAddr,getMachineType);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #28
0
		public int InsertNewAddCardInfo(string getNumber,string getCardNumber,string getHolder,DateTime getSendDate)
		{
			using ( OptionDataAccess optionDataAccess = new OptionDataAccess() )
			{
				try
				{
					return optionDataAccess.InsertNewAddCardInfo(getNumber,getCardNumber,getHolder,getSendDate);
				}
				catch(Exception e)
				{
					Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
					return 0;
				}
			}
		}
Example #29
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 "班级号码应该为数字!";
				}
			}
		}