-
팀 상태 변경 시 ViewTermStatusChange 처리 예제업무용 소스 예제 2021. 9. 6. 10:07728x90반응형728x90
팀 상태 변경 시 ViewTermStatusChange 처리 예제
private void ViewTermStatusChange() { if (this.blnViewTermTF) { btnViewTermTF.Text = "월간"; this.dtpEndDate.Visible = true; this.btnPrev.Visible = false; this.btnNext.Visible = false; this.btnToday.Visible = false; } else { btnViewTermTF.Text = "기간"; this.dtpEndDate.Visible = false; this.btnPrev.Visible = true; this.btnNext.Visible = true; this.btnToday.Visible = true; } switch (this.preNextTerm) { case PreNextTermDiv.TermOneDay: case PreNextTermDiv.TermOneWeek: this.dtpStartDate.Properties.DisplayFormat.FormatString = "yyyy-MM-dd"; this.dtpStartDate.Properties.EditFormat.FormatString = "yyyy-MM-dd"; break; case PreNextTermDiv.TermOneMonth: case PreNextTermDiv.TermThreeMonth: this.dtpStartDate.Properties.DisplayFormat.FormatString = "yyyy년 MM월"; this.dtpStartDate.Properties.EditFormat.FormatString = "yyyy년 MM월"; break; case PreNextTermDiv.TermOneYear: this.dtpStartDate.Properties.DisplayFormat.FormatString = "yyyy년"; this.dtpStartDate.Properties.EditFormat.FormatString = "yyyy년"; break; default: this.dtpStartDate.Properties.DisplayFormat.FormatString = "yyyy-MM-dd"; this.dtpStartDate.Properties.EditFormat.FormatString = "yyyy-MM-dd"; break; } if (this.blnCustomFormatUseTF) { this.dtpStartDate.Properties.DisplayFormat.FormatString = this.strCusTomFormat; this.dtpStartDate.Properties.EditFormat.FormatString = this.strCusTomFormat; } this.dtpEndDate.Properties.DisplayFormat.FormatString = "~" + this.dtpStartDate.Properties.DisplayFormat.FormatString; this.dtpEndDate.Properties.EditFormat.FormatString = "~" + this.dtpStartDate.Properties.EditFormat.FormatString; if (this.blnisEvent) { if (DateValueChanged != null) DateValueChanged(); if (DateValueChanged2 != null) DateValueChanged2(this, new EventArgs()); } } public string SetCustomFormat { get { return this.strCusTomFormat; } set { this.strCusTomFormat = value; this.ChangeViewTermButton(); } } public bool SetCustomFormatUseTF { get { return this.blnCustomFormatUseTF; } set { this.blnCustomFormatUseTF = value; this.ChangeViewTermButton(); } } public DateTime SetEndDate { set { this.blnisEvent = false; this.dtpEndDate.DateTime = value; this.blnisEvent = this.blnLoadTF; } } public bool SetEnterToTabTF { get { return this.blnEnterToTabTF; } set { this.blnEnterToTabTF = value; } } public DateTime SetStartDate { set { this.blnisEvent = false; this.dtpStartDate.DateTime = value; this.blnisEvent = this.blnLoadTF; } }
728x90반응형'업무용 소스 예제' 카테고리의 다른 글
시스템 상태 알람 경보 Set 예제 (2) 2021.09.17 gridScheduleView_DoubleClick 그리드 더블클릭 시 처리 예제 (3) 2021.09.11 근태현황 관리 소스 예제 (3) 2021.09.01 학원관리 Lesson_Schedule 관리 예제 소스 (1) 2021.08.23 DB PhotoSelect 관련 예제 소스 (3) 2021.08.23