示例#1
0
        private void FrmDeptRpt_Load(object sender, EventArgs e)
        {
            this.cB_style.SelectedIndex = 0;
            this.cB_type.SelectedIndex  = 0;
            this.cbPerson.SelectedIndex = type;
            //this.BindData();
            DataSet_Rpt dsr = new DataSet_Rpt();

            HIS.ZY_BLL.CostItemStyle cis = this.cB_style.SelectedIndex == 0 ? HIS.ZY_BLL.CostItemStyle.记账日期 : HIS.ZY_BLL.CostItemStyle.结帐日期;
            HIS.ZY_BLL.CostItemType  cit = this.cB_type.SelectedIndex == 0 ? HIS.ZY_BLL.CostItemType.发票项目 : HIS.ZY_BLL.CostItemType.核算项目;
            dsr.DeptCostTotal_Rpt_AddCol(cit);

            //dsr.BindDeptItemData(this.dtp_Bdate.Value, this.dtp_Edate.Value, cis, cit);
            Dept_dt = (DataTable)dsr.DeptCostTotal_Rpt;
            this.dgv_Fee.DataSource        = Dept_dt;
            this.dgv_Fee.Columns[0].Frozen = true;
            this.dgv_Fee.Columns[1].Frozen = true;
            this.dgv_Fee.Columns[2].Frozen = true;
            for (int i = 2; i < dgv_Fee.Columns.Count; i++)
            {
                dgv_Fee.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            }
            if (type == 2)
            {
                this.dgv_Fee.Columns[0].Visible = false;
            }
        }
示例#2
0
        private void BindData()
        {
            DataSet_Rpt dsr = new DataSet_Rpt();

            HIS.ZY_BLL.CostItemStyle cis = this.cB_style.SelectedIndex == 0 ? HIS.ZY_BLL.CostItemStyle.记账日期 : HIS.ZY_BLL.CostItemStyle.结帐日期;
            HIS.ZY_BLL.CostItemType  cit = this.cB_type.SelectedIndex == 0 ? HIS.ZY_BLL.CostItemType.发票项目 : HIS.ZY_BLL.CostItemType.核算项目;
            dsr.PatCostTotal_Rpt_AddCol(cit);
            bool   IsIn     = this.cb_pattype.SelectedIndex == 0 ? true : false;
            string DeptCode = null;

            if (this.checkBox1.Checked)
            {
                DeptCode = ((DataRowView)this.cB_dept.SelectedValue).Row["code"].ToString().Trim();
            }
            DateTime?Bdate = null;
            DateTime?Edate = null;

            if (!IsIn)
            {
                Bdate = this.dtp_Bdate.Value;
                Edate = this.dtp_Edate.Value;
            }
            dsr.BindPatItemData(IsIn, DeptCode, Bdate, Edate, cis, cit);
            Pat_dt = (DataTable)dsr.PatCostTotal_Rpt;
            this.dgv_Fee.DataSource         = Pat_dt;
            this.dgv_Fee.Columns[0].Frozen  = true;
            this.dgv_Fee.Columns[1].Frozen  = true;
            this.dgv_Fee.Columns[2].Frozen  = true;
            this.dgv_Fee.Columns[3].Frozen  = true;
            this.dgv_Fee.Columns[1].Visible = false;
            for (int i = 3; i < dgv_Fee.Columns.Count; i++)
            {
                dgv_Fee.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            }
        }
示例#3
0
        private void BindData()
        {
            DataSet_Rpt dsr = new DataSet_Rpt();

            HIS.ZY_BLL.CostItemStyle cis = this.cB_style.SelectedIndex == 0 ? HIS.ZY_BLL.CostItemStyle.记账日期 : HIS.ZY_BLL.CostItemStyle.结帐日期;

            HIS.ZY_BLL.CostItemType cit = HIS.ZY_BLL.CostItemType.发票项目;
            if (this.cB_type.SelectedIndex == 0)
            {
                cit = HIS.ZY_BLL.CostItemType.发票项目;
            }
            else if (this.cB_type.SelectedIndex == 1)
            {
                cit = HIS.ZY_BLL.CostItemType.核算项目;
            }
            else if (this.cB_type.SelectedIndex == 2)
            {
                cit = HIS.ZY_BLL.CostItemType.会计项目;
            }
            //if(cit)
            dsr.DeptCostTotal_Rpt_AddCol(cit);

            dsr.BindDeptItemData(type, this.dtp_Bdate.Value, this.dtp_Edate.Value, cis, cit);
            Dept_dt = (DataTable)dsr.DeptCostTotal_Rpt;

            this.dgv_Fee.DataSource        = Dept_dt;
            this.dgv_Fee.Columns[0].Frozen = true;
            this.dgv_Fee.Columns[1].Frozen = true;
            this.dgv_Fee.Columns[2].Frozen = true;
            for (int i = 2; i < dgv_Fee.Columns.Count; i++)
            {
                dgv_Fee.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            }
            if (type == 2)
            {
                this.dgv_Fee.Columns[0].Visible = false;
            }
        }