|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
/// <summary>
/// Summary description for query
/// </summary>
public class query
{
public query()
{
//
// TODO: Add constructor logic here
//
}
public static DataSet selectAll()
{
DataSet ds = new DataSet();
string sql = "select * from emp_info";
ds = Class1.fillDataset(sql);
return ds;
}
public static DataSet selectwithId(long Id)
{
DataSet ds = new DataSet();
string sql = "select * from emp_info where ID='" + Id + "'";
ds = Class1.fillDataset(sql);
return ds;
}
public static DataTable selectAllTBL()
{
DataSet ds = new DataSet();
string sql = "select * from emp_info";
ds = Class1.fillDataset(sql);
DataTable dt = new DataTable();
dt = ds.Tables[0];
return dt;
}
public static int update(string Id,string name)
{
int r=0;
string sql = "update emp_info set emp_name='" + name + "' where ID='" + Id + "'";
r = Class1.nonquery(sql);
return r;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.