/// <summary>
        /// Gets <see cref="CountryRow"/> by the primary key.
        /// </summary>
        /// <param name="country_id">The <c>country_id</c> column value.</param>
        /// <returns>An instance of <see cref="CountryRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual CountryRow GetByPrimaryKey(int country_id)
        {
            string     whereSql = "[country_id]=" + _db.CreateSqlParameterName("Country_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Country_id", country_id);
            CountryRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="TimeOfDayRow"/> by the primary key.
        /// </summary>
        /// <param name="time_of_day">The <c>time_of_day</c> column value.</param>
        /// <returns>An instance of <see cref="TimeOfDayRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual TimeOfDayRow GetByPrimaryKey(byte time_of_day)
        {
            string     whereSql = "[time_of_day]=" + _db.CreateSqlParameterName("Time_of_day");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Time_of_day", time_of_day);
            TimeOfDayRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="OutboundANIRow"/> by the primary key.
        /// </summary>
        /// <param name="outbound_ani_id">The <c>outbound_ani_id</c> column value.</param>
        /// <returns>An instance of <see cref="OutboundANIRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual OutboundANIRow GetByPrimaryKey(int outbound_ani_id)
        {
            string     whereSql = "[outbound_ani_id]=" + _db.CreateSqlParameterName("Outbound_ani_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Outbound_ani_id", outbound_ani_id);
            OutboundANIRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="InventoryLotRow"/> by the primary key.
        /// </summary>
        /// <param name="lot_id">The <c>lot_id</c> column value.</param>
        /// <returns>An instance of <see cref="InventoryLotRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual InventoryLotRow GetByPrimaryKey(int lot_id)
        {
            string     whereSql = "[lot_id]=" + _db.CreateSqlParameterName("Lot_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Lot_id", lot_id);
            InventoryLotRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="RateInfoRow"/> by the primary key.
        /// </summary>
        /// <param name="rate_info_id">The <c>rate_info_id</c> column value.</param>
        /// <returns>An instance of <see cref="RateInfoRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual RateInfoRow GetByPrimaryKey(int rate_info_id)
        {
            string     whereSql = "[rate_info_id]=" + _db.CreateSqlParameterName("Rate_info_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Rate_info_id", rate_info_id);
            RateInfoRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #6
0
        /// <summary>
        /// Gets <see cref="PlatformRow"/> by the primary key.
        /// </summary>
        /// <param name="platform_id">The <c>platform_id</c> column value.</param>
        /// <returns>An instance of <see cref="PlatformRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual PlatformRow GetByPrimaryKey(short platform_id)
        {
            string     whereSql = "[platform_id]=" + _db.CreateSqlParameterName("Platform_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Platform_id", platform_id);
            PlatformRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="CustomerAcctSupportMapRow"/> by the primary key.
        /// </summary>
        /// <param name="customer_acct_id">The <c>customer_acct_id</c> column value.</param>
        /// <param name="vendor_id">The <c>vendor_id</c> column value.</param>
        /// <returns>An instance of <see cref="CustomerAcctSupportMapRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual CustomerAcctSupportMapRow GetByPrimaryKey(short customer_acct_id, int vendor_id)
        {
            string whereSql = "[customer_acct_id]=" + _db.CreateSqlParameterName("Customer_acct_id") + " AND " +
                              "[vendor_id]=" + _db.CreateSqlParameterName("Vendor_id");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Customer_acct_id", customer_acct_id);
            AddParameter(cmd, "Vendor_id", vendor_id);
            CustomerAcctSupportMapRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="PayphoneSurchargeRow"/> by the primary key.
        /// </summary>
        /// <param name="payphone_surcharge_id">The <c>payphone_surcharge_id</c> column value.</param>
        /// <returns>An instance of <see cref="PayphoneSurchargeRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual PayphoneSurchargeRow GetByPrimaryKey(int payphone_surcharge_id)
        {
            string     whereSql = "[payphone_surcharge_id]=" + _db.CreateSqlParameterName("Payphone_surcharge_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Payphone_surcharge_id", payphone_surcharge_id);
            PayphoneSurchargeRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #9
0
        /// <summary>
        /// Gets <see cref="BalanceAdjustmentReasonRow"/> by the primary key.
        /// </summary>
        /// <param name="balance_adjustment_reason_id">The <c>balance_adjustment_reason_id</c> column value.</param>
        /// <returns>An instance of <see cref="BalanceAdjustmentReasonRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual BalanceAdjustmentReasonRow GetByPrimaryKey(int balance_adjustment_reason_id)
        {
            string     whereSql = "[balance_adjustment_reason_id]=" + _db.CreateSqlParameterName("Balance_adjustment_reason_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Balance_adjustment_reason_id", balance_adjustment_reason_id);
            BalanceAdjustmentReasonRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #10
0
        /// <summary>
        /// Gets <see cref="IPAddressRow"/> by the primary key.
        /// </summary>
        /// <param name="iP_address">The <c>IP_address</c> column value.</param>
        /// <returns>An instance of <see cref="IPAddressRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual IPAddressRow GetByPrimaryKey(int iP_address)
        {
            string     whereSql = "[IP_address]=" + _db.CreateSqlParameterName("IP_address");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "IP_address", iP_address);
            IPAddressRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #11
0
        /// <summary>
        /// Gets <see cref="TypeOfDayChoiceRow"/> by the primary key.
        /// </summary>
        /// <param name="type_of_day_choice">The <c>type_of_day_choice</c> column value.</param>
        /// <returns>An instance of <see cref="TypeOfDayChoiceRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual TypeOfDayChoiceRow GetByPrimaryKey(byte type_of_day_choice)
        {
            string     whereSql = "[type_of_day_choice]=" + _db.CreateSqlParameterName("Type_of_day_choice");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Type_of_day_choice", type_of_day_choice);
            TypeOfDayChoiceRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #12
0
        /// <summary>
        /// Gets <see cref="TableSequenceRow"/> by the primary key.
        /// </summary>
        /// <param name="tableName">The <c>TableName</c> column value.</param>
        /// <returns>An instance of <see cref="TableSequenceRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual TableSequenceRow GetByPrimaryKey(string tableName)
        {
            string     whereSql = "[TableName]=" + _db.CreateSqlParameterName("TableName");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "TableName", tableName);
            TableSequenceRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #13
0
        /// <summary>
        /// Gets <see cref="CustomerAcctPaymentRow"/> by the primary key.
        /// </summary>
        /// <param name="customer_acct_id">The <c>customer_acct_id</c> column value.</param>
        /// <param name="date_time">The <c>date_time</c> column value.</param>
        /// <returns>An instance of <see cref="CustomerAcctPaymentRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual CustomerAcctPaymentRow GetByPrimaryKey(short customer_acct_id, System.DateTime date_time)
        {
            string whereSql = "[customer_acct_id]=" + _db.CreateSqlParameterName("Customer_acct_id") + " AND " +
                              "[date_time]=" + _db.CreateSqlParameterName("Date_time");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Customer_acct_id", customer_acct_id);
            AddParameter(cmd, "Date_time", date_time);
            CustomerAcctPaymentRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="CarrierAcctEPMapRow"/> by the primary key.
        /// </summary>
        /// <param name="carrier_acct_EP_map_id">The <c>carrier_acct_EP_map_id</c> column value.</param>
        /// <returns>An instance of <see cref="CarrierAcctEPMapRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual CarrierAcctEPMapRow GetByPrimaryKey(int carrier_acct_EP_map_id)
        {
            string     whereSql = "[carrier_acct_EP_map_id]=" + _db.CreateSqlParameterName("Carrier_acct_EP_map_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Carrier_acct_EP_map_id", carrier_acct_EP_map_id);
            CarrierAcctEPMapRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="LCRBlackListRow"/> by the primary key.
        /// </summary>
        /// <param name="routing_plan_id">The <c>routing_plan_id</c> column value.</param>
        /// <param name="route_id">The <c>route_id</c> column value.</param>
        /// <param name="carrier_acct_id">The <c>carrier_acct_id</c> column value.</param>
        /// <returns>An instance of <see cref="LCRBlackListRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual LCRBlackListRow GetByPrimaryKey(int routing_plan_id, int route_id, short carrier_acct_id)
        {
            string whereSql = "[routing_plan_id]=" + _db.CreateSqlParameterName("Routing_plan_id") + " AND " +
                              "[route_id]=" + _db.CreateSqlParameterName("Route_id") + " AND " +
                              "[carrier_acct_id]=" + _db.CreateSqlParameterName("Carrier_acct_id");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Routing_plan_id", routing_plan_id);
            AddParameter(cmd, "Route_id", route_id);
            AddParameter(cmd, "Carrier_acct_id", carrier_acct_id);
            LCRBlackListRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="DialCodeRow"/> by the primary key.
        /// </summary>
        /// <param name="calling_plan_id">The <c>calling_plan_id</c> column value.</param>
        /// <param name="dial_code">The <c>dial_code</c> column value.</param>
        /// <returns>An instance of <see cref="DialCodeRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual DialCodeRow GetByPrimaryKey(int calling_plan_id, long dial_code)
        {
            string whereSql = "[calling_plan_id]=" + _db.CreateSqlParameterName("Calling_plan_id") + " AND " +
                              "[dial_code]=" + _db.CreateSqlParameterName("Dial_code");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Calling_plan_id", calling_plan_id);
            AddParameter(cmd, "Dial_code", dial_code);
            DialCodeRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Adds a new record into the <c>CdrAggregate</c> table.
        /// </summary>
        /// <param name="value">The <see cref="CdrAggregateRow"/> object to be inserted.</param>
        public virtual void Insert(CdrAggregateRow value)
        {
            string sqlStr = "INSERT INTO [dbo].[CdrAggregate] (" +
                            "[date_hour], " +
                            "[node_id], " +
                            "[orig_end_point_IP], " +
                            "[orig_end_point_id], " +
                            "[customer_acct_id], " +
                            "[customer_route_id], " +
                            "[term_end_point_IP], " +
                            "[term_end_point_id], " +
                            "[calls_attempted], " +
                            "[calls_completed], " +
                            "[setup_seconds], " +
                            "[alert_seconds], " +
                            "[connected_seconds], " +
                            "[connected_minutes], " +
                            "[carrier_cost], " +
                            "[carrier_rounded_minutes], " +
                            "[wholesale_price], " +
                            "[wholesale_rounded_minutes], " +
                            "[end_user_price], " +
                            "[end_user_rounded_minutes], " +
                            "[carrier_acct_id], " +
                            "[carrier_route_id], " +
                            "[access_number]" +
                            ") VALUES (" +
                            _db.CreateSqlParameterName("Date_hour") + ", " +
                            _db.CreateSqlParameterName("Node_id") + ", " +
                            _db.CreateSqlParameterName("Orig_end_point_IP") + ", " +
                            _db.CreateSqlParameterName("Orig_end_point_id") + ", " +
                            _db.CreateSqlParameterName("Customer_acct_id") + ", " +
                            _db.CreateSqlParameterName("Customer_route_id") + ", " +
                            _db.CreateSqlParameterName("Term_end_point_IP") + ", " +
                            _db.CreateSqlParameterName("Term_end_point_id") + ", " +
                            _db.CreateSqlParameterName("Calls_attempted") + ", " +
                            _db.CreateSqlParameterName("Calls_completed") + ", " +
                            _db.CreateSqlParameterName("Setup_seconds") + ", " +
                            _db.CreateSqlParameterName("Alert_seconds") + ", " +
                            _db.CreateSqlParameterName("Connected_seconds") + ", " +
                            _db.CreateSqlParameterName("Connected_minutes") + ", " +
                            _db.CreateSqlParameterName("Carrier_cost") + ", " +
                            _db.CreateSqlParameterName("Carrier_rounded_minutes") + ", " +
                            _db.CreateSqlParameterName("Wholesale_price") + ", " +
                            _db.CreateSqlParameterName("Wholesale_rounded_minutes") + ", " +
                            _db.CreateSqlParameterName("End_user_price") + ", " +
                            _db.CreateSqlParameterName("End_user_rounded_minutes") + ", " +
                            _db.CreateSqlParameterName("Carrier_acct_id") + ", " +
                            _db.CreateSqlParameterName("Carrier_route_id") + ", " +
                            _db.CreateSqlParameterName("Access_number") + ")";
            IDbCommand cmd = _db.CreateCommand(sqlStr);

            AddParameter(cmd, "Date_hour", value.Date_hour);
            AddParameter(cmd, "Node_id", value.Node_id);
            AddParameter(cmd, "Orig_end_point_IP", value.Orig_end_point_IP);
            AddParameter(cmd, "Orig_end_point_id", value.Orig_end_point_id);
            AddParameter(cmd, "Customer_acct_id", value.Customer_acct_id);
            AddParameter(cmd, "Customer_route_id", value.Customer_route_id);
            AddParameter(cmd, "Term_end_point_IP", value.Term_end_point_IP);
            AddParameter(cmd, "Term_end_point_id", value.Term_end_point_id);
            AddParameter(cmd, "Calls_attempted", value.Calls_attempted);
            AddParameter(cmd, "Calls_completed", value.Calls_completed);
            AddParameter(cmd, "Setup_seconds", value.Setup_seconds);
            AddParameter(cmd, "Alert_seconds", value.Alert_seconds);
            AddParameter(cmd, "Connected_seconds", value.Connected_seconds);
            AddParameter(cmd, "Connected_minutes", value.Connected_minutes);
            AddParameter(cmd, "Carrier_cost", value.Carrier_cost);
            AddParameter(cmd, "Carrier_rounded_minutes", value.Carrier_rounded_minutes);
            AddParameter(cmd, "Wholesale_price", value.Wholesale_price);
            AddParameter(cmd, "Wholesale_rounded_minutes", value.Wholesale_rounded_minutes);
            AddParameter(cmd, "End_user_price", value.End_user_price);
            AddParameter(cmd, "End_user_rounded_minutes", value.End_user_rounded_minutes);
            AddParameter(cmd, "Carrier_acct_id", value.Carrier_acct_id);
            AddParameter(cmd, "Carrier_route_id", value.Carrier_route_id);
            AddParameter(cmd, "Access_number", value.Access_number);
            cmd.ExecuteNonQuery();
        }
Beispiel #18
0
        /// <summary>
        /// Gets <see cref="CallCenterCabinaRow"/> by the primary key.
        /// </summary>
        /// <param name="service_id">The <c>service_id</c> column value.</param>
        /// <param name="serial_number">The <c>serial_number</c> column value.</param>
        /// <returns>An instance of <see cref="CallCenterCabinaRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual CallCenterCabinaRow GetByPrimaryKey(short service_id, long serial_number)
        {
            string whereSql = "[service_id]=" + _db.CreateSqlParameterName("Service_id") + " AND " +
                              "[serial_number]=" + _db.CreateSqlParameterName("Serial_number");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Service_id", service_id);
            AddParameter(cmd, "Serial_number", serial_number);
            CallCenterCabinaRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="RateRow"/> by the primary key.
        /// </summary>
        /// <param name="rate_info_id">The <c>rate_info_id</c> column value.</param>
        /// <param name="type_of_day_choice">The <c>type_of_day_choice</c> column value.</param>
        /// <param name="time_of_day">The <c>time_of_day</c> column value.</param>
        /// <returns>An instance of <see cref="RateRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual RateRow GetByPrimaryKey(int rate_info_id, byte type_of_day_choice, byte time_of_day)
        {
            string whereSql = "[rate_info_id]=" + _db.CreateSqlParameterName("Rate_info_id") + " AND " +
                              "[type_of_day_choice]=" + _db.CreateSqlParameterName("Type_of_day_choice") + " AND " +
                              "[time_of_day]=" + _db.CreateSqlParameterName("Time_of_day");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Rate_info_id", rate_info_id);
            AddParameter(cmd, "Type_of_day_choice", type_of_day_choice);
            AddParameter(cmd, "Time_of_day", time_of_day);
            RateRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="LoadBalancingMapRow"/> by the primary key.
        /// </summary>
        /// <param name="node_id">The <c>node_id</c> column value.</param>
        /// <param name="customer_acct_id">The <c>customer_acct_id</c> column value.</param>
        /// <returns>An instance of <see cref="LoadBalancingMapRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual LoadBalancingMapRow GetByPrimaryKey(short node_id, short customer_acct_id)
        {
            string whereSql = "[node_id]=" + _db.CreateSqlParameterName("Node_id") + " AND " +
                              "[customer_acct_id]=" + _db.CreateSqlParameterName("Customer_acct_id");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Node_id", node_id);
            AddParameter(cmd, "Customer_acct_id", customer_acct_id);
            LoadBalancingMapRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="ResidentialPSTNRow"/> by the primary key.
        /// </summary>
        /// <param name="service_id">The <c>service_id</c> column value.</param>
        /// <param name="ani">The <c>ANI</c> column value.</param>
        /// <returns>An instance of <see cref="ResidentialPSTNRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual ResidentialPSTNRow GetByPrimaryKey(short service_id, long ani)
        {
            string whereSql = "[service_id]=" + _db.CreateSqlParameterName("Service_id") + " AND " +
                              "[ANI]=" + _db.CreateSqlParameterName("ANI");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Service_id", service_id);
            AddParameter(cmd, "ANI", ani);
            ResidentialPSTNRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #22
0
        /// <summary>
        /// Gets <see cref="RoutingPlanDetailRow"/> by the primary key.
        /// </summary>
        /// <param name="routing_plan_id">The <c>routing_plan_id</c> column value.</param>
        /// <param name="route_id">The <c>route_id</c> column value.</param>
        /// <returns>An instance of <see cref="RoutingPlanDetailRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual RoutingPlanDetailRow GetByPrimaryKey(int routing_plan_id, int route_id)
        {
            string whereSql = "[routing_plan_id]=" + _db.CreateSqlParameterName("Routing_plan_id") + " AND " +
                              "[route_id]=" + _db.CreateSqlParameterName("Route_id");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Routing_plan_id", routing_plan_id);
            AddParameter(cmd, "Route_id", route_id);
            RoutingPlanDetailRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #23
0
        /// <summary>
        /// Gets <see cref="HolidayCalendarRow"/> by the primary key.
        /// </summary>
        /// <param name="rate_info_id">The <c>rate_info_id</c> column value.</param>
        /// <param name="holiday_day">The <c>holiday_day</c> column value.</param>
        /// <returns>An instance of <see cref="HolidayCalendarRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual HolidayCalendarRow GetByPrimaryKey(int rate_info_id, System.DateTime holiday_day)
        {
            string whereSql = "[rate_info_id]=" + _db.CreateSqlParameterName("Rate_info_id") + " AND " +
                              "[holiday_day]=" + _db.CreateSqlParameterName("Holiday_day");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Rate_info_id", rate_info_id);
            AddParameter(cmd, "Holiday_day", holiday_day);
            HolidayCalendarRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="GenerationRequestRow"/> by the primary key.
        /// </summary>
        /// <param name="request_id">The <c>request_id</c> column value.</param>
        /// <returns>An instance of <see cref="GenerationRequestRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual GenerationRequestRow GetByPrimaryKey(int request_id)
        {
            string     whereSql = "[request_id]=" + _db.CreateSqlParameterName("Request_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Request_id", request_id);
            GenerationRequestRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="WholesaleRouteRow"/> by the primary key.
        /// </summary>
        /// <param name="wholesale_route_id">The <c>wholesale_route_id</c> column value.</param>
        /// <returns>An instance of <see cref="WholesaleRouteRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual WholesaleRouteRow GetByPrimaryKey(int wholesale_route_id)
        {
            string     whereSql = "[wholesale_route_id]=" + _db.CreateSqlParameterName("Wholesale_route_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Wholesale_route_id", wholesale_route_id);
            WholesaleRouteRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #26
0
        /// <summary>
        /// Gets <see cref="EndPointRow"/> by the primary key.
        /// </summary>
        /// <param name="end_point_id">The <c>end_point_id</c> column value.</param>
        /// <returns>An instance of <see cref="EndPointRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual EndPointRow GetByPrimaryKey(short end_point_id)
        {
            var whereSql = "[end_point_id]=" + _db.CreateSqlParameterName("End_point_id");
            var cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "End_point_id", end_point_id);
            var tempArray = MapRecords(cmd);

            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #27
0
        /// <summary>
        /// Gets <see cref="InventoryHistoryRow"/> by the primary key.
        /// </summary>
        /// <param name="service_id">The <c>service_id</c> column value.</param>
        /// <param name="batch_id">The <c>batch_id</c> column value.</param>
        /// <param name="timestamp">The <c>timestamp</c> column value.</param>
        /// <returns>An instance of <see cref="InventoryHistoryRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual InventoryHistoryRow GetByPrimaryKey(short service_id, int batch_id, System.DateTime timestamp)
        {
            string whereSql = "[service_id]=" + _db.CreateSqlParameterName("Service_id") + " AND " +
                              "[batch_id]=" + _db.CreateSqlParameterName("Batch_id") + " AND " +
                              "[timestamp]=" + _db.CreateSqlParameterName("Timestamp");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Service_id", service_id);
            AddParameter(cmd, "Batch_id", batch_id);
            AddParameter(cmd, "Timestamp", timestamp);
            InventoryHistoryRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="VirtualSwitchRow"/> by the primary key.
        /// </summary>
        /// <param name="virtual_switch_id">The <c>virtual_switch_id</c> column value.</param>
        /// <returns>An instance of <see cref="VirtualSwitchRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual VirtualSwitchRow GetByPrimaryKey(int virtual_switch_id)
        {
            string     whereSql = "[virtual_switch_id]=" + _db.CreateSqlParameterName("Virtual_switch_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Virtual_switch_id", virtual_switch_id);
            VirtualSwitchRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="ScheduleRow"/> by the primary key.
        /// </summary>
        /// <param name="schedule_id">The <c>schedule_id</c> column value.</param>
        /// <returns>An instance of <see cref="ScheduleRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual ScheduleRow GetByPrimaryKey(int schedule_id)
        {
            string     whereSql = "[schedule_id]=" + _db.CreateSqlParameterName("Schedule_id");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Schedule_id", schedule_id);
            ScheduleRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Beispiel #30
0
        /// <summary>
        /// Gets <see cref="TimeOfDayPeriodRow"/> by the primary key.
        /// </summary>
        /// <param name="rate_info_id">The <c>rate_info_id</c> column value.</param>
        /// <param name="type_of_day_choice">The <c>type_of_day_choice</c> column value.</param>
        /// <param name="start_hour">The <c>start_hour</c> column value.</param>
        /// <returns>An instance of <see cref="TimeOfDayPeriodRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual TimeOfDayPeriodRow GetByPrimaryKey(int rate_info_id, byte type_of_day_choice, short start_hour)
        {
            string whereSql = "[rate_info_id]=" + _db.CreateSqlParameterName("Rate_info_id") + " AND " +
                              "[type_of_day_choice]=" + _db.CreateSqlParameterName("Type_of_day_choice") + " AND " +
                              "[start_hour]=" + _db.CreateSqlParameterName("Start_hour");
            IDbCommand cmd = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "Rate_info_id", rate_info_id);
            AddParameter(cmd, "Type_of_day_choice", type_of_day_choice);
            AddParameter(cmd, "Start_hour", start_hour);
            TimeOfDayPeriodRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }