public DateTime getCurrentDate() { string date = string.Empty; using (conn con = new conn()) { date = con.exesscalar("select getdate()"); } return DateTime.Parse(date); }
public static string getsvalue(string tablename, string getziduan, string tiaojian) { using (conn con = new conn()) { string s = con.exesscalar("select " + getziduan + " from " + tablename + " where " + tiaojian); return s; } }
public static string updatesvalue(string tablename, string ziduan, string tiaojian) { using (conn con = new conn()) { string s = con.exesscalar("update " + tablename + " set " + ziduan + " where " + tiaojian); return s; } }
public static string exessql(string sql) { string s = ""; using (conn con = new conn()) { s = con.exesscalar(sql); return s; } }