private void bt_save_Click(object sender, EventArgs e)
        {
            if (str_tjbh == "" || str_tjcs == "")
            {
                return;
            }

            tjjgBiz tjjgbiz1 = new tjjgBiz();

            tjjgbiz1.str_Delete_tj_zyjlmx(str_tjbh, str_tjcs);
            foreach (Control TabPage in tabControl.TabPages)
            {
                string tzlx = TabPage.Name;//体质类型
                foreach (Control panel in TabPage.Controls)
                {
                    //MessageBox.Show(panel.GetType().ToString());
                    if (panel.GetType().ToString() == "System.Windows.Forms.Panel")
                    {
                        string xh  = panel.Name;
                        string xxz = "0";
                        foreach (Control radiobutton in panel.Controls)
                        {
                            //MessageBox.Show(radiobutton.GetType().ToString());
                            if (radiobutton.GetType().ToString() == "System.Windows.Forms.RadioButton")
                            {
                                RadioButton rb = (RadioButton)radiobutton;
                                if (rb.Checked)
                                {
                                    xxz = rb.Tag.ToString();
                                    break;
                                }
                            }
                        }
                        tjjgbiz1.str_Insert_tj_zyjlmx(str_tjbh, str_tjcs, tzlx, xh, xxz);
                    }
                }
            }
            tjjgbiz1.str_Exec_proc_tj_zyjl(str_tjbh, str_tjcs);
            tjjgbiz1.Exec_ArryList();
            str_sumover = "2";
            //MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

            TJ_ZYJL_DataBind(str_tjbh, str_tjcs);
            Form_zywj_tzjy frm = new Form_zywj_tzjy(str_tjbh, str_tjcs, str_tzjl);

            frm.ShowDialog();
        }
Exemple #2
0
        void TJ_ZYJL_DataBind(string tjbh, string tjcs)
        {
            DataTable dt_TJ_ZYJL = tjjgbiz.Get_TJ_ZYJL(str_tjbh, str_tjcs);

            if (dt_TJ_ZYJL.Rows.Count < 1)
            {
                return;
            }

            string str_tzjl = dt_TJ_ZYJL.Rows[0]["tzjl"].ToString();

            if (str_tzjl != "")
            {
                lbl_tzjg.Visible = true;
                lbl_tzjg.Text    = "您的体质结果为:" + str_tzjl;
                Form_zywj_tzjy frm = new Form_zywj_tzjy(tjbh, tjcs, str_tzjl);
                frm.ShowDialog();
            }
            else
            {
                lbl_tzjg.Visible = false;
            }
        }