Esempio n. 1
0
        ///<summary>Deletes everything from the carrier table.  Does not truncate the table so that PKs are not reused on accident.</summary>
        public static void ClearCarrierTable()
        {
            string command = "DELETE FROM carrier";

            DataCore.NonQ(command);
            Carriers.RefreshCache();
        }
Esempio n. 2
0
        ///<summary>encryptionMethod should be 1 or 2.</summary>
        public static void SetEncryptionMethod(long planNum, byte encryptionMethod)
        {
            InsPlan plan    = InsPlans.RefreshOne(planNum);
            Carrier carrier = Carriers.GetCarrier(plan.CarrierNum);

            if (carrier.CanadianEncryptionMethod != encryptionMethod)
            {
                carrier.CanadianEncryptionMethod = encryptionMethod;
                Carriers.Update(carrier);
                Carriers.RefreshCache();
            }
        }
Esempio n. 3
0
        ///<summary>version should be "02" or "04". Returns old version.</summary>
        public static string SetCDAnetVersion(long planNum, string version)
        {
            InsPlan plan       = InsPlans.RefreshOne(planNum);
            Carrier carrier    = Carriers.GetCarrier(plan.CarrierNum);
            string  oldVersion = carrier.CDAnetVersion;

            if (carrier.CDAnetVersion != version)
            {
                carrier.CDAnetVersion = version;
                Carriers.Update(carrier);
                Carriers.RefreshCache();
            }
            return(oldVersion);
        }
Esempio n. 4
0
        public static Carrier CreateCarrier(string suffix, string address = "", string city = "", string state = "", string zip = "", string electID = "", params TrustedEtransTypes[] arrayTrustedEtrans)
        {
            Carrier carrier = new Carrier();

            carrier.CarrierName = "Carrier" + suffix;
            carrier.Address     = address;
            carrier.City        = city;
            carrier.State       = state;
            carrier.Zip         = zip;
            carrier.ElectID     = electID;
            if (arrayTrustedEtrans != null && arrayTrustedEtrans.Length > 0)
            {
                carrier.TrustedEtransFlags = (TrustedEtransTypes)arrayTrustedEtrans.ToList().Sum(x => (int)x);
            }
            Carriers.Insert(carrier);
            Carriers.RefreshCache();
            return(carrier);
        }