如何在datagrid中实现数据的增,删和修改
1个回答
展开全部
参考代码:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OracleClient;
namespace WApp
{
/// <summary>
/// DataGrid 的增、删、改。
/// </summary>
public class datashow : System.Windows.Forms.Form
{
private static int FromCount=0;
//private string m_state="";
private static string ocnnString;
private System.Windows.Forms.DataGrid mydataGrid;
private System.Data.DataSet ds;
//private System.Data.DataTable dt;
private System.Data.OracleClient.OracleDataAdapter oda;
private System.Data.OracleClient.OracleCommand ocmm;
private System.Data.OracleClient.OracleConnection ocnn;
private System.Windows.Forms.Button bt1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem File;
private System.Windows.Forms.MenuItem FileExit;
private System.Windows.Forms.MenuItem File1;
private System.Windows.Forms.MenuItem Filesave;
private System.Windows.Forms.MenuItem Filejh;
private System.Windows.Forms.Button jihuo;
private System.Windows.Forms.Button xiugaidg;
/// <summary>
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OracleClient;
namespace WApp
{
/// <summary>
/// DataGrid 的增、删、改。
/// </summary>
public class datashow : System.Windows.Forms.Form
{
private static int FromCount=0;
//private string m_state="";
private static string ocnnString;
private System.Windows.Forms.DataGrid mydataGrid;
private System.Data.DataSet ds;
//private System.Data.DataTable dt;
private System.Data.OracleClient.OracleDataAdapter oda;
private System.Data.OracleClient.OracleCommand ocmm;
private System.Data.OracleClient.OracleConnection ocnn;
private System.Windows.Forms.Button bt1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem File;
private System.Windows.Forms.MenuItem FileExit;
private System.Windows.Forms.MenuItem File1;
private System.Windows.Forms.MenuItem Filesave;
private System.Windows.Forms.MenuItem Filejh;
private System.Windows.Forms.Button jihuo;
private System.Windows.Forms.Button xiugaidg;
/// <summary>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询