示例#1
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public override List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (EndUserType != null)
            {
                p.Add(new KeyValuePair <string, string>("EndUserType", EndUserType.ToString()));
            }

            if (IsoCountry != null)
            {
                p.Add(new KeyValuePair <string, string>("IsoCountry", IsoCountry));
            }

            if (NumberType != null)
            {
                p.Add(new KeyValuePair <string, string>("NumberType", NumberType));
            }

            if (PageSize != null)
            {
                p.Add(new KeyValuePair <string, string>("PageSize", PageSize.ToString()));
            }

            return(p);
        }
示例#2
0
        //Delete record
        public static void Delete(EndUserType o, string user)
        {
            var result = from r in Db.EndUserTypes where r.Id == o.Id select r;

            Db.EndUserTypes.Remove(result.FirstOrDefault());
            Db.SaveChanges(user);
        }
示例#3
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (Email != null)
            {
                p.Add(new KeyValuePair <string, string>("Email", Email));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback)));
            }

            if (RegulationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("RegulationSid", RegulationSid.ToString()));
            }

            if (IsoCountry != null)
            {
                p.Add(new KeyValuePair <string, string>("IsoCountry", IsoCountry));
            }

            if (EndUserType != null)
            {
                p.Add(new KeyValuePair <string, string>("EndUserType", EndUserType.ToString()));
            }

            if (NumberType != null)
            {
                p.Add(new KeyValuePair <string, string>("NumberType", NumberType));
            }

            return(p);
        }
示例#4
0
        //Update record
        public static void Update(EndUserType o, string user)
        {
            var result = from r in Db.EndUserTypes where r.Id == o.Id select r;

            Db.SaveChanges(user);
        }
示例#5
0
 public static void Add(EndUserType o, string user)
 {
     Db.EndUserTypes.Add(o);
     Db.SaveChanges(user);
 }