public ProfitAndLossStatement(String strCompany, String strAddress, FinanceStatisticTime time) { InitializeComponent(); #region UI lblCompanyName.Text = strCompany; lblCompanyAddress.Text = strAddress; CompanyName = strCompany; CompanyAddres = strAddress; Time = time; for (int i = ABCApp.ABCDataGlobal.WorkingDate.Year - 10; i <= ABCApp.ABCDataGlobal.WorkingDate.Year + 10; i++) { cmbYear.Properties.Items.Add(i); } #endregion this.gridView1.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(gridView1_CustomDrawCell); InitInformation(); if (Time.StatisticType == FinanceStatisticType.Year) { cmbYear.EditValue = time.EndDate.Year.ToString(); cmbViewType.SelectedIndex = 0; } if (Time.StatisticType == FinanceStatisticType.Quater) { cmbYear.EditValue = time.EndDate.Year.ToString(); cmbQuater.SelectedIndex = Convert.ToInt32(time.EndDate.Month / 3); cmbViewType.SelectedIndex = 1; } if (Time.StatisticType == FinanceStatisticType.RangeDate) { dtTimeFrom.EditValue = time.StartDate; dtTimeTo.EditValue = time.EndDate; cmbViewType.SelectedIndex = 2; } InvalidateViewType(); LoadData(); }
public CashFlowInDirectStatement(String strCompany, String strAddress, FinanceStatisticTime time) { InitializeComponent(); #region UI lblCompanyName.Text = strCompany; lblCompanyAddress.Text = strAddress; CompanyName = strCompany; CompanyAddres = strAddress; Time = time; if (Time.StatisticType == FinanceStatisticType.Year) { lblTime.Text = "Năm " + Time.StartDate.Year; colCurrent.Caption = "Năm nay"; colPast.Caption = "Năm trước"; } else if (Time.StatisticType == FinanceStatisticType.Quater) { if (Time.StartDate.Month <= 3) { lblTime.Text = "Quý I" + " Năm " + Time.StartDate.Year; } if (4 <= Time.StartDate.Month && Time.StartDate.Month <= 6) { lblTime.Text = "Quý II" + " Năm " + Time.StartDate.Year; } if (7 <= Time.StartDate.Month && Time.StartDate.Month <= 9) { lblTime.Text = "Quý III" + " Năm " + Time.StartDate.Year; } if (10 <= Time.StartDate.Month && Time.StartDate.Month <= 12) { lblTime.Text = "Quý IV" + " Năm " + Time.StartDate.Year; } colCurrent.Caption = "Quý này"; colPast.Caption = "Quý trước"; } else if (Time.StatisticType == FinanceStatisticType.RangeDate) { lblTime.Text = ""; if (Time.StartDate != DateTime.MinValue) { lblTime.Text = "Từ ngày " + Time.StartDate.ToString("dd/MM/yyyy"); } if (Time.EndDate != DateTime.MaxValue) { lblTime.Text += " đến ngày " + Time.EndDate.ToString("dd/MM/yyyy"); } colCurrent.Caption = "Kỳ này"; colPast.Caption = "Kỳ trước"; } #endregion this.gridView1.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(gridView1_CustomDrawCell); InitInformation(); LoadData(); }