saverecord.cs

来自「为湖北省教委、湖北省就业指导中心订做的学历查询系统」· CS 代码 · 共 56 行

CS
56 行
字号
using System;
using www.kcgx.com.Database;


namespace WindowsApplication3
{
	/// <summary>
	/// 查询结果存储类
	/// 吴隐峰
	/// </summary>
	public class SaveRecord
	{
		private DBAgent db = new DBAgent( );
		private People m_savePeople;
		

		public SaveRecord( People peo)
		{
			db.InitConnectionPool(@"Provider=vfpoledb.1;Data Source=VerifyStore\" , 1);
			m_savePeople = peo;
		}

		public bool Save( )
		{
			string user = Form2.adm.Name;
			string czsj= DateTime.Now.ToShortDateString( );
			bool tempPass = InputData.stuState ;
			string conclusion = "";
			if ( tempPass )
			{
				conclusion = "审核无误";
			}
			else
			{
				conclusion = "查无此人";
			}
			string conTwo ="毕业";
			string str = "INSERT INTO education ( xm,xb,csrq,pycc,xxxs,xz,yxmc,zymc,bjyjl,rxrq,byrq,zsbh,manager,czrq,shjg ) VALUES( '" + m_savePeople.Name + "','" + m_savePeople.Sex + "','" + m_savePeople.Birthday + "','" + m_savePeople.ClassOfStudent + "','" + m_savePeople.Diploma + "','" + m_savePeople.SystemOfEducation + "','" + m_savePeople.School + "','" + m_savePeople.Specialty + "','" + conTwo + "','" + m_savePeople.EnrollmentTime + "','" +  m_savePeople.GraduationTime + "','" + m_savePeople.DiplomaID + "','" + user + "','" + czsj +"','"+conclusion+ "')";
			try
			{
				int result = db.ExecuteCommandNonQuery( str );
				if ( result == 0 )
				{
					return false;
				}
			}
			catch(Exception ee )
			{
				string gg = ee.Message;
				return false;
			}
			return true;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?