예제 #1
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;
            }
        }
예제 #2
0
        private void FrmPatientRpt_Load(object sender, EventArgs e)
        {
            //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.PatCostTotal_Rpt_AddCol(cit);

            //dsr.BindDeptItemData(this.dtp_Bdate.Value, this.dtp_Edate.Value, 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;
            }
        }