Example #1
0
        private void 增加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (object.Equals(dt_tj_tc_dc, null))
            {
                dt_tj_tc_dc = ywszbiz.Get_tj_tc_dt("0");
            }
            if (cmb_xb.SelectedValue == null)
            {
                return;
            }
            Form_zhxmlr frm = new Form_zhxmlr(dt_tj_tc_dc, cmb_xb.SelectedValue.ToString().Trim());

            if (frm.ShowDialog() == DialogResult.OK)
            {
                lv_tjtcxm.Items.Clear();
                lv_tjtcxm.View = View.Tile;
                dt_tj_tc_dc    = frm.dt_tj_tc_dt;
                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);
                }
                Get_Bzjg(lv_tjtcxm);
            }
        }
Example #2
0
 private void 增加ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (object.Equals(dt_tj_dwfz_dt, null))
     {
         return;
     }
     PEIS.ywsz.Form_zhxmlr frm = new PEIS.ywsz.Form_zhxmlr(dt_tj_dwfz_dt, cmb_xb.SelectedValue.ToString().Trim());
     if (frm.ShowDialog() == DialogResult.OK)
     {
         lv_tjxm.Items.Clear();
         lv_tjxm.View  = View.SmallIcon;
         dt_tj_dwfz_dt = frm.dt_tj_tc_dt;
         foreach (DataRow dr in dt_tj_dwfz_dt.Rows)
         {
             ListViewItem item = new ListViewItem();
             item.Tag  = dr["zhxm"].ToString().Trim();
             item.Text = dr["mc"].ToString().Trim();
             lv_tjxm.Items.Add(item);
         }
     }
 }