Esempio n. 1
0
		public StuValidationCheck()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
			students = new Students();
			getStuInfoByCondition = new GetStuInfoByCondition();
		}
Esempio n. 2
0
		public StuBaseInfoPrintSystem()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
			students = new Students();
			stuBaseInfoPrintRules = new StuBaseInfoPrintRules();
		}
Esempio n. 3
0
		public void InsertStuBasicInfo(Students students)
		{
			insertStuBasicInfoCommand = "InsertStuBasicInfo";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(insertStuBasicInfoCommand);
			dbCommandWrapper.AddInParameter("@info_stuID",DbType.String,students.StuGuid);
			dbCommandWrapper.AddInParameter("@info_stuName",DbType.String,students.Name);
			dbCommandWrapper.AddInParameter("@info_stuGrade",DbType.String,students.Grade);
			dbCommandWrapper.AddInParameter("@info_stuClass",DbType.String,students.Class);
			dbCommandWrapper.AddInParameter("@info_stuNumber",DbType.String,students.Number);
			dbCommandWrapper.AddInParameter("@info_stuGender",DbType.String,students.Gender);
			dbCommandWrapper.AddInParameter("@info_stuBirthday",DbType.DateTime,students.Birthday);
			dbCommandWrapper.AddInParameter("@info_stuEntryStatus",DbType.String,students.EntryStatus);
			dbCommandWrapper.AddInParameter("@info_stuEntryDate",DbType.DateTime,students.EntryDate);
			dbAccess.ExecuteNonQuery(dbCommandWrapper);
		}
Esempio n. 4
0
		public void DeleteStuParentInfo(Students students)
		{
			deleteStuParentInfoCommand = "DeleteStudent_ParentInfo";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(deleteStuParentInfoCommand);
			dbCommandWrapper.AddInParameter("@info_stuBasicID",DbType.String,students.StuGuid);
			dbAccess.ExecuteNonQuery(dbCommandWrapper);
		}
Esempio n. 5
0
		public void UpdateStuParentInfo(Students students)
		{
			updateStuParentInfoCommand = "UpdateStudent_ParentInfo";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(updateStuParentInfoCommand);
			dbCommandWrapper.AddInParameter("@info_stuBasicID",DbType.String,students.StuGuid);
			dbCommandWrapper.AddInParameter("@info_stuFatherName",DbType.String,students.FatherName);
			dbCommandWrapper.AddInParameter("@info_stuFatherLinkPhone",DbType.String,students.FatherPhone);
			dbCommandWrapper.AddInParameter("@info_stuFatherWorkPlace",DbType.String,students.FatherWorkPlace);
			dbCommandWrapper.AddInParameter("@info_stuMotherName",DbType.String,students.MotherName);
			dbCommandWrapper.AddInParameter("@info_stuMotherLinkPhone",DbType.String,students.MotherPhone);
			dbCommandWrapper.AddInParameter("@info_stuMotherWorkPlace",DbType.String,students.MotherWorkPlace);
			dbAccess.ExecuteNonQuery(dbCommandWrapper);
		}
Esempio n. 6
0
		public void UpdateStuDetailInfo(Students students)
		{
			updateStuDetailInfoCommand = "UpdateStudent_DetailInfo";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(updateStuDetailInfoCommand);
			dbCommandWrapper.AddInParameter("@info_stuBasicID",DbType.String,students.StuGuid);
			dbCommandWrapper.AddInParameter("@info_stuRegNote",DbType.String,students.RegNote);
			dbCommandWrapper.AddInParameter("@info_stuOrigin",DbType.String,students.Origin);
			dbCommandWrapper.AddInParameter("@info_stuNationality",DbType.String,students.Nationality);
			dbCommandWrapper.AddInParameter("@info_stuNative",DbType.String,students.Native);
			dbCommandWrapper.AddInParameter("@info_stuJieDao",DbType.String,students.JieDao);
			dbCommandWrapper.AddInParameter("@info_stuLiWei",DbType.String,students.LiWei);
			dbCommandWrapper.AddInParameter("@info_stuFamilyAddr",DbType.String,students.FamilyAddr);
			dbCommandWrapper.AddInParameter("@info_stuHuKouAddr",DbType.String,students.HuKouAddr);
			dbCommandWrapper.AddInParameter("@info_stuZipCode",DbType.String,students.ZipCode);
			dbCommandWrapper.AddInParameter("@info_stuSickHistory",DbType.String,students.SickHistory);
			dbCommandWrapper.AddInParameter("@info_stuEMailAddr",DbType.String,students.EMail);
			dbCommandWrapper.AddInParameter("@info_stuBankID",DbType.String,students.BankID);
			dbCommandWrapper.AddInParameter("@info_stuGraphLocation",DbType.Binary,students.GraphLocation);
			dbAccess.ExecuteNonQuery(dbCommandWrapper);
		}
