Exemple #1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_hyfj.CurrentRow != null)
            {
                int         i   = dg_hyfj.CurrentRow.Index;
                DataRowView dgr = dg_hyfj.CurrentRow.DataBoundItem as DataRowView;
                i = DS_Hhyfj.Tables[0].Rows.IndexOf(dgr.Row);


                if (DS_Hhyfj.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Hhygl.Hhyfj_add_edit Hhyfj_add_edit_new = new Hhyfj_add_edit(this);
                    //Hhyfj_add_edit_new.Left = common_file.common_app.x() - 200;
                    //Hhyfj_add_edit_new.Top = common_file.common_app.y() - 100;
                    Hhyfj_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Hhyfj_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Hhyfj_add_edit_new.Hhyfj_id       = DS_Hhyfj.Tables[0].Rows[i]["id"].ToString();

                    Hhyfj_add_edit_new.tB_fjrb.Text = DS_Hhyfj.Tables[0].Rows[i]["fjrb"].ToString();
                    Hhyfj_add_edit_new.tB_hyfj.Text = DS_Hhyfj.Tables[0].Rows[i]["hyfj"].ToString();
                    Hhyfj_add_edit_new.cB_hyrx.Text = DS_Hhyfj.Tables[0].Rows[i]["hyrx"].ToString();
                    Hhyfj_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }
Exemple #2
0
        private void b_new_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();

            Hhygl.Hhyfj_add_edit Hhyfj_add_edit_new = new Hhyfj_add_edit(this);
            //Hhyfj_add_edit_new.Left = common_file.common_app.x() - 200;
            //Hhyfj_add_edit_new.Top = common_file.common_app.y() - 100;
            Hhyfj_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
            Hhyfj_add_edit_new.ShowDialog();
            Cursor.Current = Cursors.Default;
        }