示例#1
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xkrmz_add_edit Xkrmz_add_edit_new = new Xkrmz_add_edit(this);
     Xkrmz_add_edit_new.Left = common_file.common_app.x() - 200;
     Xkrmz_add_edit_new.Top  = common_file.common_app.y() - 100;
     Xkrmz_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
示例#2
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_krmz.CurrentRow != null)
            {
                int         i   = dg_krmz.CurrentRow.Index;
                DataRowView dgr = dg_krmz.CurrentRow.DataBoundItem as DataRowView;
                i = DS_Xkrmz.Tables[0].Rows.IndexOf(dgr.Row);

                if (DS_Xkrmz.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xkrmz_add_edit Xkrmz_add_edit_new = new Xkrmz_add_edit(this);
                    Xkrmz_add_edit_new.Left           = common_file.common_app.x() - 200;
                    Xkrmz_add_edit_new.Top            = common_file.common_app.y() - 100;
                    Xkrmz_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xkrmz_add_edit_new.Xkrmz_id       = DS_Xkrmz.Tables[0].Rows[i]["id"].ToString();
                    Xkrmz_add_edit_new.tB_krmz.Text   = DS_Xkrmz.Tables[0].Rows[i]["krmz"].ToString();
                    Xkrmz_add_edit_new.tB_zjm.Text    = DS_Xkrmz.Tables[0].Rows[i]["zjm"].ToString();
                    Xkrmz_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }