public UserInvoiceDataInfo GetUserInvoiceDataInfoByTitle(string invoiceTitle, int userId) { Database database = base.database; object[] obj = new object[5] { "SELECT * FROM Hishop_UserInvoiceDatas WHERE InvoiceTitle = @InvoiceTitle AND UserId = @UserId AND (InvoiceType = ", null, null, null, null }; InvoiceType invoiceType = InvoiceType.Enterprise; obj[1] = invoiceType.GetHashCode(); obj[2] = " OR InvoiceType = "; invoiceType = InvoiceType.Enterprise_Electronic; obj[3] = invoiceType.GetHashCode(); obj[4] = ") ORDER BY LastUseTime DESC,ID DESC"; DbCommand sqlStringCommand = database.GetSqlStringCommand(string.Concat(obj)); base.database.AddInParameter(sqlStringCommand, "InvoiceTitle", DbType.String, invoiceTitle); base.database.AddInParameter(sqlStringCommand, "UserId", DbType.Int32, userId); using (IDataReader objReader = base.database.ExecuteReader(sqlStringCommand)) { return(DataHelper.ReaderToModel <UserInvoiceDataInfo>(objReader)); } }
public override int GetHashCode() { return(InvoiceNumber.GetHashCode() ^ InvoiceType.GetHashCode() ^ InvoiceStatus.GetHashCode() ^ Lines.GetHashCode() ^ Total.GetHashCode() ^ Carrier.GetHashCode()); }