Exemple #1
0
        private void tv_tc_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (object.Equals(null, tv_tc.SelectedNode.Tag))
            {
                return;
            }

            str_bh    = tv_tc.SelectedNode.Tag.ToString().Trim();
            this.Text = "体检套餐设置【" + tv_tc.SelectedNode.Text.Trim() + "】";
            DataTable dt_tj_tc_hd = ywszbiz.Get_tj_tc_hd(str_bh);

            if (dt_tj_tc_hd.Rows.Count < 1)
            {
                return;
            }
            txt_bh.Text          = dt_tj_tc_hd.Rows[0]["bh"].ToString().Trim();
            txt_disp_order.Text  = dt_tj_tc_hd.Rows[0]["disp_order"].ToString().Trim();
            cmb_xb.SelectedValue = dt_tj_tc_hd.Rows[0]["xb"].ToString().Trim();
            txt_mc.Text          = dt_tj_tc_hd.Rows[0]["mc"].ToString().Trim();
            txt_jc.Text          = dt_tj_tc_hd.Rows[0]["jc"].ToString().Trim();
            txt_bzjg.Text        = dt_tj_tc_hd.Rows[0]["bzjg"].ToString().Trim();
            txt_jg.Text          = dt_tj_tc_hd.Rows[0]["jg"].ToString().Trim();
            try
            {
                txt_dz.Text = (Convert.ToDecimal(txt_jg.Text) / Convert.ToDecimal(txt_bzjg.Text) * 100).ToString("0.00");
            }
            catch
            {
            }
            cmb_tjywlx.SelectedValue = dt_tj_tc_hd.Rows[0]["tjywlx"].ToString().Trim();
            txt_bz.Text = dt_tj_tc_hd.Rows[0]["bz"].ToString().Trim();

            lv_tjtcxm.Items.Clear();
            lv_tjtcxm.View = View.Tile;
            dt_tj_tc_dc    = ywszbiz.Get_tj_tc_dt(str_bh);
            foreach (DataRow dr in dt_tj_tc_dc.Rows)
            {
                ListViewItem item = new ListViewItem();
                item.Tag        = dr["zhxm"].ToString().Trim();
                item.Text       = dr["mc"].ToString().Trim();
                item.ImageIndex = 4;
                lv_tjtcxm.Items.Add(item);
            }
            //lv_tjtcxm.SmallImageList = imageList1;
            //lv_tjtcxm.StateImageList = imageList1;
            //lv_tjtcxm.LargeImageList = imageList1;

            if (tv_tc.SelectedNode.Nodes.Count == 0)
            {
                tv_tc.SelectedNode.SelectedImageIndex = tv_tc.SelectedNode.ImageIndex;
            }
        }
Exemple #2
0
        private void lv_tc_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewItem item = lv_tc.GetItemAt(e.X, e.Y);

            if (object.Equals(null, item))
            {
                return;
            }

            lv_checkxm.Items.Clear();
            DataTable dt = ywszbiz.Get_tj_tc_dt(item.Tag.ToString().Trim());

            foreach (DataRow dr in dt.Rows)
            {
                ListViewItem item1 = new ListViewItem();
                item1.Tag  = dr["zhxm"].ToString().Trim();
                item1.Text = dr["mc"].ToString().Trim();
                lv_checkxm.Items.Add(item1);
            }
        }