コード例 #1
0
ファイル: OptionSystem.cs プロジェクト: zesus19/c4.v2.T
		public OptionSystem()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
			option = new Option();
			optionRules = new OptionRules();
		}
コード例 #2
0
ファイル: OptionsForm.cs プロジェクト: zesus19/c4.v2
		public OptionsForm(Login loginForm)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			option = new Option();

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&!Thread.CurrentPrincipal.IsInRole("保健")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_ComPortSet.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_AutoSendSmsTimeSet.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage2.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage3.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_BatchCreate.PageVisible = false;
			}

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower()!="admin")
			{
				xtraTabPage_TerminalServ.PageVisible = false;
			}

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower()!="admin")
			{
				xtraTabPage4.PageVisible = false;
			}

			if (Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				comboBoxEdit_BatchCreate_Load.Properties.Items.Remove("学生信息表(复杂)");
			}

			loadUserStyleProfile();
			this.loginForm = loginForm;

			//this.tbxUploadUrl.Text = "http://xdd.xindoudou.cn/2/partner/sync";

            this.tbxUploadUrl.Text = "http://";

			optionSystem = new OptionSystem();

		}
コード例 #3
0
ファイル: OptionSystem.cs プロジェクト: zesus19/c4.v2.T
		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);
				}
			}
		}
コード例 #4
0
ファイル: OptionSystem.cs プロジェクト: zesus19/c4.v2.T
		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;
				}
			}
		}
コード例 #5
0
ファイル: OptionSystem.cs プロジェクト: zesus19/c4.v2.T
		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;
				}
			}
		}
コード例 #6
0
ファイル: OptionSystem.cs プロジェクト: zesus19/c4.v2.T
		public int CheckStuValidation(Option option)
		{
			try
			{
				if ( Convert.ToInt32(option.StuNumber) <= 1100 || Convert.ToInt32(option.StuNumber) > 8999  || Convert.ToInt32(option.StuNumber)%100 > 70 )
					return -2;
				else if ( option.StuBirthday > option.StuEnterDate )
					return -2;
				else if ( !option.StuEntryStatus.Replace(" ","").Equals("全托") && !option.StuEntryStatus.Replace(" ","").Equals("日托") )
					return -2;
				else if ( !option.StuGender.Trim().Equals("男") && !option.StuGender.Trim().Equals("女") )
					return -2;
				else
					return UpdateStudentInfo(option);
			}
			catch
			{
				return -3;
			}
		}
コード例 #7
0
ファイル: OptionsForm.cs プロジェクト: zesus19/c4.v2.T
		public OptionsForm(Login loginForm)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			option = new Option();

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&!Thread.CurrentPrincipal.IsInRole("保健")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_ComPortSet.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_AutoSendSmsTimeSet.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage2.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage3.PageVisible = false;
			}

			if(Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				xtraTabPage_BatchCreate.PageVisible = false;
			}

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower()!="admin")
			{
				xtraTabPage_TerminalServ.PageVisible = false;
			}

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&Thread.CurrentPrincipal.Identity.Name.ToLower()!="admin")
			{
				xtraTabPage4.PageVisible = false;
			}

			if (Thread.CurrentPrincipal.Identity.Name.ToLower() != "admin")
			{
				comboBoxEdit_BatchCreate_Load.Properties.Items.Remove("学生信息表(复杂)");
			}

			loadUserStyleProfile();
			this.loginForm = loginForm;
            


			this.tbxUploadUrl.Text = "http://xdd.xindoudou.cn/2/partner/sync";

			optionSystem = new OptionSystem();

            gridControl1.DataSource = new CameraSystem().GetCameraInfo();
            var machineSet = new MachineSystem().GetMachineAddrList();
            if (machineSet != null && machineSet.Tables.Count >= 1)
            {
                foreach (DataRow item in machineSet.Tables[0].Rows)
                {
                    repositoryItemComboBox4.Items.Add(string.Format("{0}号门口机", item["machine_address"]));
                }
            }
		}
コード例 #8
0
ファイル: OptionDataAccess.cs プロジェクト: zesus19/c4.v2.T
		public OptionDataAccess()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			option = new Option();
		}
コード例 #9
0
ファイル: OptionDataAccess.cs プロジェクト: zesus19/c4.v2.T
		public void InsertTeaInfo(Option option)
		{
			insertTeaInfoCommand = "InsertTeaInfo_BatchCreate";
			dbCommandWrapper = dbForBatchCreate.GetStoredProcCommandWrapper(insertTeaInfoCommand);
			dbCommandWrapper.AddInParameter("@getID",DbType.String,option.TeaID);
			dbCommandWrapper.AddInParameter("@getNumber",DbType.String,option.TeaNumber);
			dbCommandWrapper.AddInParameter("@getName",DbType.String,option.TeaName);
			dbCommandWrapper.AddInParameter("@getGender",DbType.String,option.TeaGender);
			dbCommandWrapper.AddInParameter("@getPhone",DbType.String,option.TeaOfficePhone);
			dbCommandWrapper.AddInParameter("@getDept",DbType.String,option.TeaDept);
			dbCommandWrapper.AddInParameter("@getDuty",DbType.String,option.TeaDuty);
			dbCommandWrapper.AddInParameter("@getAuthority",DbType.String,option.TeaAuthority);
			dbForBatchCreate.ExecuteNonQuery(dbCommandWrapper);
		}
コード例 #10
0
ファイル: OptionDataAccess.cs プロジェクト: zesus19/c4.v2.T
 public void InsertStuParentInfo(Option option)
 {
     insertStuInfoCommand = "InsertStuParentInfo";
     dbCommandWrapper = dbForBatchCreate.GetStoredProcCommandWrapper(insertStuInfoCommand);
     dbCommandWrapper.AddInParameter("@info_stuBasicID", DbType.String, option.StuID);
     dbCommandWrapper.AddInParameter("@info_stuFatherName", DbType.String, option.StuParent1);
     dbCommandWrapper.AddInParameter("@info_stuFatherLinkPhone", DbType.String, option.StuParent1_Phone);
     dbCommandWrapper.AddInParameter("@info_stuFatherWorkPlace", DbType.String, string.Empty);
     dbCommandWrapper.AddInParameter("@info_stuMotherName", DbType.String, option.StuParent2);
     dbCommandWrapper.AddInParameter("@info_stuMotherLinkPhone", DbType.String, option.StuParent2_Phone);
     dbCommandWrapper.AddInParameter("@info_stuMotherWorkPlace", DbType.String, string.Empty);
     dbForBatchCreate.ExecuteNonQuery(dbCommandWrapper);
 }
コード例 #11
0
ファイル: OptionDataAccess.cs プロジェクト: zesus19/c4.v2.T
		public int InsertStuInfo(Option option)
		{
			insertStuInfoCommand = "InsertStuInfo_BatchCreate";
			dbCommandWrapper = dbForBatchCreate.GetStoredProcCommandWrapper(insertStuInfoCommand);
			dbCommandWrapper.AddInParameter("@getID",DbType.String,option.StuID);
			dbCommandWrapper.AddInParameter("@getGrade",DbType.String,option.StuGrade);
			dbCommandWrapper.AddInParameter("@getGradeName",DbType.String,option.GradeName);
			dbCommandWrapper.AddInParameter("@getGradeRemark",DbType.String,option.GradeRemark);
			dbCommandWrapper.AddInParameter("@getClass",DbType.String,option.StuClass);
			dbCommandWrapper.AddInParameter("@getClassName",DbType.String,option.ClassName);
			dbCommandWrapper.AddInParameter("@getName",DbType.String,option.StuName);
			dbCommandWrapper.AddInParameter("@getNumber",DbType.String,option.StuNumber);
			dbCommandWrapper.AddInParameter("@getBirthday",DbType.DateTime,option.StuBirthday);
			dbCommandWrapper.AddInParameter("@getGender",DbType.String,option.StuGender);
			dbCommandWrapper.AddInParameter("@getType",DbType.String,option.StuEntryStatus);
			dbCommandWrapper.AddInParameter("@getEmail",DbType.String,option.StuEmail);
			dbCommandWrapper.AddInParameter("@getPhone",DbType.String,option.StuPhone);
			dbCommandWrapper.AddInParameter("@getAddr",DbType.String,option.StuFamilyAddr);
			dbCommandWrapper.AddInParameter("@getZipCode",DbType.String,option.StuZipCode);
			dbCommandWrapper.AddInParameter("@getEnterDate",DbType.DateTime,option.StuEnterDate);
			dbCommandWrapper.AddOutParameter("@rowsAffected",DbType.Int32,4);
			dbForBatchCreate.ExecuteNonQuery(dbCommandWrapper);
			return Convert.ToInt32(dbCommandWrapper.GetParameterValue("@rowsAffected"));
		}