Beispiel #1
0
        private void buttj_Click(object sender, System.EventArgs e)
        {
            try
            {
                this.Cursor        = PubStaticFun.WaitCursor();
                this.buttj.Enabled = false;

                if (Convertor.IsNumeric(Convertor.IsNull(txtnum1.Text, "0")) == false ||
                    Convertor.IsNumeric(Convertor.IsNull(txtnum2.Text, "0")) == false)
                {
                    MessageBox.Show("销售范围请输入数字", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                int ntype = 2;//全院
                if (rdo1.Checked == true)
                {
                    ntype = 0;                       //门诊
                }
                if (rdo2.Checked == true)
                {
                    ntype = 1;                              //住院
                }
                int ntype1 = rdoje.Checked == true ? 1 : 0; //数量 金额


                ParameterEx[] parameters = new ParameterEx[7];
                parameters[0].Value = ntype;
                parameters[1].Value = ntype1;
                parameters[2].Value = dtp1.Value.ToShortDateString();
                parameters[3].Value = dtp2.Value.ToShortDateString();
                parameters[4].Value = Convert.ToDecimal(Convertor.IsNull(txtnum1.Text, "0"));
                parameters[5].Value = Convert.ToDecimal(Convertor.IsNull(txtnum2.Text, "0"));
                parameters[6].Value = Convert.ToInt32(cmbyplx.SelectedValue);

                parameters[0].Text = "@type";
                parameters[1].Text = "@type1";
                parameters[2].Text = "@dtp1";
                parameters[3].Text = "@dtp2";
                parameters[4].Text = "@num1";
                parameters[5].Text = "@num2";
                parameters[6].Text = "@yplx";


                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_Yf_tj_zxyptj", parameters, 30);
                FunBase.AddRowtNo(tb);
                tb.TableName = "Tb";
                this.myDataGrid1.DataSource = tb;
                this.buttj.Enabled          = true;
            }
            catch (System.Exception err)
            {
                this.buttj.Enabled = true;
                MessageBox.Show(err.Message);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
Beispiel #2
0
        private void buttj_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor        = PubStaticFun.WaitCursor();
                this.buttj.Enabled = false;
                ParameterEx[] parameters = new ParameterEx[4];
                parameters[0].Value = Convert.ToInt32(cmbyjks.SelectedValue);
                parameters[1].Value = dtp1.Value.ToShortDateString() + " 00:00:00";
                parameters[2].Value = dtp2.Value.ToShortDateString() + " 23:59:59";
                parameters[3].Value = rbtFyr.Checked ? 0 : 1;

                parameters[0].Text = "@deptid";
                parameters[1].Text = "@rq1";
                parameters[2].Text = "@rq2";
                parameters[3].Text = "@tjfs";

                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_YF_TJ_GZL", parameters, 30);
                FunBase.AddRowtNo(tb);
                this.myDataGrid1.DataSource = tb;
            }
            catch
            {
            }
            finally
            {
                this.buttj.Enabled = true;
                this.Cursor        = Cursors.Arrow;
            }
        }
Beispiel #3
0
        private void butexcel_Click(object sender, EventArgs e)
        {
            if (dgvData.DataSource == null)
            {
                return;
            }
            try
            {
                this.Cursor           = PubStaticFun.WaitCursor();
                this.btnExcel.Enabled = false;
                DataTable tb = dgvData.DataSource as DataTable;

                string str = "";
                if (rbMz.Checked)
                {
                    str = "门诊";
                }
                else
                {
                    str = "住院";
                }
                string swhere = string.Format("交款来源:{0} 交款员:{1}  交款时间:{2} 到 {3}", str, cmbsfy.Text, dtp1.Text, dtp2.Text);
                ExportToExcel(tb, Constant.HospitalName + " " + this.Text, swhere);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("导出Excel时发生错误:" + Environment.NewLine + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                this.Cursor           = Cursors.Default;
                this.btnExcel.Enabled = true;
            }
        }
Beispiel #4
0
        private void buttj_Click(object sender, System.EventArgs e)
        {
            try
            {
                this.Cursor        = PubStaticFun.WaitCursor();
                this.buttj.Enabled = false;
                ParameterEx[] parameters = new ParameterEx[3];
                parameters[0].Value = dtp1.Value.ToShortDateString() + " 00:00:00";
                parameters[1].Value = dtp2.Value.ToShortDateString() + " 23:59:59";
                parameters[2].Value = Convert.ToInt32(cmbyjks.SelectedValue);


                parameters[0].Text = "@rq1";
                parameters[1].Text = "@rq2";
                parameters[2].Text = "@yplx";


                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_YF_TJ_JzFyCftj", parameters, 600);
                FunBase.AddRowtNo(tb);
                tb.TableName = "Tb";
                this.myDataGrid1.DataSource = tb;
                this.buttj.Enabled          = true;
            }
            catch (System.Exception err)
            {
                this.buttj.Enabled = true;
                MessageBox.Show(err.Message);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
Beispiel #5
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            try
            {
                if (dataGridView2.DataSource == null)
                {
                    return;
                }
                if (dataGridView2.Rows.Count == 0)
                {
                    return;
                }

                this.Cursor            = PubStaticFun.WaitCursor();
                this.btnExport.Enabled = false;
                ts_jc_log.ExcelOper.ExportData_ForDataTable(dataGridView2, "");
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message);
            }
            finally
            {
                this.Cursor            = Cursors.Arrow;
                this.btnExport.Enabled = true;
            }
        }
Beispiel #6
0
 private void btntj_Click(object sender, EventArgs e)
 {
     System.Data.DataTable dt = new DataTable();
     if (radioButtonmz.Checked)
     {
         ParameterEx[] parameter = new ParameterEx[3];
         parameter[0].Text  = "@RQ1";
         parameter[0].Value = dtpbegin.Value.Date.ToString("yyyy-MM-dd") + " 00:00:00";
         parameter[1].Text  = "@RQ2";
         parameter[1].Value = dtpEnd.Value.Date.ToString("yyyy-MM-dd") + " 23:59:59";
         parameter[2].Text  = "@jgbm";
         parameter[2].Value = InstanceForm.BCurrentDept.Jgbm;
         dt = TrasenFrame.Forms.FrmMdiMain.Database.GetDataTable("SP_MZYS_YPSYBL", parameter, 100);
     }
     else
     {
         ParameterEx[] parameter = new ParameterEx[4];
         parameter[0].Text  = "@RQ1";
         parameter[0].Value = dtpbegin.Value.Date.ToString("yyyy-MM-dd") + " 00:00:00";
         parameter[1].Text  = "@RQ2";
         parameter[1].Value = dtpEnd.Value.Date.ToString("yyyy-MM-dd") + " 23:59:59";
         parameter[2].Text  = "@jgbm";
         parameter[2].Value = InstanceForm.BCurrentDept.Jgbm;
         parameter[3].Text  = "@SS_FLAG";
         parameter[3].Value = checkBox1.Checked ? 1 : 0;
         dt = TrasenFrame.Forms.FrmMdiMain.Database.GetDataTable("SP_ZY_TJ_YSYPSRBL", parameter, 100);
     }
     PubStaticFun.SetDataGridIncreaseRowNumber(dt, "序号");
     dataGridView1.DataSource = dt;
 }
Beispiel #7
0
        private void btnRefresh_Click(object sender, System.EventArgs e)
        {
            dgWard.DataSource = null;
            dgPat.DataSource  = null;
            dgList.DataSource = null;

            dgWard.CaptionText = "病区收入";
            dgPat.CaptionText  = "病人费用";
            dgList.CaptionText = "费用明细";

            if (cmbDept.Text.Trim() == "")
            {
                MessageBox.Show("请选择一个科室!");
                return;
            }

            Cursor.Current = PubStaticFun.WaitCursor();

            string sSql = "exec sp_zyhs_selkssr '" + dtpBegin.Value + "','" + dtpEnd.Value + "'," + cmbDept.SelectedValue;

            dataTb = InstanceForm.BDatabase.GetDataTable(sSql);

            wardTb = dataTb.Clone();
            DataRow[] drM = dataTb.Select("病区='合  计'");
            foreach (DataRow dr in drM)
            {
                wardTb.Rows.Add(dr.ItemArray);
            }

            dgWard.DataSource = wardTb;

            Cursor.Current = Cursors.Default;
        }
Beispiel #8
0
        private void frmCWSX_Load(object sender, System.EventArgs e)
        {
            string sSql;

            //Modify by Tany 2005-02-24
            //增加停用标志
            sSql = @"select a.Room_no as 房号,a.Bed_No as 床号,dbo.FUN_ZY_SEEKDEPTNAME(a.dept_id) as 所属科室," +
                   "  dbo.FUN_ZY_SEEKEMPLOYEENAME(a.zz_doc) as 主治医生,dbo.FUN_ZY_SEEKEMPLOYEENAME(a.zy_doc) as 经治医生,dbo.FUN_ZY_SEEKEMPLOYEENAME(a.CHARGENURSE) as 负责护士, " +
                   "  h.order_name as 长期账单," +
                   "  i.inpatient_no as 住院号,i.name as 姓名,a.bedsex as 性别," +
                   "  case when i.baby_id>0 then '√' else '' end as 婴儿否," +
                   "  i.cur_Dept_name as 病人所属科室, " +
                   "  case a.isplus when 1 then '√'else ''end as 加床否," +
                   "  case a.isbf when 1 then '√'else ''end as 包床否," +
                   "  case a.isMYTS when 1 then '√'else ''end as 母婴同室否," +
                   "  case a.isinuse when 1 then '√'else ''end as 是否停用" +
                   "  from zy_BedDiction a left join jc_hoitemdiction h on h.order_id=a.hoitem_id" +
                   "  left join vi_zy_vinpatient_bed i on a.inpatient_id=i.inpatient_id and a.baby_id=i.baby_id" +
                   " where a.ward_id ='" + InstanceForm.BCurrentDept.WardId + "'" +
                   " order by a.Room_no,a.Bed_No ";
            string[] GrdMappingName = { "房号", "床号", "所属科室", "主治医生", "经治医生", "负责护士", "长期账单", "住院号", "姓名", "性别", "婴儿否", "病人所属科室", "加床否", "包床否", "母婴否", "是否停用" };
            int[]    GrdWidth       = { 4, 4, 14, 8, 8, 8, 18, 9, 8, 4, 6, 14, 6, 6, 6, 8 };
            int[]    Alignment      = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1 };
            myFunc.InitGridSQL(sSql, GrdMappingName, GrdWidth, Alignment, this.myDataGrid1);
            PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0);
            myFunc.SelRow(this.myDataGrid1);
        }
Beispiel #9
0
 private void bt查询_Click(object sender, System.EventArgs e)
 {
     this.GetData1();
     Cursor.Current = PubStaticFun.WaitCursor();
     this.Show_data(true);
     Cursor.Current = Cursors.Default;
 }
Beispiel #10
0
        private void dgPat_CurrentCellChanged(object sender, System.EventArgs e)
        {
            dgList.DataSource = null;

            dgList.CaptionText = "费用明细";

            int nrow = dgPat.CurrentCell.RowNumber;

            dgPat.Select(nrow);

            Guid sInpatientId = new Guid(dgPat[nrow, 6].ToString().Trim());

            if (sInpatientId != Guid.Empty)
            {
                Cursor.Current = PubStaticFun.WaitCursor();

                dgList.CaptionText += " [病区:" + dgPat[nrow, 1].ToString() + " 住院号:" + dgPat[nrow, 4].ToString() + " 姓名:" + dgPat[nrow, 5].ToString() + "]";

                string sSql = "select a.subcode as 项目代码, " +
                              " a.item_name 项目名称, " +
                              " a.retail_price 单价,a.num*a.dosage 数量,a.acvalue 金额,a.charge_date 记帐日期,dbo.fun_getempname(a.charge_user) 记帐人, " +
                              " dbo.fun_getdeptname(a.execdept_id) 执行科室,c.item_name 项目类别 " +
                              " from (select * from (select * from zy_fee_speci union all select * from zy_fee_speci_h) a where inpatient_id='" + sInpatientId + "' and charge_bit=1 and delete_bit=0" +
                              " and charge_date >= '" + dtpBegin.Value.ToShortDateString() + " 00:00:00' and charge_date < '" + dtpEnd.Value.AddDays(1).ToShortDateString() + " 00:00:00' and dept_id=" + cmbDept.SelectedValue + ") a" +
                              " inner join jc_stat_item c" +
                              " on a.statitem_code=c.code" +
                              " order by c.code,charge_date";
                DataTable myTb = InstanceForm.BDatabase.GetDataTable(sSql);

                dgList.DataSource = myTb;
            }

            Cursor.Current = Cursors.Default;
        }
Beispiel #11
0
        private bool myDataGrid1_myKeyDown(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
        {
            try
            {
                DataTable tb         = (DataTable)this.myDataGrid1.DataSource;
                int       nrow       = this.myDataGrid1.CurrentCell.RowNumber;
                int       ncol       = this.myDataGrid1.CurrentCell.ColumnNumber;
                int       nkey       = Convert.ToInt32(keyData);
                string    columnName = this.myDataGrid1.TableStyles[0].GridColumnStyles[ncol].HeaderText.Trim();
                if (nrow > tb.Rows.Count - 1)
                {
                    return(true);
                }

                //如果是名称列
                if (columnName.Trim() == "名称" && nkey == 13)
                {
                    string coltext = "";
                    DataGridTextBoxColumn txtCol = (DataGridTextBoxColumn)this.myDataGrid1.TableStyles[0].GridColumnStyles[ncol];
                    coltext = txtCol.TextBox.Text;
                    if (coltext.Trim() == "")
                    {
                        return(true);
                    }

                    if (nrow >= tb.Rows.Count - 1)
                    {
                        DataRow row = tb.NewRow();
                        row["序号"] = nrow + 2;
                        tb.Rows.Add(row);
                    }

                    tb.Rows[nrow]["名称"]  = coltext;
                    tb.Rows[nrow]["拼音码"] = PubStaticFun.GetPYWBM(coltext, 0);
                    tb.Rows[nrow]["五笔码"] = PubStaticFun.GetPYWBM(coltext, 1);
                }

                //回车控制
                //if (nkey==13 && columnName!="药品类型")
                if (nkey == 13 && columnName != "统领分类")
                {
                    this.myDataGrid1.CurrentCell = new DataGridCell(nrow, ncol + 1);
                }
                //if (nkey==13 && columnName=="药品类型")
                if (nkey == 13 && (columnName == "统领分类" || columnName == "剂型大类"))
                {
                    this.myDataGrid1.CurrentCell = new DataGridCell(nrow + 1, 1);
                }
                if (this.myDataGrid1.TableStyles[0].GridColumnStyles[ncol + 1].HeaderText.Trim() == "统领分类" || this.myDataGrid1.TableStyles[0].GridColumnStyles[ncol + 1].HeaderText.Trim() == "剂型大类")
                {
                    cmbyplx.Focus();
                }
            }
            catch (System.Exception err)
            {
                MessageBox.Show("错误" + err.Message);
            }
            return(false);
        }
Beispiel #12
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     try
     {
         this.dataGridView1.EndEdit();
         this.BindingContext[((DataTable)this.dataGridView1.DataSource)].EndCurrentEdit();
         DataTable temp = ((DataTable)this.dataGridView1.DataSource);
         DataTable tt   = temp.GetChanges();
         DataTable tdel = temp.GetChanges(DataRowState.Deleted);
         this.dataGridView1.Rows.Count.ToString();
         for (int i = 0; i < temp.Rows.Count; i++)
         {
             if (temp.Rows[i].RowState == DataRowState.Deleted)
             {
                 continue;
             }
             if (temp.Rows[i]["delete_bit1"].ToString() == "false")
             {
                 temp.Rows[i]["delete_bit"] = 0;
             }
             else
             {
                 temp.Rows[i]["delete_bit"] = 1;
             }
             if (temp.Rows[i].RowState == DataRowState.Added)
             {
                 temp.Rows[i]["delete_bit"]  = 0;
                 temp.Rows[i]["delete_bit1"] = "false";
             }
             if (temp.Rows[i]["pym"].ToString().Trim() == "")
             {
                 temp.Rows[i]["pym"] = PubStaticFun.GetPYWBM(temp.Rows[i]["name"].ToString().Trim(), 0);
                 temp.Rows[i]["wbm"] = PubStaticFun.GetPYWBM(temp.Rows[i]["name"].ToString().Trim(), 1);
             }
             temp.Rows[i]["type"]     = this.toolStripComboBox1.ComboBox.SelectedValue.ToString();
             temp.Rows[i]["typename"] = this.toolStripComboBox1.ComboBox.Text.ToString();
             if (temp.Rows[i]["name"].ToString().Trim() == "")
             {
                 temp.Rows[i].Delete();
             }
         }
         databaseupdate("select *  from   ss_ShblJcsj where 1=2", ((DataTable)this.dataGridView1.DataSource));
         ((DataTable)this.dataGridView1.DataSource).AcceptChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         FrmShblJcwh_Load(null, null);
         try
         {
             this.dataGridView1.CurrentCell = this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Cells[0];
         }
         catch { }
     }
 }
Beispiel #13
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                this.Cursor       = PubStaticFun.WaitCursor();
                btnSelect.Enabled = false;

                int tjlx = 0;
                if (rdozy.Checked == true)
                {
                    tjlx = 2;
                }
                if (rdomz.Checked == true)
                {
                    tjlx = 1;
                }
                ParameterEx[] parameters = new ParameterEx[6];
                parameters[0].Value = dtp1.Value.ToShortDateString() + "";
                parameters[1].Value = dtp2.Value.ToShortDateString() + "";
                parameters[2].Value = Convertor.IsNull(txtks.Tag, "0");
                parameters[3].Value = Convertor.IsNull(txtys.Tag, "0");
                parameters[4].Value = tjlx;

                parameters[0].Text = "@rq1";
                parameters[1].Text = "@rq2";
                parameters[2].Text = "@ksdm";
                parameters[3].Text = "@ysdm";
                parameters[4].Text = "@tjlx";


                parameters[5].Text          = "@bz";
                parameters[5].ParaDirection = ParameterDirection.Output;
                parameters[5].ParaSize      = 100;


                DataSet dset = new DataSet();
                InstanceForm.BDatabase.AdapterFillDataSet("SP_YP_KSSZB_TJ", parameters, dset, "kss", 30);

                dset.Tables[0].TableName      = "Tb";
                this.dataGridView1.DataSource = dset.Tables[0];

                Fun.AddRowtNo(dset.Tables[0]);

                btnSelect.Enabled = true;
            }
            catch (System.Exception err)
            {
                btnSelect.Enabled = true;
                MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
 private void Frmyjqr_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         Cursor.Current = PubStaticFun.WaitCursor();
         btref_Click(sender, e);
         Cursor.Current = Cursors.Default;
     }
 }
