public void print(int idFatura)
        {
            FrmReportView frm = new FrmReportView();

            frm.PrintInvoce(idFatura, this);
            frm.Show();
        }
Exemplo n.º 2
0
        private void menuItem_Click(object sender, System.EventArgs e)
        {
            MenuItem  mnu   = (MenuItem)sender;
            DataTable prtTb = new DataTable();

            if (mnu.Text == "打印病区收入")
            {
                prtTb = ((DataTable)dgWard.DataSource).Copy();
            }
            else
            {
                prtTb = ((DataTable)dgPat.DataSource).Copy();
            }

            DataSet ds = new DataSet();

            prtTb.TableName = "tabBqkssr";
            ds.Tables.Add(prtTb);

            FrmReportView frmRptView = null;

            ParameterEx[] _parameters = new ParameterEx[3];

            _parameters[0].Text  = "科室名称";
            _parameters[0].Value = cmbDept.Text;
            _parameters[1].Text  = "开始日期";
            _parameters[1].Value = dtpBegin.Value.ToShortDateString();
            _parameters[2].Text  = "结束日期";
            _parameters[2].Value = dtpEnd.Value.ToShortDateString();

            frmRptView = new FrmReportView(ds, Constant.ApplicationDirectory + "\\report\\ZYHS_病区科室收入.rpt", _parameters);
            frmRptView.Show();
        }
Exemplo n.º 3
0
        private void butdy_Click(object sender, EventArgs e)
        {
            if (rbDqzy.Checked)
            {
                DataTable tb = (DataTable)dataGridView1.DataSource;

                if (tb != null && tb.Rows.Count > 0)
                {
                    //查询条件
                    string rq     = rbDqzy.Text + ":" + this.dtp2.Value.ToString();
                    string swhere = "病人科室:" + cmbDept.Text;

                    ParameterEx[] parameters = new ParameterEx[4];
                    parameters[0].Text  = "报表标题";
                    parameters[0].Value = Constant.HospitalName + "住院病人综合信息";
                    parameters[1].Text  = "时间段";
                    parameters[1].Value = rq;
                    parameters[2].Text  = "其他参数";
                    parameters[2].Value = swhere;
                    parameters[3].Text  = "制表人";
                    parameters[3].Value = FrmMdiMain.CurrentUser.Name;

                    FrmReportView rv = new FrmReportView(tb, Constant.ApplicationDirectory + "\\report\\ZYGL_在院病人信息.rpt", parameters, false);
                    rv.Show();
                }
            }
            else
            {
                MessageBox.Show("只能打印当前在院的病人数据!\r\n其他的暂未提供打印固定格式!");
            }
        }
Exemplo n.º 4
0
        private void butdy_Click(object sender, EventArgs e)
        {
            DataTable yjjTb = (DataTable)dataGridView1.DataSource;

            if (yjjTb != null && yjjTb.Rows.Count > 0)
            {
                //查询条件
                string rq   = (rbJkrq.Checked ? rbJkrq.Text : rbSfrq.Text) + ":" + this.dtp1.Value.ToString() + " 到 " + this.dtp2.Value.ToString();
                string sfy  = "收费员:" + cmbuser.Text.Trim();
                string ks   = "   科室:" + cmbDept.Text.Trim();
                string zffs = "   支付方式:" + cmbZffs.Text;

                string swhere = sfy + ks + zffs;

                ParameterEx[] parameters = new ParameterEx[4];
                parameters[0].Text  = "报表标题";
                parameters[0].Value = Constant.HospitalName + "住院预交金明细表";
                parameters[1].Text  = "制表人";
                parameters[1].Value = FrmMdiMain.CurrentUser.Name;
                parameters[2].Text  = "时间段";
                parameters[2].Value = rq;
                parameters[3].Text  = "其他参数";
                parameters[3].Value = swhere;

                FrmReportView rv = new FrmReportView(yjjTb, Constant.ApplicationDirectory + "\\report\\ZYGL_预交金统计.rpt", parameters, false);

                rv.Show();
            }
        }
Exemplo n.º 5
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            int           idInvoice = int.Parse(txtIdInvoice.Text);
            FrmReportView frmReport = new FrmReportView();

            frmReport.PrintInvoce(idInvoice);
            frmReport.Show();
        }
