internal int GetClientCountExcept(GeneralType serviceType) { Int32 sum = 0; foreach (ITourService service in this) { if (service.Detail.ServiceType.Id != serviceType.Id) { sum += service.ClientCount; } } return(sum); }
public Entities.GeneralTypeCollection GetByName(string typeName, int languageId) { Entities.GeneralTypeCollection types = new Entities.GeneralTypeCollection(); using (SqlConnection cnn = new SqlConnection(sqlCnnStr)) { string query = "AppTypesGetByName"; using (SqlCommand cmd = new SqlCommand(query, cnn)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@TypeClassName", typeName)); cmd.Parameters.Add(new SqlParameter("@LanguageId", languageId)); cnn.Open(); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader != null && reader.HasRows) { while (reader.Read()) { Entities.GeneralType type = new Entities.GeneralType(); type.Id = Utils.GetSafeInt32(reader, "TypeId"); type.Name = Utils.GetSafeString(reader, "TypeName"); type.DetailsTable = Utils.GetSafeString(reader, "DetailsTable"); type.IsDirty = false; types.Add(type); } } } } } return(types); }
public TourPayment() { this.type = new GeneralType(); this.amount = new Money(0.0M, null); this.id = -1; }
public int GetServiceCountExcept(GeneralType serviceType) { return(this.groups.GetServiceCountExcept(serviceType)); }
internal void CopyTo(GeneralType type) { type = this; type.IsDirty = this.IsDirty; }