コード例 #1
0
ファイル: RestoreForm.cs プロジェクト: zesus19/c4.v2.T
		public RestoreForm(Login login)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//

			optionSystem = new OptionSystem();
			this.login = login;

			Login.COM_PORT_IS_BUSY = true;
		}
コード例 #2
0
ファイル: OptionsForm.cs プロジェクト: zesus19/c4.v2
 private static void DoBackupPeriodically(object state)
 {
     backupTimer.Change(Timeout.Infinite, Timeout.Infinite);
     var path = new OptionSystem().GetBackupPath();
     if (!string.IsNullOrEmpty(path))
     {
         string root = path.Substring(0, path.IndexOf(".scb")) + ".sdib";
         new OptionSystem().ExecuteBackupDiff(root);
     }
     backupTimer.Change(60 * 1000, Timeout.Infinite);
 }
コード例 #3
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();

		}
コード例 #4
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"]));
                }
            }
		}
コード例 #5
0
		private void btmSearch_Click(object sender, System.EventArgs e)
		{
			DataTable dtStuName = new OptionSystem().GetStuNameByNumber(tetNumber.Text);

			if ( dtStuName != null )
			{
				if ( dtStuName.Rows.Count > 0 ) tetName.Text = dtStuName.Rows[0]["info_stuName"].ToString();
				else MessageBox.Show("该学号学生不存在!");
			}
		}