void LoadCmbHy() { cmbHy.DataSource = xtbiz.GetXtZd(22);//服务行业 cmbHy.DisplayMember = "xmmc"; cmbHy.ValueMember = "xmmc"; cmbHy.SelectedIndex = -1; }
void DataBind() { tv_tc.Nodes.Clear(); TreeNode node = new TreeNode("体检套餐"); DataTable dt_tjtc = ywszbiz.Get_tj_tc_hd(); foreach (DataRow dr in dt_tjtc.Rows) { string str_bh = dr["bh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_bh; node.Nodes.Add(node1); } tv_tc.Nodes.Add(node); tv_tc.ExpandAll(); new Common.Common().AddImage(node); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_tjywlx.DataSource = xtbiz.GetXtZd(10);//业务类型 cmb_tjywlx.DisplayMember = "xmmc"; cmb_tjywlx.ValueMember = "bzdm"; }
private void Form_zjjl_zdjy_Load(object sender, EventArgs e) { DataTable dt = biz.GetXtZd(20); dataGridView1.DataSource = dt; this.ActiveControl = txt_mc; }
void BindData() { cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedIndex = -1; cmb_mz.DataSource = xtbiz.GetXtZd(2);//民族 cmb_mz.DisplayMember = "xmmc"; cmb_mz.ValueMember = "bzdm"; cmb_mz.SelectedIndex = -1; DataTable dt = tjdjbiz.Get_TJ_TJDJB(str_tjbh, str_tjcs); if (dt.Rows.Count < 1) { return; } str_djlsh = dt.Rows[0]["djlsh"].ToString().Trim(); txt_xm.Text = dt.Rows[0]["xm"].ToString().Trim(); cmb_xb.SelectedValue = dt.Rows[0]["xb"].ToString().Trim(); txt_nl.Text = dt.Rows[0]["nl"].ToString().Trim(); cmb_mz.SelectedValue = dt.Rows[0]["mz"].ToString().Trim(); txt_mobile.Text = dt.Rows[0]["mobile"].ToString().Trim(); txt_sfzh.Text = dt.Rows[0]["sfzh"].ToString().Trim(); }
void LoadCmbHy() { dt = new DataTable(); dt = xtbiz.GetXtZd(16);//行业 cmbHy.DataSource = dt; cmbHy.DisplayMember = "xmmc"; cmbHy.ValueMember = "bzdm"; cmbHy.SelectedIndex = -1; }
void DataBind_TJLX() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tjxmb.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["tjxm"].ToString().Trim(); node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh); foreach (DataRow dr1 in dt_tjxmb.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["tjxm"].ToString().Trim(); node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); AddImage(node); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; }
private void Form_yxjghz_Load(object sender, EventArgs e) { dtp_begin.Value = xtbiz.GetServerDate(); dtp_end.Value = dtp_begin.Value; cmb_rylx.DataSource = xtbiz.GetXtZd(8);//人员类别 cmb_rylx.DisplayMember = "xmmc"; cmb_rylx.ValueMember = "bzdm"; cmb_rylx.SelectedIndex = -1; cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedIndex = -1; }
private void Form_sqdsz_Load(object sender, EventArgs e) { DataBind(); cmb_bblx.DataSource = xtbiz.GetXtZd(6);//标本类型 cmb_bblx.DisplayMember = "xmmc"; cmb_bblx.ValueMember = "bzdm"; cmb_jcjylx.SelectedIndexChanged -= new EventHandler(cmb_jcjylx_SelectedIndexChanged); cmb_jcjylx.DataSource = xtbiz.GetXtZd(9);//检查类型 cmb_jcjylx.DisplayMember = "xmmc"; cmb_jcjylx.ValueMember = "bzdm"; cmb_jcjylx.SelectedIndexChanged += new EventHandler(cmb_jcjylx_SelectedIndexChanged); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 }
private void Form_tjbg_Load(object sender, EventArgs e) { dgv_tjdjb.AutoGenerateColumns = false; txt_tjdw.Tag = ""; str_tjdw = xtbiz.GetXtCsz("TjDwMc"); str_dwdh = xtbiz.GetXtCsz("TjDwDh"); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedValue = "%"; dtp_begin.Value = xtbiz.GetServerDate(); dtp_end.Value = dtp_begin.Value; str_dwczhm = xtbiz.GetXtCsz("dwczdh").Trim(); str_dwlxr = xtbiz.GetXtCsz("dwlxr").Trim(); str_dwdz = xtbiz.GetXtCsz("dwdz").Trim(); str_version = xtbiz.GetXtCsz("version").Trim(); try { List <string> listprint = Common.Common.GetPrinterInfo(); if (listprint != null && listprint.Count > 0) { cboxPrinter.Items.AddRange(listprint.ToArray()); cboxPrinter.SelectedIndex = 0; } } catch { } }
private void Form_tjbg_Load(object sender, EventArgs e) { if (!Program.sfzc)//没有注册 { if (tjdjbiz.GetTjCounts() > 300) { MessageBox.Show("软件试用期已到,请联系供应商: !", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } } txt_tjdw.Tag = ""; cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedValue = "%"; cmb_bggs.Text = xtbiz.GetXtCsz("BggsType").Trim(); dtp_begin.Value = xtbiz.GetServerDate(); dtp_end.Value = dtp_begin.Value; //选择打印机试试 try { List <string> listprint = Common.Common.GetPrinterInfo(); if (listprint != null && listprint.Count > 0) { cboxPrinter.Items.AddRange(listprint.ToArray()); cboxPrinter.SelectedIndex = 0; } } catch { } }
private void Form_excel_Load(object sender, EventArgs e) { dtp_tjrq.Value = xtbiz.GetServerDate(); cmb_ywlx.DataSource = xtbiz.GetXtZd(10);//体检业务 cmb_ywlx.DisplayMember = "xmmc"; cmb_ywlx.ValueMember = "bzdm"; cmb_ywlx.SelectedValue = "01"; }
private void Form_zyjk_tjbg_Load(object sender, EventArgs e) { dtTjhz = new Common.Common().CerateTable(dgvTjhz); dgvTjhz.DataSource = dtTjhz; cmbRylb.DataSource = xtbiz.GetXtZd(8);//人员类别 cmbRylb.DisplayMember = "xmmc"; cmbRylb.ValueMember = "bzdm"; cmbRylb.SelectedIndex = -1; }
void DataBind() { str_code = xtbiz.GetXtCsz("ZsJyCode"); //综述建议开头代码 str_sfqyzczsjy = xtbiz.GetXtCsz("SfQyZcZsJy"); //是否启用正常综述建议 str_xzedit = xtbiz.GetXtCsz("XzEdit"); //0不做任何限制,1限制,只有录入人可以修改 dtp_zjrq.Value = xtbiz.GetServerDate(); dtp_fcrq.Value = dtp_zjrq.Value; cmb_zjys.DataSource = tjjgbiz.Get_Xt_ZJYS(); cmb_zjys.DisplayMember = "czymc"; cmb_zjys.ValueMember = "czyid"; cmb_zjys.SelectedValue = Program.userid; if (object.Equals(null, cmb_zjys.SelectedValue)) { try { cmb_zjys.SelectedIndex = 0; } catch { } } cmb_tjjl.DataSource = xtbiz.GetXtZd(5); cmb_tjjl.ValueMember = "bzdm"; cmb_tjjl.DisplayMember = "xmmc"; cmb_tjjl.SelectedIndex = -1; cmb_jktj.DataSource = xtbiz.GetXtZd(14); cmb_jktj.ValueMember = "bzdm"; cmb_jktj.DisplayMember = "xmmc"; cmb_jktj.SelectedIndex = -1; cmb_zytjjl.DataSource = xtbiz.GetXtZd(24); cmb_zytjjl.ValueMember = "bzdm"; cmb_zytjjl.DisplayMember = "xmmc"; cmb_zytjjl.SelectedIndex = -1; cmb_zyjy.DataSource = xtbiz.GetXtZd(25); cmb_zyjy.ValueMember = "bzdm"; cmb_zyjy.DisplayMember = "xmmc"; cmb_zyjy.SelectedIndex = -1; }
private void Form_tjbg_Load(object sender, EventArgs e) { txt_tjdw.Tag = ""; cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedValue = "%"; dtp_begin.Value = xtbiz.GetServerDate(); dtp_end.Value = dtp_begin.Value; }
private void Form_dwfz_Load(object sender, EventArgs e) { new Common.Common().AddImages(imageList1); tv_tjdw.ImageList = imageList1; lv_tjxm.SmallImageList = imageList1; lv_tjxm.StateImageList = imageList1; lv_tjxm.LargeImageList = imageList1; tj_mrfz_all(); // by zhz DataBind(); cmb_xb.DataSource = xtbiz.GetXtZd(1); //性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; }
private void Form_tjbg_Load(object sender, EventArgs e) { txt_tjdw.Text = Program.now_tjdwmc;//by zhz txt_tjdw.Tag = Program.now_tjdwid; str_tjdw = xtbiz.GetXtCsz("TjDwMc"); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; cmb_xb.SelectedValue = "%"; dtp_begin.Value = xtbiz.GetServerDate(); dtp_end.Value = dtp_begin.Value; }
private void Form_xtczy_Load(object sender, EventArgs e) { dgv_czy.DataSource = xtggbiz.Get_xt_czy(); cmb_yhz.DataSource = xtggbiz.Get_xt_yhz();//用户组 cmb_yhz.DisplayMember = "yhzmc"; cmb_yhz.ValueMember = "yhzid"; cmb_rysx.DataSource = xtbiz.GetXtZd(13);//人员属性 cmb_rysx.DisplayMember = "xmmc"; cmb_rysx.ValueMember = "bzdm"; cmb_ks.DataSource = ywszbiz.Get_tj_tjlxb();//科室 cmb_ks.DisplayMember = "mc"; cmb_ks.ValueMember = "lxbh"; }
void DataBind() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 AddTree(); cmb_ksmc.SelectedIndexChanged -= new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_ksmc.DataSource = ywszbiz.Get_tj_tjlxb(); cmb_ksmc.DisplayMember = "mc"; cmb_ksmc.ValueMember = "lxbh"; cmb_ksmc.SelectedIndexChanged += new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; }
void DataBind() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tj_tjlxb = ywszbiz.Get_tj_zhxm_hd(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tj_tjlxb.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["bh"].ToString().Trim(); //编号 if (dr4["yxbz"].ToString().Trim() == "0") //停用 { node4.ForeColor = Color.Red; } node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tjxmb = ywszbiz.Get_tj_zhxm_hd(str_lxbh); foreach (DataRow dr1 in dt_tjxmb.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["bh"].ToString().Trim(); if (dr1["yxbz"].ToString().Trim() == "0")//停用 { node2.ForeColor = Color.Red; } node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); AddImage(node); cmb_ksmc.SelectedIndexChanged -= new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_ksmc.DataSource = ywszbiz.Get_tj_tjlxb(); cmb_ksmc.DisplayMember = "mc"; cmb_ksmc.ValueMember = "lxbh"; cmb_ksmc.SelectedIndexChanged += new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_bblx.DataSource = xtbiz.GetXtZd(6);//标本类型 cmb_bblx.DisplayMember = "xmmc"; cmb_bblx.ValueMember = "bzdm"; cmb_jyjclx.DataSource = xtbiz.GetXtZd(9);//检查类型 cmb_jyjclx.DisplayMember = "xmmc"; cmb_jyjclx.ValueMember = "bzdm"; cmb_sflb.DataSource = xtbiz.GetXtZd(7);//收费类型 cmb_sflb.DisplayMember = "xmmc"; cmb_sflb.ValueMember = "bzdm"; }
void LoadDgvGz() { dtGz = new DataTable(); dtGz = xtBiz.GetXtZd(19);//工种 dgvGz.DataSource = dtGz; }
private void Form_zywj_Load(object sender, EventArgs e) { BindData(); //创建TabPage DataTable dt_TabPages = xtbiz.GetXtZd(28); foreach (DataRow dr in dt_TabPages.Rows) { TabPage tabpage = new TabPage(dr["xmmc"].ToString()); tabpage.Name = dr["bzdm"].ToString(); tabpage.BackColor = Color.White; DataTable dt_TabPage = tjjgbiz.Get_XT_ZYWQ(dr["bzdm"].ToString()); for (int i = 0; i < dt_TabPage.Rows.Count; i++) { System.Windows.Forms.Panel panel = new System.Windows.Forms.Panel(); panel.Name = dt_TabPage.Rows[i]["XH"].ToString(); panel.Size = new Size(750, 30); panel.Location = new System.Drawing.Point(5, i * 30); panel.BackColor = Color.Transparent; //panel.BorderStyle = BorderStyle.FixedSingle; if (i % 2 == 1) { panel.BackColor = Color.LightGray; } Label label = new Label(); label.Size = new Size(500, 30); label.Text = dt_TabPage.Rows[i]["XH"].ToString() + "、" + dt_TabPage.Rows[i]["WT"].ToString(); label.Location = new System.Drawing.Point(1, 8); label.BackColor = Color.Transparent; panel.Controls.Add(label); for (int j = 0; j < 2; j++) { RadioButton radiobutton = new RadioButton(); radiobutton.Size = new Size(100, 45); radiobutton.BackColor = Color.Transparent; radiobutton.Location = new System.Drawing.Point(501 + j * 100, -8); if (j == 0) { radiobutton.Text = dt_TabPage.Rows[i]["XX1"].ToString(); radiobutton.Tag = 1;//1分 } if (j == 1) { radiobutton.Text = dt_TabPage.Rows[i]["XX2"].ToString(); radiobutton.Tag = 0;//0分 } radiobutton.CheckedChanged += new EventHandler(radiobutton_CheckedChanged); panel.Controls.Add(radiobutton); } tabpage.Controls.Add(panel); } Button button = new Button(); button.Text = "下一页(&N)"; button.ForeColor = Color.Red; button.Size = new Size(85, 24); button.Location = new System.Drawing.Point(600, 450); button.Click += new EventHandler(button_Click); tabpage.Controls.Add(button); tabControl.Controls.Add(tabpage); } }
private void CreateControl() { //创建TabPage DataTable dt_TabPages = xtbiz.GetXtZd(28); TabPages = dt_TabPages.Rows.Count; int row = 0; foreach (DataRow dr in dt_TabPages.Rows) { row = row + 1;//行号 TabPage tabpage = new TabPage(dr["xmmc"].ToString()); tabpage.Name = dr["bzdm"].ToString(); tabpage.BackColor = Color.White; DataTable dt_TabPage = tjjgbiz.Get_XT_ZYWQ(dr["bzdm"].ToString()); for (int i = 0; i < dt_TabPage.Rows.Count; i++) { System.Windows.Forms.Panel panel = new System.Windows.Forms.Panel(); panel.Name = dt_TabPage.Rows[i]["XH"].ToString(); panel.Size = new Size(1024, 30); panel.Location = new System.Drawing.Point(5, i * 30); panel.BackColor = Color.Transparent; //panel.BorderStyle = BorderStyle.FixedSingle; if (i % 2 == 1) { panel.BackColor = Color.LightGray; } Label label = new Label(); label.Size = new Size(704, 30); label.Text = dt_TabPage.Rows[i]["XH"].ToString() + "、" + dt_TabPage.Rows[i]["WT"].ToString(); label.Location = new System.Drawing.Point(1, 8); label.BackColor = Color.Transparent; panel.Controls.Add(label); for (int j = 0; j < 2; j++) { RadioButton radiobutton = new RadioButton(); //radiobutton.Cursor = Cursors.Hand; radiobutton.Size = new Size(110, 45); radiobutton.Location = new System.Drawing.Point(705 + j * 110, -8); radiobutton.BackColor = Color.Transparent; if (j == 0) { radiobutton.Text = dt_TabPage.Rows[i]["XX1"].ToString(); radiobutton.Tag = 1;//1分 } if (j == 1) { radiobutton.Text = dt_TabPage.Rows[i]["XX2"].ToString(); radiobutton.Tag = 0;//0分 } radiobutton.CheckedChanged += new EventHandler(radiobutton_CheckedChanged); panel.Controls.Add(radiobutton); } tabpage.Controls.Add(panel); } Button button = new Button(); button.Name = "Button" + row.ToString(); if (row == TabPages) { button.Text = "保存(&P)"; } else { button.Text = "下一页(&N)"; } //button.Cursor = Cursors.Hand; button.ForeColor = Color.Red; button.Size = new Size(120, 35); button.Location = new System.Drawing.Point(815, 450); button.Click += new EventHandler(button_Click); tabpage.Controls.Add(button); tabControl.Controls.Add(tabpage); } }