Exemplo n.º 6
0
        private void printbutt_Click(object sender, EventArgs e)
        {
            Cursor.Current = PubStaticFun.WaitCursor();
            DataTable myTb = (DataTable)this.dataGridView1.DataSource;

            if (myTb == null || myTb != null && myTb.Rows.Count < 1)
            {
                MessageBox.Show(this, "没有数据,不能打印", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            rds.Tables["MZFPDY"].Clear();

            DataRow dr;
            int     flag    = 0;
            string  sfyname = "";

            for (int j = 0; j < myTb.Rows.Count; j++)
            {
                flag++;
                dr = rds.Tables["MZFPDY"].NewRow();

                dr["门诊号"]  = myTb.Rows[j]["BLH"].ToString();
                dr["病人姓名"] = myTb.Rows[j]["BRXM"].ToString();
                dr["收费日期"] = myTb.Rows[j]["SFRQ"].ToString();
                dr["打印时间"] = Convert.ToDateTime(myTb.Rows[j]["fpdysj"]).ToString();
                dr["发票号"]  = myTb.Rows[j]["FPH"].ToString();
                dr["总金额"]  = Convert.ToDouble(myTb.Rows[j]["ZJE"].ToString());
                dr["科室"]   = myTb.Rows[j]["Deptname"].ToString();
                dr["医生"]   = myTb.Rows[j]["EmpName"].ToString();
                dr["收费员"]  = myTb.Rows[j]["sfy"].ToString();
                sfyname    = myTb.Rows[j]["sfy"].ToString();
                rds.Tables["MZFPDY"].Rows.Add(dr);
            }
            Cursor.Current = Cursors.Default;

            FrmReportView frmReport = null;

            ParameterEx[] _parameters = new ParameterEx[5];

            _parameters[0].Text  = "tTitle";
            _parameters[0].Value = new SystemCfg(2).Config;
            _parameters[1].Text  = "tUser";
            _parameters[1].Value = "打印者:" + sfyname;
            _parameters[2].Text  = "tDate";
            _parameters[2].Value = DateManager.ServerDateTimeByDBType(BDatabase);
            _parameters[3].Text  = "kssj";
            _parameters[3].Value = this.dydtpks.Value;
            _parameters[4].Text  = "jssj";
            _parameters[4].Value = this.dydtpjs.Value;
            if (flag > 0)
            {
                frmReport = new FrmReportView(rds, Constant.ApplicationDirectory + "\\report\\MZ_门诊补打发票.rpt", _parameters);
                frmReport.Show();
            }
        }
Exemplo n.º 7
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            FrmReportView rep = new FrmReportView();

            if (checkBox1.Checked)
            {
                rep.PrintReportReatreatProduct(prods, dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());
            }
            else
            {
                rep.PrintReportReatreatProduct(prods);
            }
            rep.Show();
        }
Exemplo n.º 8
0
        private void M_loadReport(int indx)
        {
            FrmReportView frv = lst[indx];

            if (lst != null && lst.Count > 0)
            {
                frv.FormBorderStyle = FormBorderStyle.None;
                frv.Dock            = DockStyle.Fill;
                frv.TopLevel        = false;
                panel_content.Controls.Clear();
                panel_content.Controls.Add(frv);
                frv.Show();
            }
            M_ControlBtn();
        }
Exemplo n.º 9
0
        private void bt打印_Click(object sender, System.EventArgs e)
        {
            DataSet   ds  = new DataSet();
            DataTable dt  = new DataTable();
            DataTable dt2 = new DataTable();
            string    sSql;

            sSql = "select '" + InstanceForm.BCurrentDept.WardName + "'as wname,jb_date,dbo.FUN_ZY_SEEKEMPLOYEENAME(book_user) book_user," +
                   "case JOBTIME when 1 then '白班' when 2 then '晚班' when 3 then '夜班' end JOBTIME,FORMERLY,GOOUT,TRANSOUT," +
                   "DEATH,COMEIN,TRANSIN,NOW,OPERATION,CHILDBIRTH,TERMINALLYILL,HEAVYILL,GOAWAY,SPECIALTEND,FIRSTTEND,jb_text from zy_wardjbjl" +
                   " where jb_date='" + DtpbeginDate.Value.Date + "' and ward_id='" + InstanceForm.BCurrentDept.WardId + "'" +
                   " order by JOBTIME";
            dt           = InstanceForm.BDatabase.GetDataTable(sSql);
            dt.TableName = "tabWardjbjl";

            if (dt == null || dt.Rows.Count == 0)
            {
                return;
            }

            ds.Tables.Add(dt);
            //Modify by zouchihua 改为诊断名称 2012-3-19
            sSql = "select item,bed_no,name,diagnoses ,time,b.jobtime,b.jb_text as jobtimename,dbo.FUN_ZY_SEEKEMPLOYEENAME(book_user) book_user from zy_wardjbjl_brdt a,zy_wardjbjl b " +
                   "where a.jb_id=b.id and b.jb_date='" + DtpbeginDate.Value.Date + "' and ward_id='" + InstanceForm.BCurrentDept.WardId + "' order by jobtime,a.id";
            dt2           = InstanceForm.BDatabase.GetDataTable(sSql);
            dt2.TableName = "tabWardjbjl_brdt";

            if (dt2 == null || dt2.Rows.Count == 0)
            {
                return;
            }

            ds.Tables.Add(dt2);

            FrmReportView frmRptView = null;

            ParameterEx[] _parameters = new ParameterEx[3];

            _parameters[0].Text  = "医院名称";
            _parameters[0].Value = (new SystemCfg(0002)).Config;
            _parameters[1].Text  = "病区名称";
            _parameters[1].Value = lblWard.Text;
            _parameters[2].Text  = "交班日期";
            _parameters[2].Value = DtpbeginDate.Value;

            frmRptView = new FrmReportView(ds, Constant.ApplicationDirectory + "\\report\\ZYHS_交班记录.rpt", _parameters);
            frmRptView.Show();
        }
Exemplo n.º 10
0
        private void butprint_pos_Click(object sender, EventArgs e)
        {
            DataTable tb = (DataTable)this.dataGridViewX1.DataSource;

            DataSetjk.yjjszqkDataTable tbyjj = new DataSetjk.yjjszqkDataTable();
            DataRow dr;

            for (int i = 0; i <= tb.Rows.Count - 1; i++)
            {
                dr = tbyjj.NewRow();
                for (int j = 1; j < tb.Columns.Count; j++)
                {
                    if (tb.Columns[j].ColumnName == "财务记帐")
                    {
                        tb.Columns[j].ColumnName = "财务记账";
                    }
                    dr[tb.Columns[j].ColumnName] = tb.Rows[i][tb.Columns[j].ColumnName];
                }

                tbyjj.Rows.Add(dr);
            }
            ParameterEx[] parameters = new ParameterEx[2];

            parameters[0].Text  = "医院名称";
            parameters[0].Value = TrasenFrame.Classes.Constant.HospitalName;
            parameters[1].Text  = "统计日期";
            parameters[1].Value = "日期从:" + dtpjsrq1.Value.ToString() + " 到:" + dtpjsrq2.Value.ToString();


            TrasenFrame.Forms.FrmReportView f;
            f = new FrmReportView(tbyjj, Constant.ApplicationDirectory + "\\Report\\门诊预交金收支情况表.rpt", parameters);

            if (f.LoadReportSuccess)
            {
                f.Show();
            }
            else
            {
                f.Dispose();
            }
        }
Exemplo n.º 11
0
        private void bt打印_Click(object sender, System.EventArgs e)
        {
            DataTable prtTb = (DataTable)myDataGrid1.DataSource;

            if (prtTb == null || prtTb.Rows.Count == 0)
            {
                return;
            }

            FrmReportView frmRptView = null;

            ParameterEx[] _parameters = new ParameterEx[2];

            _parameters[0].Text  = "表头";
            _parameters[0].Value = this.myDataGrid1.CaptionText;
            _parameters[1].Text  = "打印者";
            _parameters[1].Value = "打印者:" + InstanceForm.BCurrentUser.Name;

            frmRptView = new FrmReportView(rds, Constant.ApplicationDirectory + "\\report\\ZYHS_科室收入报表.rpt", _parameters);
            frmRptView.Show();
        }
Exemplo n.º 12
0
 private void btnprint_Click(object sender, EventArgs e)
 {
     if (dgvData.DataSource == null)
     {
         return;
     }
     try
     {
         DataTable     dt = dgvData.DataSource as DataTable;
         FrmReportView f  = new FrmReportView(dt, Constant.ApplicationDirectory + "\\Report\\交款票据统计.rpt", null);
         if (f.LoadReportSuccess)
         {
             f.Show();
         }
         else
         {
             f.Dispose();
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 13
0
        private void butdy_Click(object sender, EventArgs e)
        {
            if (chkBrmx.Checked)
            {
                MessageBox.Show("暂未提供打印病人明细固定格式!");
                return;
            }

            FrmReportView rv;

            ParameterEx[] parameters;

            //查询条件
            string rq = "";

            if (rbFsrq.Checked)
            {
                rq = rbFsrq.Text + ":" + this.dtp1.Value.ToString() + " 到 " + this.dtp2.Value.ToString();
            }
            else if (rbJsrq.Checked)
            {
                rq = rbJsrq.Text + ":" + this.dtp1.Value.ToString() + " 到 " + this.dtp2.Value.ToString();
            }
            else
            {
                rq = rbDqzy.Text + ":" + this.dtp2.Value.ToString();
            }

            string ks = "";

            if (rbKdks.Checked)
            {
                ks = "统计科室类型:" + rbKdks.Text;
            }
            else if (rbBrks.Checked)
            {
                ks = "统计科室类型:" + rbBrks.Text;
            }
            else if (rbZxks.Checked)
            {
                ks = "统计科室类型:" + rbZxks.Text;
            }
            else if (rbJsks.Checked)//Add By Tany 2012-03-06
            {
                ks = "统计科室类型:" + rbJsks.Text;
            }

            string swhere = ks;

            DataTable jsbrTb = (DataTable)dataGridView1.DataSource;

            if (rbKj.Checked && !chkBrmx.Checked)
            {
                if (jsbrTb != null && jsbrTb.Rows.Count > 0)
                {
                    parameters          = new ParameterEx[4];
                    parameters[0].Text  = "报表标题";
                    parameters[0].Value = Constant.HospitalName + "住院科室收入统计报表(二)";
                    parameters[2].Text  = "时间段";
                    parameters[2].Value = rq;
                    parameters[1].Text  = "制表人";
                    parameters[1].Value = FrmMdiMain.CurrentUser.Name;
                    parameters[3].Text  = "其他参数";
                    parameters[3].Value = swhere;

                    dsReport  ds   = new dsReport();
                    DataTable dsTb = ds.Tables["dtJzjsbrmx"];
                    DataTable xmTb = FrmMdiMain.Database.GetDataTable("select * from jc_zykj_xm order by sort_id");

                    string d = "";
                    string s = "";
                    for (int j = 0; j < jsbrTb.Rows.Count; j++)
                    {
                        DataRow dr = dsTb.NewRow();

                        dr["住院号"]  = "";
                        dr["病人姓名"] = "";
                        dr["票据号"]  = 0;
                        dr["冲帐标志"] = "";
                        dr["住院科室"] = jsbrTb.Rows[j]["科室"];
                        dr["结算时间"] = "";
                        dr["结算类型"] = "";
                        dr["操作员"]  = "";
                        dr["合计"]   = jsbrTb.Rows[j]["合计"];
                        for (int i = 0; i < xmTb.Rows.Count; i++)
                        {
                            d     = "d" + Convert.ToString(i + 1);
                            s     = "s" + Convert.ToString(i + 1);
                            dr[d] = jsbrTb.Rows[j][xmTb.Rows[i]["item_name"].ToString().Trim()];
                            dr[s] = xmTb.Rows[i]["item_name"].ToString().Trim();
                        }

                        dsTb.Rows.Add(dr);
                    }

                    rv = new FrmReportView(dsTb, Constant.ApplicationDirectory + "\\report\\ZYGL_科室收入统计.rpt", parameters, false);
                    rv.Show();
                }
            }
            else//Modify By Tany 2012-01-11 改成自由列
            {
                if (jsbrTb != null && jsbrTb.Rows.Count > 0)
                {
                    parameters          = new ParameterEx[4];
                    parameters[0].Text  = "报表标题";
                    parameters[0].Value = Constant.HospitalName + "住院科室收入统计";
                    parameters[2].Text  = "时间段";
                    parameters[2].Value = rq;
                    parameters[1].Text  = "制表人";
                    parameters[1].Value = FrmMdiMain.CurrentUser.Name;
                    parameters[3].Text  = "其他参数";
                    parameters[3].Value = swhere;

                    dsReport  ds   = new dsReport();
                    DataTable dsTb = ds.Tables["dtJzjsbrmx"];
                    //DataTable xmTb = FrmMdiMain.Database.GetDataTable("select * from jc_zykj_xm order by sort_id");

                    string d = "";
                    string s = "";
                    for (int j = 0; j < jsbrTb.Rows.Count; j++)
                    {
                        for (int i = 2; i < jsbrTb.Columns.Count; i++)
                        {
                            DataRow dr = dsTb.NewRow();

                            dr["住院号"]  = "";
                            dr["病人姓名"] = "";
                            dr["票据号"]  = 0;
                            dr["冲帐标志"] = "";
                            dr["住院科室"] = jsbrTb.Rows[j]["科室"];
                            dr["结算时间"] = "";
                            dr["结算类型"] = "";
                            dr["操作员"]  = "";
                            dr["合计"]   = jsbrTb.Rows[j]["合计"];

                            d = "d1";
                            s = "s1";
                            //Modify By Tany 2012-03-08
                            if (chkPbxs.Checked && Convert.ToDecimal(Convertor.IsNull(jsbrTb.Rows[j][i], "0")) == 0)
                            {
                                continue;
                            }
                            dr[d] = jsbrTb.Rows[j][i];
                            dr[s] = jsbrTb.Columns[i].ToString().Trim();

                            dsTb.Rows.Add(dr);
                        }
                    }

                    rv = new FrmReportView(dsTb, Constant.ApplicationDirectory + "\\report\\ZYGL_科室收入统计动态.rpt", parameters, false);
                    rv.Show();
                }
            }
        }
Exemplo n.º 14
0
        private void btOK_Click(object sender, System.EventArgs e)
        {
            Cursor.Current = PubStaticFun.WaitCursor();

            DataSet   ds       = new DataSet();
            string    sSql     = "";
            DataTable GzrzTb   = new DataTable();
            DataTable GzrzMxTb = new DataTable();

            if (checkBox1.Checked)
            {
                sSql = "select dbo.fun_zy_seekdeptname(DEPT_ID) 科别," +
                       "sum(YY) 原有," +
                       "sum(OUTALL) 出院合计," +
                       "sum(OUTZY) 治愈," +
                       "sum(OUTHZ) 好转," +
                       "sum(OUTWY) 未愈," +
                       "sum(OUTSW) 死亡," +
                       "sum(TRANSOUT) 转出," +
                       "sum([IN]) 入院," +
                       "sum(TRANSIN) 转入," +
                       "sum(NOW) 现有," +
                       "sum(OPER) 手术," +
                       "sum(BIRTH) 分娩," +
                       "sum(BW) 病危," +
                       "sum(BZ) 病重," +
                       "sum(TJHL) 特护," +
                       "sum(YJHL) 一级护理," +
                       "sum(PH) 陪护 from zy_wardgzrz where book_date = '" + dateTimePicker1.Value.ToShortDateString() + "'";
                sSql += " and dept_id in (select dept_id from jc_wardrdept where ward_id ='" + cmbdept.SelectedValue.ToString().Trim() + "')";
                sSql += " group by DEPT_ID";
            }
            else
            {
                sSql = "exec SP_ZYHS_wardgzrz '" + cmbdept.SelectedValue.ToString().Trim() + "','" + dateTimePicker1.Value.ToShortDateString() + "','" + dateTimePicker1.Value.ToShortDateString() + "',0";
            }
            GzrzTb           = InstanceForm.BDatabase.GetDataTable(sSql);
            GzrzTb.TableName = "tabWardGzrz";
            if (checkBox1.Checked)
            {
                sSql = "select case type when 1 then '出院' " +
                       "when 2 then '转出' " +
                       "when 3 then '死亡' " +
                       "when 4 then '入院' " +
                       "when 5 then '转入' " +
                       "when 6 then '手术' " +
                       "when 7 then '分娩' " +
                       "when 8 then '病危' " +
                       "when 9 then '病重' end 项目, INPATIENT_NO 住院号," +
                       "BED_NO 床号," +
                       "NAME 姓名," +
                       "ZD 诊断,dbo.fun_getdeptname(dept_id) 科别,'' 备注 from zy_wardgzrz_mx where book_date = '" + dateTimePicker1.Value.ToShortDateString() +
                       "' and dept_id in (select dept_id from jc_wardrdept where ward_id ='" + cmbdept.SelectedValue.ToString().Trim() + "')";
            }
            else
            {
                sSql = "exec SP_ZYHS_wardgzrz '" + cmbdept.SelectedValue.ToString().Trim() + "','" + dateTimePicker1.Value.ToShortDateString() + "','" + dateTimePicker1.Value.ToShortDateString() + "',1";
            }
            GzrzMxTb           = InstanceForm.BDatabase.GetDataTable(sSql);
            GzrzMxTb.TableName = "tabWardGzrzMx";
            //add by zouchihua 2012-9-11 转科前的科室

            ds.Tables.Add(GzrzTb);
            ds.Tables.Add(GzrzMxTb);

            FrmReportView frmRptView = null;

            ParameterEx[] _parameters = new ParameterEx[4];

            _parameters[0].Text  = "医院名称";
            _parameters[0].Value = (new SystemCfg(0002)).Config;
            _parameters[1].Text  = "病区";
            _parameters[1].Value = (InstanceForm.BCurrentDept.WardName == ""?this.cmbdept.Text:InstanceForm.BCurrentDept.WardName);
            _parameters[2].Text  = "填报人";
            _parameters[2].Value = InstanceForm.BCurrentUser.Name;
            _parameters[3].Text  = "日期加星期";
            _parameters[3].Value = dateTimePicker1.Value.ToShortDateString() + " " + PubStaticFun.GetCHNWeekName(dateTimePicker1.Value.DayOfWeek.ToString());

            frmRptView = new FrmReportView(ds, Constant.ApplicationDirectory + "\\report\\ZYHS_病区工作日志.rpt", _parameters);
            frmRptView.Show();

            Cursor.Current = Cursors.Default;
        }
Exemplo n.º 15
0
        private void button2_Click(object sender, EventArgs e)
        {
            Cursor.Current = PubStaticFun.WaitCursor();
            DataTable myTb = (DataTable)this.dataGridView1.DataSource;

            if (myTb == null || myTb != null && myTb.Rows.Count < 1)
            {
                MessageBox.Show(this, "没有数据,不能打印", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            rds.Tables["MedYPMXD"].Clear();

            DataRow dr;
            int     flag = 0;

            for (int j = 0; j < myTb.Rows.Count; j++)
            {
                if (myTb.Rows[j]["selected"].ToString() == "1")
                {
                    flag++;
                    dr                 = rds.Tables["MedYPMXD"].NewRow();
                    dr["选"]            = false;
                    dr["床号"]           = myTb.Rows[j]["BED_NO"].ToString();
                    dr["住院号"]          = myTb.Rows[j]["INPATIENT_NO"].ToString();
                    dr["姓名"]           = myTb.Rows[j]["NAME"].ToString();
                    dr["日期"]           = Convert.ToDateTime(myTb.Rows[j]["presc_date"]).Month.ToString() + "-" + Convert.ToDateTime(myTb.Rows[j]["presc_date"]).Day.ToString();
                    dr["编号"]           = myTb.Rows[j]["SUBCODE"].ToString();
                    dr["名称"]           = myTb.Rows[j]["S_YPSPM"].ToString();
                    dr["规格"]           = myTb.Rows[j]["S_YPGG"].ToString();
                    dr["数量"]           = Convert.ToDouble(myTb.Rows[j]["NUM"]);
                    dr["单位"]           = myTb.Rows[j]["UNIT"].ToString();
                    dr["剂型"]           = myTb.Rows[j]["YPJX"].ToString();//剂型
                    dr["单价"]           = Convert.ToDouble(myTb.Rows[j]["RETAIL_PRICE"]);
                    dr["金额"]           = Convert.ToDouble(myTb.Rows[j]["ACVALUE"]);
                    dr["麻毒否"]          = myTb.Rows[j]["MZYP"].ToString();
                    dr["贵重否"]          = myTb.Rows[j]["GZYP"].ToString();
                    dr["id"]           = j.ToString();
                    dr["baby_id"]      = myTb.Rows[j]["baby_id"].ToString();
                    dr["INPATIENT_ID"] = myTb.Rows[j]["INPATIENT_ID"].ToString();
                    dr["fee_id"]       = myTb.Rows[j]["fee_id"].ToString();
                    dr["xmid"]         = myTb.Rows[j]["xmid"].ToString();
                    dr["TLFL"]         = myTb.Rows[j]["TLFL"].ToString();
                    rds.Tables["MedYPMXD"].Rows.Add(dr);

                    if (this.rb_y.Checked)
                    {
                        ZcyBill.InsertYPQDQRLOG(new Guid(myTb.Rows[j]["INPATIENT_ID"].ToString()), new Guid(myTb.Rows[j]["fee_id"].ToString()));
                    }
                    else if (this.rb_n.Checked)
                    {
                        DataRow drr = InstanceForm.BDatabase.GetDataRow("select pcount from ZY_YPQDQRLOG where id='" + new Guid(myTb.Rows[j]["log_id"].ToString()) + "'");
                        if (drr != null)
                        {
                            int pcount = Convert.ToInt32(drr["pcount"].ToString());
                            pcount++;
                            ZcyBill.UpdateYPQDQRLOG(new Guid(myTb.Rows[j]["log_id"].ToString()), pcount);
                        }
                    }
                }
            }
            Cursor.Current = Cursors.Default;

            FrmReportView frmReport = null;

            ParameterEx[] _parameters = new ParameterEx[2];

            _parameters[0].Text  = "tTitle";
            _parameters[0].Value = "发药确认卡";
            _parameters[1].Text  = "tUser";
            _parameters[1].Value = "打印者:" + InstanceForm.BCurrentUser.Name;

            if (flag > 0)
            {
                frmReport = new FrmReportView(rds, Constant.ApplicationDirectory + "\\report\\ZYHS_发药确认卡.rpt", _parameters);
                frmReport.Show();
            }
            Bingdate();
        }
Exemplo n.º 16
0
        private void butprint_pos_Click(object sender, EventArgs e)
        {
            if (dataGridView1.DataSource == null)
            {
                return;
            }
            try
            {
                DataTable             tb = (DataTable)dataGridView1.DataSource;
                ts_mz_report.DataSet1 ds = new ts_mz_report.DataSet1();
                DataRow dr;
                for (int i = 0; i <= tb.Rows.Count - 1; i++)
                {
                    dr = ds.门诊预交金消费对账.NewRow();
                    int x = i + 1;
                    dr["序号"]    = Convert.ToString(Convertor.IsNull(tb.Rows[i]["序号"], ""));
                    dr["姓名"]    = Convert.ToString(Convertor.IsNull(tb.Rows[i]["姓名"], ""));
                    dr["卡号"]    = Convert.ToString(Convertor.IsNull(tb.Rows[i]["卡号"], ""));
                    dr["现金存入"]  = Convert.ToDecimal(Convertor.IsNull(tb.Rows[i]["现金存入"], "0"));
                    dr["发生日期1"] = Convert.ToString(Convertor.IsNull(tb.Rows[i]["现金日期"], ""));
                    dr["银行转账"]  = Convert.ToDecimal(Convertor.IsNull(tb.Rows[i]["银行转账"], "0"));
                    dr["发生日期2"] = Convert.ToString(Convertor.IsNull(tb.Rows[i]["转账日期"], ""));
                    dr["支出"]    = Convert.ToDecimal(Convertor.IsNull(tb.Rows[i]["支出"], "0"));
                    dr["发生日期3"] = Convert.ToString(Convertor.IsNull(tb.Rows[i]["支出日期"], ""));
                    dr["卡余额"]   = Convert.ToDecimal(Convertor.IsNull(tb.Rows[i]["卡余额"], "0"));
                    dr["收款员"]   = Convert.ToString(Convertor.IsNull(tb.Rows[i]["收款员"], ""));

                    ds.门诊预交金消费对账.Rows.Add(dr);
                }



                ParameterEx[] parameters = new ParameterEx[9];

                parameters[0].Text  = "医院名称";
                parameters[0].Value = TrasenFrame.Classes.Constant.HospitalName;

                parameters[1].Text  = "填报日期";
                parameters[1].Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString();

                parameters[2].Text  = "填报人";
                parameters[2].Value = InstanceForm.BCurrentUser.Name;

                parameters[3].Text  = "rq1";
                parameters[3].Value = dtpjsrq1.Value.ToString();

                parameters[4].Text  = "rq2";
                parameters[4].Value = dtpjsrq2.Value.ToString();

                parameters[5].Text  = "现金合计";
                parameters[5].Value = lblcrxj.Text.ToString();

                parameters[6].Text  = "转账合计";
                parameters[6].Value = lblyhzz.Text.ToString();

                parameters[7].Text  = "支出合计";
                parameters[7].Value = lblljxf.Text.ToString();

                parameters[8].Text  = "余额合计";
                parameters[8].Value = lbljcje.Text.ToString();

                TrasenFrame.Forms.FrmReportView f;
                f = new FrmReportView(ds, Constant.ApplicationDirectory + "\\Report\\MZ_预交金消费对账.rpt", parameters);

                if (f.LoadReportSuccess)
                {
                    f.Show();
                }
                else
                {
                    f.Dispose();
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 17
0
        private void butdy_Click(object sender, EventArgs e)
        {
            FrmReportView rv;

            ParameterEx[] parameters;

            //Modify By Tany 2010-03-09 如果条件为全部,则不显示条件
            //查询条件
            string rq   = (rbJkrq.Checked ? rbJkrq.Text : rbSfrq.Text) + ":" + this.dtp1.Value.ToString() + " 到 " + this.dtp2.Value.ToString();
            string sfy  = cmbuser.Text.Trim() == "全部" ? "" : ("收费员:" + cmbuser.Text.Trim());
            string ks   = cmbDept.Text.Trim() == "全部" ? "" : ("科室:" + cmbDept.Text.Trim());
            string brlx = cmbBrlx.Text.Trim() == "全部" ? "" : ("病人类型:" + cmbBrlx.Text.Trim());
            string jslx = cmbJslx.Text.Trim() == "全部" ? "" : ("结算类型:" + cmbJslx.Text.Trim());
            string yblx = "";

            if (Convert.ToInt32(this.cmbJslx.SelectedValue) == 1)
            {
                yblx = cmbYblx.Text.Trim() == "全部" ? "" : ("医保类型:" + cmbYblx.Text.Trim());
            }
            string jsfs = "结算方式:";//-1=全部0=中途结算1=正式结算2=欠费结算

            if (rbZcjs.Checked)
            {
                jsfs += rbZcjs.Text;
            }
            else if (rbZtjs.Checked)
            {
                jsfs += rbZtjs.Text;
            }
            else if (rbQfjs.Checked)
            {
                jsfs += rbQfjs.Text;
            }
            else
            {
                jsfs = "";
            }
            string swhere = sfy + "   " + ks + "   " + brlx + "   " + jslx + "   " + yblx + "   " + jsfs;

            if (rbJsxx.Checked)
            {
                DataTable jsTb = (DataTable)dataGridView1.DataSource;

                if (jsTb != null && jsTb.Rows.Count > 0)
                {
                    parameters          = new ParameterEx[4];
                    parameters[1].Text  = "报表标题";
                    parameters[1].Value = Constant.HospitalName + "出纳交账报表(一)";
                    parameters[2].Text  = "时间段";
                    parameters[2].Value = rq;
                    parameters[0].Text  = "制表人";
                    parameters[0].Value = FrmMdiMain.CurrentUser.Name;
                    parameters[3].Text  = "其他参数";
                    parameters[3].Value = swhere;

                    rv = new FrmReportView(jsTb, Constant.ApplicationDirectory + "\\report\\ZYGL_病人结算统计.rpt", parameters, false);
                    rv.Show();
                }
            }
            else
            {
                DataTable jsbrTb = (DataTable)dataGridView1.DataSource;

                if (jsbrTb != null && jsbrTb.Rows.Count > 0)
                {
                    parameters          = new ParameterEx[4];
                    parameters[0].Text  = "报表标题";
                    parameters[0].Value = Constant.HospitalName + "住院结算统计报表";
                    parameters[2].Text  = "时间段";
                    parameters[2].Value = rq;
                    parameters[1].Text  = "制表人";
                    parameters[1].Value = FrmMdiMain.CurrentUser.Name;
                    parameters[3].Text  = "其他参数";
                    parameters[3].Value = swhere;

                    dsReport  ds   = new dsReport();
                    DataTable dsTb = ds.Tables["dtJzjsbrmx"];
                    DataTable xmTb = FrmMdiMain.Database.GetDataTable("select * from jc_zykj_xm order by sort_id");

                    string d = "";
                    string s = "";
                    for (int j = 0; j < jsbrTb.Rows.Count; j++)
                    {
                        DataRow dr = dsTb.NewRow();

                        dr["住院号"]  = jsbrTb.Rows[j]["住院号"];
                        dr["病人姓名"] = jsbrTb.Rows[j]["病人姓名"];
                        dr["票据号"]  = jsbrTb.Rows[j]["票据号"];
                        dr["冲帐标志"] = jsbrTb.Rows[j]["冲帐标志"];
                        dr["住院科室"] = jsbrTb.Rows[j]["住院科室"];
                        dr["结算时间"] = jsbrTb.Rows[j]["结算时间"];
                        dr["结算类型"] = jsbrTb.Rows[j]["结算类型"];
                        dr["操作员"]  = jsbrTb.Rows[j]["操作员"];
                        dr["合计"]   = jsbrTb.Rows[j]["合计"];
                        for (int i = 0; i < xmTb.Rows.Count; i++)
                        {
                            d     = "d" + Convert.ToString(i + 1);
                            s     = "s" + Convert.ToString(i + 1);
                            dr[d] = jsbrTb.Rows[j][xmTb.Rows[i]["item_name"].ToString().Trim()];
                            dr[s] = xmTb.Rows[i]["item_name"].ToString().Trim();
                        }

                        dsTb.Rows.Add(dr);
                    }

                    rv = new FrmReportView(dsTb, Constant.ApplicationDirectory + "\\report\\ZYGL_病人结算明细统计.rpt", parameters, false);
                    rv.Show();
                }
            }
        }