Esempio n. 1
0
        }// end of PekinPrintData

        private static void PrintData()
        {
            object locker = new object();

            FldValue  = FormatSpaces("", "R", 3);                               //Title
            FldValue += FormatSpaces(FName.Replace("?", ""), "R", 15);          //FName
            FldValue += FormatSpaces(MidIni.Replace("?", ""), "R", 1);          // Middle Initial
            FldValue += FormatSpaces(LName.Replace("?", ""), "R", 20);          //LName
            FldValue += FormatSpaces("", "R", 4);                               // Post Name
            FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 12);         //UniqID
            //FldValue += FormatSpaces("  ", "R", 2);//Sequence Number
            FldValue += FormatSpaces(SequenceNo.Replace("?", "00"), "R", 2);    //Sequence Number Healthsprings doesn't have deps.
            FldValue += FormatSpaces(SSN.Replace("?", ""), "R", 9);             //SSN
            FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 33); //Addr1  I can add more special chars, no commas between.
            FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 33); //Addr2
            FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 21);  //City
            FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2);  //State
            if (HPS)
            {
                FldValue += FormatHPSZip(Zip.Replace("?", ""), "R", 9);//Zip
            }
            else
            {
                FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 5);//Zip
            }
            if (!HPS && !PEK)
            {
                FldValue += FormatSpaces(Zip4.Replace("?", ""), "R", 4); //Zip4
            }
            FldValue += FormatSpaces(HomePhone, "R", 10);                //Homephone
            FldValue += FormatSpaces("          ", "R", 10);             // worksphone
            FldValue += FormatSpaces("  ", "R", 2);                      // Coverage
            if (HPS)
            {
                FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 12);// GroupCode
            }
            else
            {
                FldValue += FormatSpaces("HLTHSPRNG", "R", 12); // GroupCode
            }
            FldValue += FormatSpaces(TermDate, "R", 8);         //TermDate
            FldValue += FormatSpaces(EffDate, "R", 8);          //EffDate
            FldValue += FormatSpaces(DOB, "R", 8);              //DOB
            if (HPS)
            {
                FldValue += FormatSpaces(Relation.Replace("?", ""), "R", 1);//Relation
            }
            else
            {
                FldValue += FormatSpaces(" ", "R", 1); //Relation
            }
            FldValue += FormatSpaces(" ", "R", 1);     //StudentStatus
            if (HPS)
            {
                FldValue += FormatSpaces(PaidThruDT, "R", 8);// PaidThruDate for HPS
            }
            else
            {
                FldValue += FormatSpaces("    ", "R", 4);              // Plan for Healthsprings
            }
            FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1); //Gender

            try
            {
                if (File.Exists(OutputStream))
                {
                    using (StreamWriter sw = File.AppendText(OutputStream))
                    {
                        if (LName != "")
                        {
                            sw.WriteLine(FldValue);
                        }
                        sw.Flush();
                    }
                }
                else
                {
                    using (StreamWriter sw = File.CreateText(OutputStream))
                    {
                        if (LName != "")
                        {
                            sw.WriteLine(FldValue);
                        }
                        sw.Flush();
                    }
                }
            }// end try
            catch (IOException ex)
            {
                MessageBox.Show(ex.Message);
            }
            FName      = "";
            LName      = "";
            MidIni     = "";
            UniqID     = "";
            SSN        = "";
            Addr1      = "";
            Addr2      = "";
            City       = "";
            State      = "";
            Zip        = "     ";
            Zip4       = "    ";
            HomePhone  = "";
            GroupCode  = "";
            TermDate   = "";
            EffDate    = "";
            PaidThruDT = "";
            DOB        = "";
            Relation   = "";
            Gender     = "";
        }// end of PrintData
Esempio n. 2
0
 public override int GetHashCode() =>
 Zip5.GetHashCode() ^ Zip4.GetHashCode();