protected override ResultStatus Open() { base.Open(); b30290 = new B30290(_ProgramID); //生效日期下拉選單 YMDlookUpEdit.SetDataTable(b30290.GetEffectiveYMD(emDate.Text).Clone(), "YMD", "YMD", DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor, ""); emDate.Text = b30290.LastQuarter(GlobalInfo.OCF_DATE); //計算日期Leave事件綁定 this.emDate.Leave += new System.EventHandler(this.emDate_Leave); //生效日期下拉選單事件綁定 this.YMDlookUpEdit.Properties.EditValueChanged += new System.EventHandler(this.YMDlookUpEdit_Properties_EditValueChanged); return(ResultStatus.Success); }
public void LastQuarterTest() { string ymd = b30290.LastQuarter(new DateTime(2018, 10, 11)); Assert.AreEqual("2018/09/28", ymd); }