Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
		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();

		}
Ejemplo n.º 4
0
		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"]));
                }
            }
		}
Ejemplo n.º 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("该学号学生不存在!");
			}
		}