Example #1
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xfkfs_add_edit Xfkfs_add_edit_new = new Xfkfs_add_edit(this);
     Xfkfs_add_edit_new.Left = common_file.common_app.x() - 200;
     Xfkfs_add_edit_new.Top  = common_file.common_app.y() - 100;
     Xfkfs_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
Example #2
0
 private void b_delete_Click(object sender, EventArgs e)
 {
     if (dg_fkfs.CurrentRow != null)
     {
         int         i   = dg_fkfs.CurrentRow.Index;
         DataRowView dgr = dg_fkfs.CurrentRow.DataBoundItem as DataRowView;
         i = DS_Xfkfs.Tables[0].Rows.IndexOf(dgr.Row);
         if (DS_Xfkfs.Tables[0].Rows[i]["id"].ToString() != "")
         {
             Xxtsz.Xfkfs_add_edit Xfkfs_add_edit_new = new Xfkfs_add_edit(this);
             Xfkfs_add_edit_new.Xfkfs_id = DS_Xfkfs.Tables[0].Rows[i]["id"].ToString();
             B_Xfkfs.Delete(int.Parse(Xfkfs_add_edit_new.Xfkfs_id));
         }
         refresh_app();
     }
 }
Example #3
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_fkfs.CurrentRow != null)
            {
                int         i   = dg_fkfs.CurrentRow.Index;
                DataRowView dgr = dg_fkfs.CurrentRow.DataBoundItem as DataRowView;
                i = DS_Xfkfs.Tables[0].Rows.IndexOf(dgr.Row);

                if (DS_Xfkfs.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xfkfs_add_edit Xfkfs_add_edit_new = new Xfkfs_add_edit(this);
                    Xfkfs_add_edit_new.Left           = common_file.common_app.x() - 200;
                    Xfkfs_add_edit_new.Top            = common_file.common_app.y() - 100;
                    Xfkfs_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xfkfs_add_edit_new.Xfkfs_id       = DS_Xfkfs.Tables[0].Rows[i]["id"].ToString();
                    Xfkfs_add_edit_new.tB_fkfs.Text   = DS_Xfkfs.Tables[0].Rows[i]["fkfs"].ToString();
                    Xfkfs_add_edit_new.tB_zjm.Text    = DS_Xfkfs.Tables[0].Rows[i]["zjm"].ToString();
                    Xfkfs_add_edit_new.ShowDialog();
                }
            }
            Cursor.Current = Cursors.Default;
        }