private void btnReport_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { grdFlat.DataSource = ProjReceivableBL.Get_Flat_ReceivableReport(m_iProjectId, dtAson); grdFlatView.PopulateColumns(); grdFlatView.Columns["CostCentreId"].Visible = false; grdFlatView.Columns["FlatId"].Visible = false; grdFlatView.Columns["BlockId"].Visible = false; grdFlatView.Columns["BlockName"].Visible = false; FillFlatGridReport(); grdFlatView.Columns["BlockName"].Group(); PrintableComponentLink Link = new PrintableComponentLink(new PrintingSystem()); Link.Landscape = true; Link.Component = grdFlat; Link.CreateMarginalHeaderArea += Link4_CreateMarginalHeaderArea; Link.CreateMarginalFooterArea += Link_CreateMarginalFooterArea; Link.CreateDocument(); Link.ShowPreview(); grdFlatView.Columns["BlockName"].UnGroup(); grdFlat.DataSource = ProjReceivableBL.Get_Flat_Receivable(m_iProjectId, m_iBlockId, dtAson); grdFlatView.PopulateColumns(); grdFlatView.Columns["FlatId"].Visible = false; FillFlatGrid(); //grdFlatView.Columns["BlockName"].Visible = false; }
public void Fill_Flat_Receivable_WithInterest() { if (grdBlockView.FocusedRowHandle >= 0) { m_sBlockName = grdBlockView.GetFocusedRowCellValue("BlockName").ToString(); grdFlat.DataSource = ProjReceivableBL.Get_Flat_Receivable_WithInterest(m_iProjectId, m_iBlockId, dtAson); grdFlatView.PopulateColumns(); grdFlat.ForceInitialize(); FillFlatGrid(); } }
private void PopulateGrid() { dtFiscal = new DataTable(); dtFiscal.Columns.Add("FYearId", typeof(int)); dtFiscal.Columns.Add("FName", typeof(string)); dtFiscal.Columns.Add("StartDate", typeof(DateTime)); dtFiscal.Columns.Add("EndDate", typeof(DateTime)); DataTable dt = new DataTable(); dt = ProjReceivableBL.GetFiscalMaster(); if (dt.Rows.Count == 0) { for (int j = 0; j < 1; j++) { dtFiscal.Rows.Add(new object[] { 0, "", DateTime.Now, DateTime.Now }); } } DataRow dr; for (int i = 0; i < dt.Rows.Count; i++) { dr = dtFiscal.NewRow(); dr["FYearId"] = dt.Rows[i]["FYearId"]; dr["FName"] = dt.Rows[i]["FName"]; dr["StartDate"] = dt.Rows[i]["StartDate"]; dr["EndDate"] = dt.Rows[i]["EndDate"]; dtFiscal.Rows.Add(dr); } grdFiscal.DataSource = dtFiscal; grdFiscal.ForceInitialize(); grdViewFiscal.PopulateColumns(); grdViewFiscal.Columns["FYearId"].Visible = false; grdViewFiscal.Appearance.HeaderPanel.Font = new Font(grdViewFiscal.Appearance.HeaderPanel.Font, FontStyle.Bold); grdViewFiscal.Appearance.FocusedCell.BackColor = Color.Teal; grdViewFiscal.Appearance.FocusedCell.ForeColor = Color.White; grdViewFiscal.Appearance.FocusedRow.ForeColor = Color.Teal; grdViewFiscal.Appearance.FocusedRow.BackColor = Color.White; grdViewFiscal.OptionsSelection.EnableAppearanceHideSelection = false; grdViewFiscal.BestFitColumns(); }
public void Fill_Block_Receivable() { //if (m_sProjectDB == "") return; grdBlock.DataSource = ProjReceivableBL.Get_Block_Receivable(m_iProjectId, dtAson); grdBlockView.Columns["BlockId"].Visible = false; grdBlockView.Columns["AgreementValue"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["AgreementValue"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["ReceivableAsOn"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["ReceivableAsOn"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["Received"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["Received"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["DueAsOn"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["DueAsOn"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["TotalReceivable"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["TotalReceivable"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["Recv%"].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; grdBlockView.Columns["Recv%"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; grdBlockView.Columns["AgreementValue"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["ReceivableAsOn"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["Received"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["DueAsOn"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["TotalReceivable"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["Recv%"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["AgreementValue"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["ReceivableAsOn"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["Received"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["DueAsOn"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["TotalReceivable"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["Recv%"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; grdBlockView.Columns["AgreementValue"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["AgreementValue"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; grdBlockView.Columns["ReceivableAsOn"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["ReceivableAsOn"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; grdBlockView.Columns["Received"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["Received"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; grdBlockView.Columns["DueAsOn"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["DueAsOn"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; grdBlockView.Columns["TotalReceivable"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["TotalReceivable"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; grdBlockView.Columns["Recv%"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; grdBlockView.Columns["Recv%"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS; BlockCaption.Caption = "BLOCK WISE RECEIVABLE -" + m_sProjectName; grdBlockView.OptionsCustomization.AllowFilter = true; grdBlockView.OptionsBehavior.AllowIncrementalSearch = true; grdBlockView.OptionsView.ShowAutoFilterRow = false; grdBlockView.OptionsView.ShowViewCaption = false; grdBlockView.OptionsView.ShowFooter = true; grdBlockView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect; //grdBlockView.OptionsSelection.InvertSelection = true; grdBlockView.Appearance.HeaderPanel.Font = new Font(grdBlockView.Appearance.HeaderPanel.Font, FontStyle.Bold); grdBlockView.Focus(); grdBlockView.Appearance.FocusedCell.BackColor = Color.Teal; grdBlockView.Appearance.FocusedCell.ForeColor = Color.White; grdBlockView.Appearance.FocusedRow.ForeColor = Color.Black; grdBlockView.Appearance.FocusedRow.BackColor = Color.Teal; grdBlockView.OptionsSelection.EnableAppearanceHideSelection = false; }
private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { grdViewFiscal.FocusedRowHandle = grdViewFiscal.FocusedRowHandle + 1; ProjReceivableBL.InsertFiscalYear(dtFiscal); Close(); }