Пример #1
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Ffjzt.Ffjrb_add_edit Ffjrb_add_edit_new = new Ffjrb_add_edit(this);
     Ffjrb_add_edit_new.Left = common_file.common_app.x() - 200;
     Ffjrb_add_edit_new.Top  = common_file.common_app.y() - 100;
     Ffjrb_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 (dataGridViewSummary1.CurrentRow != null)
            {
                int         i   = dataGridViewSummary1.CurrentRow.Index;
                DataRowView dgr = dataGridViewSummary1.CurrentRow.DataBoundItem as DataRowView;
                i = DS_Ffjrb.Tables[0].Rows.IndexOf(dgr.Row);

                if (DS_Ffjrb.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Ffjzt.Ffjrb_add_edit Ffjrb_add_edit_new = new Ffjrb_add_edit(this);
                    Ffjrb_add_edit_new.Left              = common_file.common_app.x() - 200;
                    Ffjrb_add_edit_new.Top               = common_file.common_app.y() - 100;
                    Ffjrb_add_edit_new.judge_add_edit    = common_file.common_app.get_edit;
                    Ffjrb_add_edit_new.Ffjrb_id          = DS_Ffjrb.Tables[0].Rows[i]["id"].ToString();
                    Ffjrb_add_edit_new.tB_fjrb_code.Text = DS_Ffjrb.Tables[0].Rows[i]["fjrb_code"].ToString();
                    Ffjrb_add_edit_new.tB_fjrb.Text      = DS_Ffjrb.Tables[0].Rows[i]["fjrb"].ToString();
                    Ffjrb_add_edit_new.tB_sjjg.Text      = DS_Ffjrb.Tables[0].Rows[i]["sjjg"].ToString();
                    Ffjrb_add_edit_new.ShowDialog();
                }
            }
            Cursor.Current = Cursors.Default;
        }