示例#1
0
 public DateTime getCurrentDate()
 {
     string date = string.Empty;
     using (conn con = new conn())
     {
         date = con.exesscalar("select getdate()");
     }
     return DateTime.Parse(date);
 }
示例#2
0
 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;
     }
 }
示例#3
0
 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;
     }
 }
示例#4
0
 public static string exessql(string sql)
 {
     string s = "";
     using (conn con = new conn())
     {
         s = con.exesscalar(sql);
         return s;
     }
 }