示例#1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_xfmx_lkzd.CurrentRow != null)
            {
                int i = dg_xfmx_lkzd.CurrentRow.Index;
                if (DS_Xxfmx.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xxfmx_lkzd_add_edit Xxfmx_lkzd_add_edit_new = new Xxfmx_lkzd_add_edit(this);

                    Xxfmx_lkzd_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Xxfmx_lkzd_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xxfmx_lkzd_add_edit_new.Xxfxr_id       = DS_Xxfmx.Tables[0].Rows[i]["id"].ToString();
                    Xxfmx_lkzd_add_edit_new.tB_bz.Text     = DS_Xxfmx.Tables[0].Rows[i]["bz"].ToString();
                    Xxfmx_lkzd_add_edit_new.tB_lknr.Text   = DS_Xxfmx.Tables[0].Rows[i]["lknr"].ToString();
                    bool is_sh = Convert.ToBoolean(DS_Xxfmx.Tables[0].Rows[i]["sh_sh"].ToString());
                    Xxfmx_lkzd_add_edit_new.strissh = is_sh;
                    if (DS_Xxfmx.Tables[0].Rows[i]["sh_sh"].ToString() != null && DS_Xxfmx.Tables[0].Rows[i]["sh_sh"].ToString() != "")
                    {
                        if (is_sh)
                        {
                            Xxfmx_lkzd_add_edit_new.Cb_is_tj_kc.Visible = false;
                        }

                        else
                        {
                            Xxfmx_lkzd_add_edit_new.Cb_is_tj_kc.Visible = true;
                            Xxfmx_lkzd_add_edit_new.Cb_is_tj_kc.Checked = Convert.ToBoolean(DS_Xxfmx.Tables[0].Rows[i]["sh_sh"].ToString());
                        }
                    }
                    Xxfmx_lkzd_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }
示例#2
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xxfmx_lkzd_add_edit Xxfmx_lkzd_add_edit_new = new Xxfmx_lkzd_add_edit(this);
     Xxfmx_lkzd_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
     Xxfmx_lkzd_add_edit_new.judge_add_edit = common_file.common_app.get_add;
     Xxfmx_lkzd_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }