private void FrmPvsCancelScn_Load(object sender, EventArgs e) { Cursor.Current = PubStaticFun.WaitCursor(); this.myDataGrid1.Enabled = true; this.ShowData(); this.myDataGrid1.TableStyles[0].GridColumnStyles.Clear(); string[] GrdMappingName = { "选", "医嘱日期", "频次", "内容", "规格", "数量", "单位", "次数", "剂数", "单价", "金额", "发送信息", "执行科室", "记账信息", "发药信息", "记账类型", "charge_bit", "finish_bit", "delete_bit", "Order_ID", "ID", "EXECDEPT_ID", "dept_br", "dept_id", "item_code", "day1", "day2", "发送护士", "记账员", "基数药", "isJZ", "jz_flag", "DISCHARGE_BIT", "名称", "iskdksly", "xmly", //36 "发药单号", "药品批次", "药品批号", "发药时间", "发药人", "领药科室", "领药类型", "操作人", "操作时间", "type", "statitem_code", "转打包" };//名称是给汇总用的//Add By Tany 2010-12-15 增加statitem_code int[] GrdWidth = { 2, 10, 4, 24, 10, 6, 6, 4, 4, 8, 8, 12, 10, 12, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8 , 15, 8, 10, 8, 8, 15, 0, 0, 6 }; int[] Alignment = { 0, 0, 0, 0, 0, 2, 1, 2, 2, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2 , 0, 2, 0, 0, 0, 0, 0, 0, 0 }; int[] ReadOnly = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; this.InitGridYZ(GrdMappingName, GrdWidth, Alignment, ReadOnly, this.myDataGrid1); PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0);//去掉网格 Cursor.Current = Cursors.Default; }
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); }
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); } } }
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); }
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.DataGridEx") { TrasenClasses.GeneralControls.DataGridEx mydatagrid = (TrasenClasses.GeneralControls.DataGridEx)panel2.Controls[i]; mydatagrid.MouseClick -= new MouseEventHandler(mydatagrid_MouseClick); //add by zouchihua 2012-3-10 mydatagrid.MouseClick += new MouseEventHandler(mydatagrid_MouseClick); //add by zouchihua 2012-3-10 //PublicStaticFun.ModifyDataGridStyle(mydatagrid,0); PubStaticFun.ModifyDataGridStyle(mydatagrid, 0); } } }
private void txtzd_TextChanged(object sender, EventArgs e) { string str = txtzd.Text.Trim().Replace("'", ".").ToUpper(); str = str == "" ? "" : " (py_code 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 tj = ""; tbdisease.DefaultView.RowFilter = str; cardGrid.DataSource = tbdisease.DefaultView.ToTable(); PubStaticFun.ModifyDataGridStyle(cardGrid, 0); }
private void frmCancel_Load(object sender, System.EventArgs e) { string[] GrdMappingName = { "说明", "床号", "住院号", "姓名", "申请日期", "项目名称", "数量", "单价", "金额", "取消日期", "取消者", "xh", "applycode", "baby_id", "applydate", "id", "hditem_id", "order_id", "mngtype" }; int[] GrdWidth = { 8, 6, 9, 10, 10, 30, 4, 8, 8, 10, 8, 0, 0, 0, 0, 0, 0, 0, 0 }; int[] Alignment = { 0, 1, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int[] ReadOnly = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; myFunc.InitGrid(GrdMappingName, GrdWidth, Alignment, ReadOnly, this.myDataGrid1); PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0); this.bt确认.Enabled = false; // this.Show_Date(); }
private void ShowData() { Cursor.Current = PubStaticFun.WaitCursor(); DataTable myTb = DoGetScanBit(txtZyh.Text.Trim(), 0, FrmMdiMain.CurrentDept.DeptId, dtpStr.Value, dtpEnd.Value); DataColumn col = new DataColumn(); col.DataType = System.Type.GetType("System.Boolean"); col.AllowDBNull = false; col.ColumnName = "选"; col.DefaultValue = false; myTb.Columns.Add(col); this.myDataGrid1.DataSource = myTb; this.myDataGrid1.TableStyles[0].RowHeaderWidth = 5; if (myTb.Rows.Count != 0) { for (int i = myTb.Rows.Count - 1; i >= 0; i--) { myTb.Rows[i]["数量"] = string.Format("{0:F2}", myTb.Rows[i]["数量"]); if (myTb.Rows[i]["发送信息"].ToString().Trim() != "") { myTb.Rows[i]["发送信息"] = myTb.Rows[i]["发送信息"].ToString().Trim() + "-" + myTb.Rows[i]["day1"].ToString().Trim() + " " + myTb.Rows[i]["发送护士"].ToString().Trim(); } if (myTb.Rows[i]["记账信息"].ToString().Trim() != "") { myTb.Rows[i]["记账信息"] = myTb.Rows[i]["记账信息"].ToString().Trim() + "-" + myTb.Rows[i]["day2"].ToString().Trim() + " " + myTb.Rows[i]["记账员"].ToString().Trim(); } if (myTb.Rows[i]["发药信息"].ToString().Trim() != "") { myTb.Rows[i]["发药信息"] = myTb.Rows[i]["发药信息"].ToString().Trim() + "-" + myTb.Rows[i]["day3"].ToString().Trim() + " " + myTb.Rows[i]["发药员"].ToString().Trim(); } } } PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0); Cursor.Current = Cursors.Default; }
private void ShowData(string wardId) { string sSql; sSql = @"select ward_name 病区,cur_dept_name 科室,room_no 房号,bed_no 床号,inpatient_no 住院号,a.name 病人姓名,age 年龄, " + " sex_name 性别,case when DISCHARGETYPE=1 then yblx_name else jsfs_name end 类型,zzdoc_name 主治医生,zydoc_name 经治医生,nurs_name 责任护士,(case when b.name is null then (select top 1 name from jc_disease where coding=a.in_diagnosis) else b.name end ) 入院诊断,in_date 入院日期, " + " ryts 天数,hljb_name 护理级别,case when order_bw is not null and order_bw<>dbo.fun_getemptyguid() then '√' else '' end 病危, " + " case when order_bz is not null and order_bz<>dbo.fun_getemptyguid() then '√' else '' end 病重, " + " order_ys_spec 饮食," + " case when (select COUNT(1) from ZY_ORDERRECORD where INPATIENT_ID=A.INPATIENT_ID and BABY_ID=A.BABY_ID and (ORDER_CONTEXT like '%陪护%' OR ORDER_CONTEXT like '%陪人%' ) AND MNGTYPE=0 AND STATUS_FLAG=2 AND DELETE_BIT=0)=0 then '' else '√' end 陪护, " + //add by zouchihua 2013-8-1陪人陪护 " dbo.FUN_ZYHS_GETCSMTZ(A.INPATIENT_ID,A.BABY_ID) 测生命体征, INPATIENT_ID, BABY_ID," + //add by 岳成成 2014-08-07 " dept_id " + //Modify By Tany 2015-07-13 增加dept_id " from vi_zy_vinpatient_bed a left join jc_disease b on a.in_diagnosis=b.coding and isnull(a.ybjklx,0)=b.ybjklx " + " where ward_id='" + wardId + "' order by room_no,dbo.Fun_GetBedToOrder( (case when left( bed_no,1)='+' then '999'+ bed_no else bed_no end) )"; string[] GrdMappingName = { "病区", "科室", "房号", "床号", "住院号", "病人姓名", "年龄", "性别", "类型", "主治医生", "经治医生", "责任护士", "入院诊断", "入院日期", "天数", "护理级别", "病危", "病重", "饮食", "陪护", "测生命体征", "INPATIENT_ID", "BABY_ID" }; int[] GrdWidth = { 6, 12, 4, 4, 9, 8, 4, 4, 8, 8, 8, 8, 14, 10, 4, 10, 4, 4, 18, 4, 12, 0, 0 }; int[] Alignment = { 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; myFunc.InitGridSQL(sSql, GrdMappingName, GrdWidth, Alignment, this.myDataGrid1); PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0); myFunc.SelRow(this.myDataGrid1); }
private void Show_Date_Inpatient(string Inpatient_no) { Cursor.Current = PubStaticFun.WaitCursor(); string sSql = @"select INPATIENT_ID,BABY_ID,DEPT_ID,ward_name 病区,cur_dept_name 科室,room_no 房号,bed_no 床号,inpatient_no 住院号,a.name 病人姓名,age 年龄, " + " sex_name 性别,case when DISCHARGETYPE=1 then yblx_name else jsfs_name end 类型,zzdoc_name 主治医生,zydoc_name 经治医生,nurs_name 责任护士,(case when b.name is null then (select top 1 name from jc_disease where coding=a.in_diagnosis) else b.name end ) 入院诊断,in_date 入院日期, " + " ryts 天数,hljb_name 护理级别,case when order_bw is not null and order_bw<>dbo.fun_getemptyguid() then '√' else '' end 病危, " + " case when order_bz is not null and order_bz<>dbo.fun_getemptyguid() then '√' else '' end 病重, " + " order_ys_spec 饮食," + " case when (select COUNT(1) from ZY_ORDERRECORD where INPATIENT_ID=A.INPATIENT_ID and BABY_ID=A.BABY_ID and (ORDER_CONTEXT like '%陪护%' OR ORDER_CONTEXT like '%陪人%' ) AND MNGTYPE=0 AND STATUS_FLAG=2 AND DELETE_BIT=0)=0 then '' else '√' end 陪护, " + //add by zouchihua 2013-8-1陪人陪护 " dbo.FUN_ZYHS_GETCSMTZ(A.INPATIENT_ID,A.BABY_ID) 测生命体征" + //add by 岳成成 2014-08-07 " from vi_zy_vInpatient_All a left join jc_disease b on a.in_diagnosis=b.coding and isnull(a.ybjklx,0)=b.ybjklx " + " where inpatient_no='" + Inpatient_no + "' order by room_no,dbo.Fun_GetBedToOrder( (case when left( bed_no,1)='+' then '999'+ bed_no else bed_no end) )"; // str = @"select 病区,所属科室,床号,住院号,姓名,性别,年龄,结算类型,病人类型,险种类型,待遇类型, ''as 补缴款, 入院日期, // a.INPATIENT_ID,a.Baby_ID,a.DEPT_ID,出院日期,医保类型,工作单位,身份证,管床医生 , 费用限额 ,flag,ryts , // isnull((select top 1 XJZF from ZY_YB_JSB_RJJL where DELETE_BIT=0 and inpatient_id=a.inpatient_id order by YBJS_DATE desc ) , // (select top 1 XJZF from zy_yb_jsb where delete_bit=0 and cz_flag=0 and inpatient_id=a.inpatient_id )) 现金支付 // from (SELECT BED_NO 床号,INPATIENT_NO 住院号,NAME 姓名,SEX_NAME 性别,age 年龄,CUR_DEPT_NAME 所属科室, // JSFS_NAME 结算类型,BRLX_NAME 病人类型,in_date 入院日期,INPATIENT_ID,Baby_ID,DEPT_ID // ,out_date 出院日期,yblx_name 医保类型,xzlx_name 险种类型,dylx_name 待遇类型,gzdw 工作单位,social_no 身份证,WARD_NAME 病区, // zydoc_name 管床医生 , YJJ_LIMIT 费用限额,flag ,ryts FROM vi_zy_vInpatient_All // WHERE inpatient_no='" + Inpatient_no + "' and flag<>10) a order by dbo.Fun_GetBedToOrder(床号),a.INPATIENT_ID,a.Baby_ID"; // //WHERE WARD_ID= '" + InstanceForm.BCurrentDept.WardId + "' and inpatient_no='" + Inpatient_no + "' and flag<>10) a order by dbo.Fun_GetBedToOrder(床号),a.INPATIENT_ID,a.Baby_ID"; string[] GrdMappingName = { "病区", "科室", "房号", "床号", "住院号", "病人姓名", "年龄", "性别", "类型", "主治医生", "经治医生", "责任护士", "入院诊断", "入院日期", "天数", "护理级别", "病危", "病重", "饮食", "陪护", "测生命体征", "INPATIENT_ID", "BABY_ID" }; int[] GrdWidth = { 6, 12, 4, 4, 9, 8, 4, 4, 8, 8, 8, 8, 14, 10, 4, 10, 4, 4, 18, 4, 12, 0, 0 }; int[] Alignment = { 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; myFunc.InitGridSQL(sSql, GrdMappingName, GrdWidth, Alignment, this.myDataGrid1); PubStaticFun.ModifyDataGridStyle(myDataGrid1, 0); //myFunc.SelRow(this.myDataGrid1); //this.myFunc.ShowGrid(1, str, this.myDataGrid1); Cursor.Current = Cursors.Default; }