Esempio n. 7
0
		public StudentBaseInfo()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call
			getStuInfoByCondition = new GetStuInfoByCondition();
			stuValidationCheck = new StuValidationCheck();
			students = new Students();
			stuBaseInfoPrintSystem = new StuBaseInfoPrintSystem();
			rolesSystem = new RolesSystem();

			#region 帮助
			this.helpProvider_StuBaseInfo.HelpNamespace = System.IO.Path.GetDirectoryName(Application.ExecutablePath)
				+ CPTT.SystemFramework.Util.HELP_FILE_NAME;

			this.helpProvider_StuBaseInfo.SetHelpKeyword(this.xtraTabControl_StuBaseInfo,"学生基本信息管理");
			this.helpProvider_StuBaseInfo.SetHelpNavigator(this.xtraTabControl_StuBaseInfo, System.Windows.Forms.HelpNavigator.KeywordIndex);
			this.helpProvider_StuBaseInfo.SetHelpString(this.xtraTabControl_StuBaseInfo, "");
			this.helpProvider_StuBaseInfo.SetShowHelp(this.xtraTabControl_StuBaseInfo, true);
			#endregion
		}
Esempio n. 8
0
		public void StuBaseInfoPrint(Students students,string savePath)
		{
			try
			{
				//创建打印副本
				m_objExcel = new Excel.Application();
				m_objBooks = (Excel.Workbooks)m_objExcel.Workbooks;
				m_objBook = (Excel._Workbook)m_objBooks.Open(excelPath+@"report\StudentBaseInfo.xls",
					m_objOpt,m_objOpt,m_objOpt,m_objOpt,m_objOpt,m_objOpt,m_objOpt,m_objOpt,m_objOpt,
					m_objOpt,m_objOpt,m_objOpt);
				m_objSheets = (Excel.Sheets)m_objBook.Worksheets;

				//获取第一个打印页
				m_objSheet = (Excel._Worksheet)m_objSheets.get_Item(1);

				if ( NPrintPicture() )
				{
					m_objPictures = (Excel.Pictures)m_objSheet.Pictures(m_objOpt);
					m_objPictures.Insert(@"c:\temp.jpg",m_objOpt);
					m_objPicture = (Excel.Picture)m_objPictures.Item(1);

					m_objRange = m_objSheet.get_Range("G8","H15");
					m_objPicture.Left = (double)m_objRange.Left;
					m_objPicture.Top = (double)m_objRange.Top;
					m_objPicture.Width = (double)m_objRange.Width;
					m_objPicture.Height = (double)m_objRange.Height;
				}

				//打印园所名字
				m_objRange = m_objSheet.get_Range("B4",m_objOpt);
				m_objRange.Value = new GardenInfoDataAccess().GetGardenInfo().Tables[0].Rows[0][1].ToString();

				//打印日期
				m_objRange = m_objSheet.get_Range("G40",m_objOpt);
				m_objRange.Value = DateTime.Now.ToString("yyyy-MM-dd");

				//打印学号
				m_objRange = m_objSheet.get_Range("B7",m_objOpt);
				m_objRange.Value = students.Number;

				//打印姓名
				m_objRange = m_objSheet.get_Range("B8",m_objOpt);
				m_objRange.Value = students.Name;

				//打印性别
				m_objRange = m_objSheet.get_Range("D8",m_objOpt);
				m_objRange.Value = students.Gender;

				//打印出生日
				m_objRange = m_objSheet.get_Range("F8",m_objOpt);
				m_objRange.Value = students.EntryDate;

				//打印生源
				m_objRange = m_objSheet.get_Range("B10",m_objOpt);
				m_objRange.Value = students.Origin;

				//打印入托方式
				m_objRange = m_objSheet.get_Range("D10",m_objOpt);
				m_objRange.Value = students.EntryStatus;

				//打印入园日期
				m_objRange = m_objSheet.get_Range("F10",m_objOpt);
				m_objRange.Value = students.EntryDate;

				//打印离园日期
				m_objRange = m_objSheet.get_Range("B12",m_objOpt);
				if ( students.LeaveDate == DateTime.MinValue )
					m_objRange.Value = "";
				else
					m_objRange.Value = students.LeaveDate;

				//打印国籍
				m_objRange = m_objSheet.get_Range("B18",m_objOpt);
				m_objRange.Value = students.Nationality;

				//打印邮编
				m_objRange = m_objSheet.get_Range("D18",m_objOpt);
				m_objRange.Value = students.ZipCode;

				//打印街道
				m_objRange = m_objSheet.get_Range("F18",m_objOpt);
				m_objRange.Value = students.JieDao;

				//打印里委
				m_objRange = m_objSheet.get_Range("F20",m_objOpt);
				m_objRange.Value = students.LiWei;

				//打印籍贯
				m_objRange = m_objSheet.get_Range("B20",m_objOpt);
				m_objRange.Value = students.Native;

				//打印家庭住址
				m_objRange = m_objSheet.get_Range("B22",m_objOpt);
				m_objRange.Value = students.FamilyAddr;

				//打印户口地址
				m_objRange = m_objSheet.get_Range("B24",m_objOpt);
				m_objRange.Value = students.HuKouAddr;

				//打印病史记录
				m_objRange = m_objSheet.get_Range("B26",m_objOpt);
				m_objRange.Value = students.SickHistory;

				//打印父亲姓名
				m_objRange = m_objSheet.get_Range("B31",m_objOpt);
				m_objRange.Value = students.FatherName;

				//打印父亲联系电话
				m_objRange = m_objSheet.get_Range("F31",m_objOpt);
				m_objRange.Value = students.FatherPhone;

				//打印父亲工作地址
				m_objRange = m_objSheet.get_Range("B33",m_objOpt);
				m_objRange.Value = students.FatherWorkPlace;

				//打印母亲姓名
				m_objRange = m_objSheet.get_Range("B35",m_objOpt);
				m_objRange.Value = students.MotherName;

				//打印母亲联系电话
				m_objRange = m_objSheet.get_Range("F35",m_objOpt);
				m_objRange.Value = students.MotherPhone;

				//打印母亲工作地址
				m_objRange = m_objSheet.get_Range("B37",m_objOpt);
				m_objRange.Value = students.MotherWorkPlace;

				m_objBook.SaveAs(savePath, m_objOpt, m_objOpt,
					m_objOpt, m_objOpt, m_objOpt, Excel.XlSaveAsAccessMode.xlNoChange,
					m_objOpt, m_objOpt, m_objOpt, m_objOpt);
				m_objBook.Close(false, m_objOpt, m_objOpt);
				m_objExcel.Quit();

				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objRange);
				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objSheet);
				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objSheets);
				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objBook);
				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objBooks);
				System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objExcel);
				
			}
			catch(Exception e)
			{
				Util.WriteLog(e.Message,Util.EXCEPTION_LOG_TITLE);
			}
			finally
			{
				m_objRange = null;
				m_objSheet = null;
				m_objSheets = null;
				m_objBook = null;
				m_objBooks = null;
				m_objExcel = null;

				GC.Collect();

				KillProcess();
			}
		}