public static class ex
{
public static int ToInt(this string s)
{
return int.Parse(s);
}
}
public interface ISqlCom
{
int ToUpdate();
}
public class SqlCom : ISqlCom
{
string table;
public string Table
{
get { return table; }
set { table = value; }
}
Dictionary<string, object> fileds;
public Dictionary<string, object> Fileds
{
get { return fileds; }
set { fileds = value; }
}
string search;
public string Search
{
get { return search; }
set { search = value; }
}
public int ToUpdate()
{
return 0;
}
}
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlCom sql = new SqlCom();
Dictionary<string, object> fileds = new Dictionary<string, object>();
fileds.Add("name", this.TextBox1.Text.Trim().ToInt());
sql.Table = "User";
sql.Fileds = fileds;
sql.ToUpdate();
}
}
浙公网安备 33010602011771号