Esempio n. 1
0
		private void repositoryItemComboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			int i = gridView1.GetSelectedRows()[0];
			repositoryItemComboBox2.Items.Clear();
			DevExpress.XtraEditors.ComboBoxEdit cbeGrade = (DevExpress.XtraEditors.ComboBoxEdit)sender;
			string grade = cbeGrade.SelectedItem.ToString();
			if (grade.Length != 0  && !grade.Equals("不选择"))
			{
				repositoryItemComboBox2.Items.Add("不选择");
				GetStuInfoByCondition getStuInfoByCondition = new GetStuInfoByCondition();
				string getGradeNumberFromCombo = getStuInfoByCondition.getGradeInfo(
					grade,"").Tables[0].Rows[0][0].ToString();
				foreach(DataRow getClassList in getStuInfoByCondition.getClassInfo("","",
					getGradeNumberFromCombo).Tables[0].Rows)
				{
					repositoryItemComboBox2.Items.AddRange(
						new object[]{getClassList[1].ToString()});
				}
			}
			else 
			{
				if (grade.Equals("不选择"))
				{
					repositoryItemComboBox2.Items.Clear();
					repositoryItemComboBox2.Items.Add("不选择");
				}
			}

			gridView1.SetRowCellValue(i, gridView1.Columns["指定班级"], null);
			gridView1.SetRowCellValue(i, gridView1.Columns["指定年级"], grade);
		}
Esempio n. 2
0
		private void SMSPhoneNumChoose_Load(object sender, System.EventArgs e)
		{
			getStuInfoByCondition = new GetStuInfoByCondition();

			PhoneNum = new SMSInfoSystem().GetAllStuPhoneNum();//学生卡
			PhoneNumView = PhoneNum.Tables[0].DefaultView;

			gridControl2.DataSource = PhoneNumView;

			comboBoxEdit_Send_StuGrade.Properties.Items.Clear();
			comboBoxEdit_Send_StuGrade.Properties.Items.AddRange(new object[]{"全部"});
			comboBoxEdit_Send_StuGrade.SelectedItem = "全部";
			foreach(DataRow getGradeList in getStuInfoByCondition.getGradeInfo("","").Tables[0].Rows)
			{
				comboBoxEdit_Send_StuGrade.Properties.Items.AddRange(
					new object[]{getGradeList[1].ToString()});
			}

		}
Esempio n. 3
0
		public PhoneNum()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call

			getStuInfoByCondition = new GetStuInfoByCondition();

			StuList = new CardInfoSystem().GetStuCardInfoList();//学生卡

			if(Thread.CurrentPrincipal.Identity.Name.ToLower()=="admin")
				return;

			DataSet TeaDept = new RolesSystem().GetRolesDuty(Convert.ToInt32(Thread.CurrentPrincipal.Identity.Name));

			string rowFilter = string.Empty;

			if(!Thread.CurrentPrincipal.IsInRole("园长")
				&&!Thread.CurrentPrincipal.IsInRole("保健"))
			{
				rowFilter = rowFilter + "info_gradeName = '"
					+TeaDept.Tables[0].Rows[0][0].ToString()+"'";
				rowFilter = rowFilter + " and info_className = '"
					+TeaDept.Tables[0].Rows[0][1].ToString()+"'";
			}

			StuView = StuList.Tables[0].DefaultView;
			StuView.RowFilter = rowFilter;

			gridControl1.DataSource = StuView;


			comboBoxEdit_Send_StuGrade.Properties.Items.Clear();
			comboBoxEdit_Send_StuGrade.Properties.Items.AddRange(new object[]{"全部"});
			comboBoxEdit_Send_StuGrade.SelectedItem = "全部";
			foreach(DataRow getGradeList in getStuInfoByCondition.getGradeInfo("","").Tables[0].Rows)
			{
				comboBoxEdit_Send_StuGrade.Properties.Items.AddRange(
					new object[]{getGradeList[1].ToString()});
			}
		}
Esempio n. 4
0
		public FinanManagement2()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call

			getStuInfoByCondition = new GetStuInfoByCondition();
			finanInfoSystem = new FinanInfoSystem();
			finanMgmtInfoPrintSystem = new FinanMgmtInfoPrintSystem();

			dtGrade = getStuInfoByCondition.getGradeInfo("","").Tables[0];

			foreach(DataRow getGradeList in dtGrade.Rows)
			{
				comboBoxEdit_Grade.Properties.Items.AddRange(
					new object[]{getGradeList[1].ToString()});
			}
			comboBoxEdit_Grade.SelectedIndex = 0;

			foreach(DataRow getGradeList in dtGrade.Rows)
			{
				comboBoxEdit_grade2.Properties.Items.AddRange(
					new object[]{getGradeList[1].ToString()});
			}
			comboBoxEdit_grade2.SelectedIndex = 0;


			dateEdit_BalanceMonth.EditValue = DateTime.Now.Date;
			dateEdit_BalanceMonth2.EditValue = DateTime.Now.Date;

			if ( Thread.CurrentPrincipal.Identity.Name.ToLower() == "admin" )
			{
				btnStat.Enabled = false;
				btnSearch.Enabled = false;
				btnReport2.Enabled = false;
			}

			InitTemplate();

			Finan2Details.OnSaveSucceeded += new Finan2Details.SaveSucceedHandler(InitTemplate);
		}