Exemplo n.º 1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_xfsz.CurrentRow != null)
            {
                int i = dg_xfsz.CurrentRow.Index;

                DataRowView dgr = dg_xfsz.Rows[i].DataBoundItem as DataRowView;
                i = DS_Xxfxr.Tables[0].Rows.IndexOf(dgr.Row);

                if (DS_Xxfxr.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xxfsz_add_edit Xxfsz_add_edit_new = new Xxfsz_add_edit(this);


                    Xxfsz_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Xxfsz_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xxfsz_add_edit_new.Xxfxr_id       = DS_Xxfxr.Tables[0].Rows[i]["id"].ToString();
                    Xxfsz_add_edit_new.tB_xrbh.Text   = DS_Xxfxr.Tables[0].Rows[i]["xrbh"].ToString();
                    Xxfsz_add_edit_new.tB_xfxr.Text   = DS_Xxfxr.Tables[0].Rows[i]["xfxr"].ToString();
                    Xxfsz_add_edit_new.tB_xfjg.Text   = DS_Xxfxr.Tables[0].Rows[i]["xfje"].ToString();
                    Xxfsz_add_edit_new.tB_xfdr.Text   = DS_Xxfxr.Tables[0].Rows[i]["xfdr"].ToString();
                    if (DS_Xxfxr.Tables[0].Rows[i]["is_visible_bb"].ToString() != null && DS_Xxfxr.Tables[0].Rows[i]["is_visible_bb"].ToString() != "")
                    {
                        Xxfsz_add_edit_new.Cb_visible_bb.Checked = Convert.ToBoolean(DS_Xxfxr.Tables[0].Rows[i]["is_visible_bb"].ToString());
                    }
                    Xxfsz_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }
Exemplo n.º 2
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xxfsz_add_edit Xxfsz_add_edit_new = new Xxfsz_add_edit(this);
     Xxfsz_add_edit_new.Left = common_file.common_app.x() + 50;
     Xxfsz_add_edit_new.Top  = common_file.common_app.y() - 100;
     Xxfsz_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }