예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public TourPayment()
 {
     this.type   = new GeneralType();
     this.amount = new Money(0.0M, null);
     this.id     = -1;
 }
예제 #4
0
 public int GetServiceCountExcept(GeneralType serviceType)
 {
     return(this.groups.GetServiceCountExcept(serviceType));
 }
예제 #5
0
 internal void CopyTo(GeneralType type)
 {
     type         = this;
     type.IsDirty = this.IsDirty;
 }