Beispiel #15
0
        private void buttj_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = PubStaticFun.WaitCursor();

                ParameterEx[] parameters = new ParameterEx[9];
                parameters[0].Text  = "@TJFS";
                parameters[0].Value = rbJkrq.Checked ? 0 : 1;

                parameters[1].Text  = "@rq1";
                parameters[1].Value = dtp1.Value.ToString();

                parameters[2].Text  = "@rq2";
                parameters[2].Value = dtp2.Value.ToString();

                parameters[3].Text  = "@jky";
                parameters[3].Value = Convert.ToInt32(Convertor.IsNull(cmbuser.SelectedValue, "0"));

                parameters[4].Text  = "@KS";
                parameters[4].Value = Convert.ToInt32(Convertor.IsNull(cmbDept.SelectedValue, "0"));

                int zffs = Convert.ToInt32(cmbZffs.SelectedValue);
                parameters[5].Text  = "@ZFFS";
                parameters[5].Value = zffs;

                //Modify By Kevin 2014-03-11
                //Begin
                parameters[6].Text  = "@SBILLNO";
                parameters[6].Value = txtSBillNo.Text.Trim();

                parameters[7].Text  = "@EBILLNO";
                parameters[7].Value = txtEBillNo.Text.Trim();
                //End

                //Modify By Tany 2011-12-06 增加机构编码过滤
                parameters[8].Text  = "@JGBM";
                parameters[8].Value = FrmMdiMain.Jgbm;

                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_ZY_TJ_YJJTJ", parameters, 120);

                AddRowtNo(tb);
                if (tb.Rows.Count > 0)
                {
                    tb.Rows[tb.Rows.Count - 1]["序号"] = "合计";
                }
                this.dataGridView1.DataSource = tb;
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Beispiel #16
0
        private void dataGridView2_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Cursor = PubStaticFun.WaitCursor();
            try
            {
                string inpatient_id = ((DataTable)this.dataGridView2.DataSource).Rows[this.dataGridView2.CurrentCell.RowIndex]["inpatient_id"].ToString();
                string baby_id      = ((DataTable)this.dataGridView2.DataSource).Rows[this.dataGridView2.CurrentCell.RowIndex]["baby_id"].ToString();
                //获得费用
                string ss = "select cast( row_number() over(order by a.xmid ) as varchar) xh,ITEM_NAME zfxmmc,sum(NUM) sl,min(COST_PRICE) dj, isnull(b.ZFBL,1) zfbl,isnull(b.ZFBL,1)*sum(SDVALUE) zfje "
                            + ",'' jsqm,c.name  bz1,(select config from jc_config where id=2) bz2,CUR_DEPT_NAME bz3,ryzd bz4,'' bz5,'' bz6,'' bz7  "
                            + "  from ZY_FEE_SPECI a  left join JC_YB_BL b on a.XMID=b.XMID and a.XMLY=b.XMLY  "
                            + "  left join  vi_zy_vinpatient_all c on a.inpatient_id=c.inpatient_id and a.baby_id=c.baby_id   "
                            + "    where a.CHARGE_BIT=1 and a.DELETE_BIT=0 and DISCHARGE_BIT=0   and SDVALUE!=0 and isnull(b.ZFBL,1)<>0 "
                            + " and a.inpatient_id='" + inpatient_id + "'and a.baby_id=" + baby_id + " group by a.XMID ,a.XMLY,a.ITEM_NAME,b.ZFBL,c.name,c.CUR_DEPT_NAME,c.ryzd  ";
                DataTable tbfee = FrmMdiMain.Database.GetDataTable(ss);
                ts_zyhs_fyxx.DataSet1.tabZfxmqdDataTable tbzfxm = new DataSet1.tabZfxmqdDataTable();
                //for(int i=0;i<tbfee.Rows.Count;)
                ParameterEx[] pa = new ParameterEx[4];
                pa[0].Text  = "hzxm";
                pa[0].Value = ((DataTable)this.dataGridView2.DataSource).Rows[this.dataGridView2.CurrentCell.RowIndex]["name"].ToString();
                pa[1].Text  = "yymc";
                pa[1].Value = TrasenFrame.Classes.Constant.HospitalName;

                pa[2].Text  = "ksmc";
                pa[2].Value = ((DataTable)this.dataGridView2.DataSource).Rows[this.dataGridView2.CurrentCell.RowIndex]["CUR_DEPT_NAME"].ToString();

                pa[3].Text  = "ryzd";
                pa[3].Value = ((DataTable)this.dataGridView2.DataSource).Rows[this.dataGridView2.CurrentCell.RowIndex]["ryzd"].ToString();



                ReportDocument rptdoc = new ReportDocument();
                string         ss1    = Constant.CustomDirectory;
                try
                {
                    rptdoc.Load(Constant.CustomDirectory + "\\Report\\zyhs_医保自费项目同意签字单.rpt");
                }
                catch
                {
                    rptdoc.Load(Constant.ApplicationDirectory + "\\Report\\zyhs_医保自费项目同意签字单.rpt");
                }
                //for (int i = 0; i < pa.Length; i++)
                //{
                //    rptdoc.SetParameterValue(pa[i].Text, pa[i].Value.ToString());
                //}
                rptdoc.SetDataSource(tbfee);
                // rptdoc.PrintOptions.PrinterName = prtdoc.PrinterSettings.PrinterName;

                // DataTable tb=ts_zyhs_fyxx.tabZfxm
                this.crystalReportViewer1.ReportSource = rptdoc;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            this.Cursor = Cursors.Default;
        }
