/// <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; }
public static int GetIdentity(string tablename) { SqlDataObject dbo = new SqlDataObject(); dbo.SqlComm = "SELECT IDENT_CURRENT('" + tablename + "')"; return Convert.ToInt32(dbo.GetObject()); }