internal bool Login(string Account, string Password) { string strSchema = "select 代碼 from 作業員 where 代碼=@P0 and 密碼=@P1 and 權限='Y'"; string UserID; DaoErrMsg Err = m_SQL.ExecuteScalar(strSchema, out UserID, Account, Password); if (Err.isError) { return(false); } if (Err.isError) { return(false); } if (UserID.Length <= 0) { return(false); } if (int.Parse(UserID) <= 0) { return(false); } return(true); }
/// <summary> /// 檢查指定的Table是否存在 /// </summary> /// <param name="TableName"></param> /// <returns></returns> private bool CheckTable(DaoDbCommon DbCom, string TableName) { string strSchema = string.Format("select count(*) from MSysObjects where Name='{0}'", TableName); string TableCount; DaoErrMsg err = DbCom.ExecuteScalar(strSchema, out TableCount); if (TableCount.ToInt() <= 0) { return(false); } return(true); }