Beispiel #17
0
        //补充上传病人剩余未上传费用
        private void btnSupplyLoad_Click(object sender, EventArgs e)
        {
            this.Cursor = PubStaticFun.WaitCursor();
            try
            {
                string zyh = txtZyh.Text.Trim();

                if (string.IsNullOrEmpty(zyh))
                {
                    MessageBox.Show("请输入住院号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                string strSql = string.Format("select INPATIENT_ID from ZY_INPATIENT where INPATIENT_NO ='{0}' and DEPT_ID='{1}'  ", zyh, InstanceForm.BCurrentDept.DeptId);
                string inp    = "";
                try
                {
                    inp = database.GetDataResult(strSql).ToString();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("未在本科室找到该住院号:" + zyh + " 的病人信息\r" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                bool CanAudit = ClsAuditCheck.CheckIsAuditCheck(inp, database);//是否需要智审
                if (!CanAudit)
                {
                    MessageBox.Show("该病人不满足进行智审判断条件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (MessageBox.Show("确认补传 住院号:" + zyh + " 该病人未上传费用吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
                {
                    return;
                }

                string strMsg = "";
                bool   bSuc   = DoVaildYbFee(new DataTable(), 9, 0, new Guid(inp), 0, true, out strMsg);

                if (!bSuc)
                {
                    MessageBox.Show(strMsg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                MessageBox.Show("补传病人费用成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch
            {
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
Beispiel #18
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();
            }
        }
Beispiel #19
0
 private void ViewDataGrid()
 {
     if (_dataSource != null)
     {
         PubStaticFun.SetCardGridTopAndLeft(this, cardGrid, this.Parent, this.Top, this.Left);
         cardGrid.Visible = true;
         this.Focus();
         this.SelectionStart = this.Text.Length;
     }
 }
Beispiel #20
0
        //查询处方按钮事件
        private void butcfcx_Click(object sender, System.EventArgs e)
        {
            this.Cursor = PubStaticFun.WaitCursor();

            try
            {
                DataTable tb = new DataTable();

                string rq1    = dtprq1.Value.ToShortDateString();
                string rq2    = dtprq2.Value.ToShortDateString();
                string wardid = InstanceForm.BCurrentDept.DeptId.ToString();

                //未发药
                //if (this.tabControl1.SelectedTab == this.tabPage1)
                //{

                //    if (_menuTag.Function_Name.Trim() == "Fun_ts_yf_zyfy_cf_cx" || _menuTag.Function_Name.Trim() == "Fun_ts_yf_zyfy_cf_jy")
                //        tb = ZY_FY.SelectCF(wardid, inpatient_id, rq1, rq2, "", "", "", "", "0", bk, (rdCydy.Checked ? 1 : 0), 0, cfh, InstanceForm.BDatabase, bdybz);
                //    else
                //        tb = ZY_FY.SelectCF(wardid, inpatient_id, rq1, rq2, "", "", "", "", "0", bk, (rdCydy.Checked ? 1 : 0), InstanceForm.BCurrentDept.DeptId, cfh, InstanceForm.BDatabase, bdybz);
                //}
                ////已发药
                //if (this.tabControl1.SelectedTab == this.tabPage2)
                //{
                //    string fybz = "1";
                //    if (_menuTag.Function_Name.Trim() == "Fun_ts_yf_zyfy_cf_jy")
                //        fybz = "9";

                //    if (_menuTag.Function_Name.Trim() == "Fun_ts_yf_zyfy_cf_cx")
                //        tb = ZY_FY.SelectCF(wardid, inpatient_id, "", "", "", "", rq1, rq2, fybz, bk, (rdCydy.Checked ? 1 : 0), 0, cfh, InstanceForm.BDatabase, bdybz);
                //    else
                //        tb = ZY_FY.SelectCF(wardid, inpatient_id, "", "", "", "", rq1, rq2, fybz, bk, (rdCydy.Checked ? 1 : 0), InstanceForm.BCurrentDept.DeptId, cfh, InstanceForm.BDatabase, bdybz);
                //}
                string fybz  = "1";
                int    bdybz = 0;

                string fyType = cmbFylb.SelectedValue.ToString();

                tb = ZY_FY.SelectCF(fyType, wardid, rq1, rq2, fybz, bdybz, InstanceForm.BDatabase);


                //添加处方
                this.AddPresc(tb);

                chkall.Checked = false;
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
Beispiel #21
0
        private void txtinpatientNo_KeyPress(object sender, KeyPressEventArgs e)
        {
            Cursor.Current = PubStaticFun.WaitCursor();

            cmbWard.SelectedValue = "-1";

            if (e.KeyChar == 13)
            {
                BingData();
            }
        }
Beispiel #22
0
        private void buttj_Click(object sender, EventArgs e)
        {
            try
            {
                if (cmbKdDept.Text.Contains("手术") == true)
                {
                }
                else
                {
                    MessageBox.Show("开单科室必须为手术室!", "提示");
                    return;
                }


                Cursor = PubStaticFun.WaitCursor();

                ParameterEx[] parameters = new ParameterEx[9];

                parameters[0].Text  = "@TYPE";
                parameters[0].Value = 0;
                parameters[1].Text  = "@TJ_TYPE";
                parameters[1].Value = 0;
                parameters[2].Text  = "@RQ1";
                parameters[2].Value = dtp1.Value.ToString();
                parameters[3].Text  = "@RQ2";
                parameters[3].Value = dtp2.Value.ToString();
                parameters[4].Text  = "@DEPT_BR";
                parameters[4].Value = Convert.ToInt32(Convertor.IsNull(cmbBrDept.SelectedValue, "0"));
                parameters[5].Text  = "@DEPT_ID";
                parameters[5].Value = Convert.ToInt32(Convertor.IsNull(cmbKdDept.SelectedValue, "0"));
                parameters[6].Text  = "@DEPT_SS";
                parameters[6].Value = Convert.ToInt32(Convertor.IsNull(cmbSqDept.SelectedValue, "0"));
                parameters[7].Text  = "@ISBRMX";
                parameters[7].Value = chkBrmx.Checked ? 1 : 0;
                parameters[8].Text  = "@JGBM";
                parameters[8].Value = FrmMdiMain.Jgbm;

                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_ZY_TJ_KSSRTJ_SSSQKS", parameters, 120);
                AddRowtNo(tb);
                if (tb.Columns.Contains("序号") && tb.Rows.Count > 0)
                {
                    tb.Rows[tb.Rows.Count - 1]["序号"] = "合计";
                }
                this.dataGridView1.DataSource = tb;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Beispiel #23
0
        public string DoInsertChange(int iStatus, DateTime importTime)
        {
            ;
            string strSql = "";

            strSql = string.Format(@"insert into jc_gf_patrec_Change( id, ylzh, name, pym, wbm, gflx, qy, brlx, del_bit, cfsl_xz, cfslM_xz, 
                                                                je_xz, jcje_xz, zlje_xz,yje_xz, GRJB, RZQK, ZFBL, RDWBH, DWBH, RRYLB, RGRBH, SFZH, xb ,memo,
                                                                DM,lxdh, csrq,GZSJ,DDYY1,DDYY2,DDYY3,bzsj,xzsj,ydsj,ydlb,drsj,cxsj,dr_bit,memo_1,memo_2,memo_3) 
                                                VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}','{30}','{31}','{32}','{33}','{34}','{35}','{36}','{37}','{38}','{39}','{40}','{41}')",
                                   DDLH.Replace("'", "") + _strZone,
                                   DDLH.Replace("'", ""),
                                   RGRXM.Replace("'", ""),
                                   PubStaticFun.GetPYWBM(RGRXM.Replace("'", ""), 0),
                                   PubStaticFun.GetPYWBM(RGRXM.Replace("'", ""), 1),
                                   _strWhsGf,
                                   _strZone,
                                   _strYbjklx,
                                   "0",
                                   _cfsl,
                                   _cfslM,
                                   _jexz,
                                   _rJcje,
                                   _rZlje,
                                   _yjexz,
                                   RGRJB,
                                   RRZQK,
                                   RZFBL,
                                   RDWBH,
                                   DWBH,
                                   RRYLB,
                                   RGRBH,
                                   SFZH,
                                   RGRXB,
                                   BZ,
                                   "2",
                                   NXDH.Replace("'", ""),
                                   string.IsNullOrEmpty(RZSSJ.Trim()) ? "" : RZSSJ.Trim(),
                                   string.IsNullOrEmpty(RGZSJ.Trim()) ? "" : RGZSJ.Trim(),
                                   RDDY1,
                                   RDDY2,
                                   RDDY3,
                                   string.IsNullOrEmpty(RBZSJ.Trim()) ? "" : RBZSJ.Trim(),
                                   string.IsNullOrEmpty(RSZSJ.Trim()) ? "" : RSZSJ.Trim(),
                                   string.IsNullOrEmpty(BDSJ.Trim()) ? "" : BDSJ.Trim(),
                                   BDLB,
                                   importTime,
                                   importTime.ToString("yyyy-MM-dd HH:mm:ss"),
                                   iStatus,
                                   "",
                                   RGRJB,
                                   RRZQK
                                   );
            return(strSql);
        }
Beispiel #24
0
 private void Frmmxcx_Load(object sender, System.EventArgs e)
 {
     for (int i = 0; i <= panel2.Controls.Count - 1; i++)
     {
         if (panel2.Controls[i].GetType().ToString() == "TrasenClasses.GeneralControls.ButtonDataGridEx")
         {
             TrasenClasses.GeneralControls.ButtonDataGridEx mydatagrid = (TrasenClasses.GeneralControls.ButtonDataGridEx)panel2.Controls[i];
             //PublicStaticFun.ModifyDataGridStyle(mydatagrid,0);
             PubStaticFun.ModifyDataGridStyle(mydatagrid, 0);
         }
     }
 }
Beispiel #25
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                this.Cursor       = PubStaticFun.WaitCursor();
                btnSelect.Enabled = false;

                int tjlx = 0;
                if (rdoks.Checked == true)
                {
                    tjlx = 1;
                }
                if (rdoys.Checked == true)
                {
                    tjlx = 2;
                }
                ParameterEx[] parameters = new ParameterEx[4];
                parameters[0].Value = dtpBeginTime.Value.ToShortDateString() + "";
                parameters[1].Value = dtpEndTime.Value.ToShortDateString() + "";
                parameters[2].Value = tjlx;
                parameters[3].Value = Convertor.IsNull(txtks.Tag, "0");

                parameters[0].Text = "@rq1";
                parameters[1].Text = "@rq2";
                parameters[2].Text = "@tjlx";
                parameters[3].Text = "@ksdm";

                DataSet dset = new DataSet();
                InstanceForm.BDatabase.AdapterFillDataSet("SP_YP_KSSZB_ZYDDD", parameters, dset, "kss", 30);

                dset.Tables[0].TableName = "Tb";
                myDataGrid1.DataSource   = dset.Tables[0];

                txtDDD.Text           = dset.Tables[1].Rows[0]["抗菌药物累计DDD"].ToString();
                txtoutPatient.Text    = dset.Tables[1].Rows[0]["出院人数"].ToString();
                txtAvgOutpatient.Text = dset.Tables[1].Rows[0]["平均住院天数"].ToString();
                txtpatientCount.Text  = dset.Tables[1].Rows[0]["同期收治忠者天数"].ToString();
                txtqiangdu.Text       = dset.Tables[1].Rows[0]["抗菌药物使用强度"].ToString();
                txtksssyl.Text        = dset.Tables[1].Rows[0]["抗生素使用率"].ToString();
                btnSelect.Enabled     = true;
            }
            catch (System.Exception err)
            {
                btnSelect.Enabled = true;
                MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
Beispiel #26
0
        public string DoInsert()
        {
            string strSql = "";

            strSql = string.Format(@"insert into jc_gf_patrec( id, ylzh,ylzh1,ylzh2, name, pym, wbm, gflx, qy, brlx, del_bit, cfsl_xz, cfslM_xz, je_xz, jcje_xz, zlje_xz,yje_xz, 
                                                                GRJB, RZQK, ZFBL, RDWBH, DWBH, RRYLB, RGRBH, SFZH, xb ,memo,
                                                                DM,lxdh, csrq,GZSJ,DDYY1,DDYY2,DDYY3,bzsj,xzsj,ydsj,ydlb,memo_1,memo_2,memo_3) 
                                                VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}','{30}','{31}','{32}','{33}','{34}','{35}','{36}','{37}','{38}','{39}','{40}')",
                                   DDLH.Replace("'", "") + _strZone,
                                   DDLH.Replace("'", ""),
                                   DDLH.Replace("'", ""),
                                   DDLH.Replace("'", ""),
                                   RGRXM.Replace("'", ""),
                                   PubStaticFun.GetPYWBM(RGRXM.Replace("'", ""), 0),
                                   PubStaticFun.GetPYWBM(RGRXM.Replace("'", ""), 1),
                                   _strWhsGf,
                                   _strZone,
                                   _strYbjklx,
                                   "0",
                                   _cfsl,
                                   _cfslM,
                                   _jexz,
                                   _rJcje,
                                   _rZlje,
                                   _yjexz,
                                   RGRJB,
                                   RRZQK,
                                   RZFBL,
                                   RDWBH,
                                   DWBH,
                                   RRYLB,
                                   RGRBH,
                                   SFZH,
                                   RGRXB,
                                   BZ,
                                   "2",
                                   NXDH.Replace("'", ""),
                                   string.IsNullOrEmpty(RZSSJ.Trim()) ? "" : RZSSJ.Trim(),
                                   string.IsNullOrEmpty(RGZSJ.Trim()) ? "" : RGZSJ.Trim(),
                                   RDDY1,
                                   RDDY2,
                                   RDDY3,
                                   string.IsNullOrEmpty(RBZSJ.Trim()) ? "" : RBZSJ.Trim(),
                                   string.IsNullOrEmpty(RSZSJ.Trim()) ? "" : RSZSJ.Trim(),
                                   string.IsNullOrEmpty(BDSJ.Trim()) ? "" : BDSJ.Trim(),
                                   BDLB,
                                   "",
                                   RGRJB,
                                   RRZQK);

            //InstanceForm._database.DoCommand(strSql);
            return(strSql);
        }
Beispiel #27
0
 private void textBox2_KeyPress_1(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '\r')
     {
         if ((sender as Control).Name == "textBox2")
         {
             this.textBox4.Text = PubStaticFun.GetPYWBM(this.textBox2.Text, 0);
             this.textBox5.Text = PubStaticFun.GetPYWBM(this.textBox2.Text, 1);
         }
         this.SelectNextControl((sender as TextBox), true, false, false, true);
     }
 }
Beispiel #28
0
        private void textBox_TextChanged(object sender, System.EventArgs e)
        {
            string Sort = "";

            TBox = (TextBox)sender;
            this.GrdSel.Visible = true;
            if (TBox == this.txtXY)
            {
                this.GrdSel.Top = 128;
                Sort            = "D";
            }

            string str = TBox.Text.Trim().Replace("'", ".").ToUpper();

            str = str == "" ? "" : " and (拼音码 like '" + str + "%' )";
            //			string sSql="select name NAME,coding ICD,py_code 拼音码 from base_disease where sort='"+Sort+"' and py_code like '"+str+"%'";
            //			if (diseaseTb==null)
            //			{
            //string sSql = "select top 20 name NAME,coding ICD,py_code 拼音码,sort from jc_disease where py_code like '" + TBox.Text.Trim() + "%' order by len(py_code)";
            //string sSql = "select top 20 name NAME,coding ICD,py_code 拼音码,sort from jc_disease where 1=1 " + (ybjklx <= 0 ? "" : " and ybjklx =" + ybjklx) + " and py_code like '" + TBox.Text.Trim() + "%' order by len(py_code)";


            //Modify By Tany 2015-05-26 医保接口类型=0的时候也要过滤
            //Modify by jchl 2015-08-22 加入ybjbbm
            string sSql = "select top 20 name NAME,coding ICD,'' as YBJBBM,'' as YBJBMC,py_code 拼音码,sort from jc_disease where 1=1 " + (ybjklx < 0 ? "" : " and ybjklx =" + ybjklx) + " and py_code like '" + TBox.Text.Trim() + "%' order by len(py_code)";

            if (ybjklx == 40 && yblx >= 0)
            {
                //医保诊断带出医保编码
                sSql = @"select top 20 a.name NAME,a.coding ICD,b.YBJBBM,b.YBJBMC,a.py_code 拼音码,a.wb_code 五笔码,a.sort 
                            from jc_disease a
                            inner join JC_DISEASE_YYYBDZ b on a.CODING=b.YYJBBM 
                            where 1=1 and a.ybjklx =" + ybjklx + " and (py_code like '" + TBox.Text.Trim() + "%'  or wb_code like '%" + TBox.Text.Trim() + "%' ) order by len(py_code)";
            }


            diseaseTb = FrmMdiMain.Database.GetDataTable(sSql);
            dt        = null;
            dt        = diseaseTb.Clone();
            //			}
            DataRow[] diseaseDR = diseaseTb.Select();//("sort='"+Sort+"'","拼音码");    //暂时屏蔽
            GrdSel.DataSource = null;
            dt.Clear();
            foreach (DataRow dr in diseaseDR)
            {
                dt.Rows.Add(dr.ItemArray);
            }
            //			dt=DatabaseAccess.GetDataTable(DatabaseType.IbmDb2ZY,sSql);

            GrdSel.DataSource = dt;
            PubStaticFun.ModifyDataGridStyle(GrdSel, 0);
        }
Beispiel #29
0
        private void buttj_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = PubStaticFun.WaitCursor();

                //Modify By Kevin 2013-06-18
                ParameterEx[] parameters = new ParameterEx[5];
                parameters[0].Text  = "@rq1";
                parameters[0].Value = dtp1.Value.ToString();

                parameters[1].Text  = "@rq2";
                parameters[1].Value = dtp2.Value.ToString();

                parameters[2].Text  = "@jky";
                parameters[2].Value = Convert.ToInt32(Convertor.IsNull(cmbuser.SelectedValue, "0"));

                //Modify By Tany 2012-01-05
                int type = 0;
                if (rbJkczrq.Checked)
                {
                    type = 2;
                }
                else if (rbSfrq.Checked)
                {
                    type = 1;
                }
                parameters[3].Text  = "@TYPE";
                parameters[3].Value = type;

                //Add By Kevin 2013-06-18 增加机构编码
                parameters[4].Text  = "@JGBM";
                parameters[4].Value = FrmMdiMain.Jgbm;

                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_ZY_TJ_JKHZTJ", parameters, 120);

                AddRowtNo(tb);
                if (tb.Rows.Count > 0)
                {
                    tb.Rows[tb.Rows.Count - 1]["序号"] = "合计";
                }
                this.dataGridView1.DataSource = tb;
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Beispiel #30
0
        private void btRefreshPrinter_Click(object sender, System.EventArgs e)
        {
            cmbPrinter.Enabled             = true;
            cmbReportPrinter.Enabled       = true;
            cmbPrinter.DropDownStyle       = ComboBoxStyle.DropDownList;
            cmbReportPrinter.DropDownStyle = ComboBoxStyle.DropDownList;
            Cursor.Current = PubStaticFun.WaitCursor();
            LoadDefaultPrinter();
            Cursor.Current = Cursors.Default;
            FrmPrinterSetting fPrinterSet = new FrmPrinterSetting();

            fPrinterSet.ShowDialog(this);
        }