예제 #1
0
파일: Common.cs 프로젝트: shawhu/EverFresh
 /// <summary>
 /// 检查Cellphone是否已被用掉
 /// </summary>
 /// <param name="nickname"></param>
 public static bool doesCellphoneExist(string cellphone)
 {
     SqlDataObject dbo = new SqlDataObject();
     dbo.SqlComm = "select * from t_member where cellphone = '" + cellphone + "' and (enc_password is not null or wechat_id is not null)";
     DataTable dt = dbo.GetDataTable();
     if (dt.Rows.Count > 0)
         return true;
     return false;
 }
예제 #2
0
 public static int GetIdentity(string tablename)
 {
     SqlDataObject dbo = new SqlDataObject();
     dbo.SqlComm = "SELECT IDENT_CURRENT('" + tablename + "')";
     return Convert.ToInt32(dbo.GetObject());
 }