コード例 #1
0
ファイル: Finan2Details.cs プロジェクト: zesus19/c4.v2.T
		public void Finan2Details_Load(object sender, EventArgs e)
		{		
			if (IsModify)
			{
				txtTemplateName.Text = TemplateName;
				DataTable dtTempalteContents = new FinanInfoSystem().GetTemplateContents(TemplateName);
				if (dtTempalteContents != null && dtTempalteContents.Rows.Count != 0)
				{
					TemplateContents = dtTempalteContents;
					TemplateContents.Columns["name"].ColumnName = "费用名";
					TemplateContents.Columns["grade"].ColumnName = "指定年级";
					TemplateContents.Columns["class"].ColumnName = "指定班级";
					费用名.FieldName = "费用名";
					指定年级.FieldName = "指定年级";
					指定班级.FieldName = "指定班级";
					TemplateContents.PrimaryKey = new DataColumn[]{TemplateContents.Columns["费用名"], 
																	  TemplateContents.Columns["指定年级"], TemplateContents.Columns["指定班级"]};
					gridControl1.DataSource = TemplateContents;
				}
				else
				{
					gridControl1.DataSource = TemplateContents;
					MessageBox.Show("您指定的模板不存在,您现在可以添加一个模板");
				}
			}
			else
			{
				gridControl1.DataSource = TemplateContents;
			}
		}
コード例 #2
0
ファイル: FinanManagement.cs プロジェクト: zesus19/c4.v2.T
		public FinanManagement()
		{
			// 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();

			#region 帮助
			helpProvider_FinanInfo.HelpNamespace = System.IO.Path.GetDirectoryName(Application.ExecutablePath)
				+ CPTT.SystemFramework.Util.HELP_FILE_NAME;

			this.helpProvider_FinanInfo.SetHelpKeyword(this,"简单财务功能");
			this.helpProvider_FinanInfo.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.KeywordIndex);
			this.helpProvider_FinanInfo.SetHelpString(this, "");
			this.helpProvider_FinanInfo.SetShowHelp(this, true);
			#endregion
		}
コード例 #3
0
ファイル: Finan2Details.cs プロジェクト: zesus19/c4.v2.T
		private void simpleButton1_Click(object sender, System.EventArgs e)
		{
			bool result = new FinanInfoSystem().IsFinanceStatExisted(TemplateName);
			if (result)
			{
				btnAdd.Enabled = false;
				btnDelete.Enabled = false;
				MessageBox.Show("该模板正在使用,添加或删除操作都会影响数据的完整性,我们建议您重新增加一个模板以反映这次使用!");
			}
			else
			{
				gridView1.AddNewRow();
			}
		}
コード例 #4
0
ファイル: FinanManagement2.cs プロジェクト: zesus19/c4.v2.T
		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);
		}