C1flexgrid格式化

  this.c1FlexGrid1.DataSource = BLL_Pos_InOutMoney.PosInOutMoneyQuery(computer, payKind, inoutType, oprtid, dptid, start, end).Tables[0];
                c1FlexGrid1.Cols["收入"].Format = string.Format("C");
                c1FlexGrid1.Cols["支出"].Format = string.Format("C");

                C1AfterFilterSum();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "错误");
            }
            finally
            {
                JC.Common.LogHelper.WriteLog(App.消费系统, WorkLevel.中, this.Text, "查询资金收支明细数据");
            }
        }

        private void C1AfterFilterSum()
        {
            C1FlexGridHelper.SetGridNum(c1FlexGrid1);
            c1FlexGrid1.Tree.Column = 1;

            c1FlexGrid1.Subtotal(AggregateEnum.Sum, 0, -1, 7, "总计:");
            c1FlexGrid1.Subtotal(AggregateEnum.Sum, 0, -1, 8, "");

            c1FlexGrid1.AutoSizeCols();
        }
        private void c1FlexGrid1_AfterFilter(object sender, EventArgs e)
        {
            C1AfterFilterSum();
        }

        private void btnOkCount_Click(object sender, EventArgs e)
        {
            if (!AppFunForPfOprt.PubCheckOprtNoFunRight(26041004, true, false))
                return;
            try
            {

                BLL_Pos_InOutMoney.SelectCondition condition = GetQueryCondition();

                int itemIndex = this.cboCountType.SelectedIndex;

                c1FlexGrid2.Subtotal(AggregateEnum.Clear);
                c1FlexGrid2.DataSource = null;
                c1FlexGrid2.Clear();
                this.c1FlexGrid2.BeginUpdate();

 

posted @ 2012-06-11 10:40  念余温  阅读(929)  评论(0编辑  收藏  举报