Exemple #1
0
        }// end of PekinFormatDate

        private static void StandardPrintData()
        {// This is the standard Careington File Layout
            //if (BOON)
            //    GroupCode = "BOON-DN11";
            if (String.IsNullOrEmpty(GroupCode))
            {
                GroupCode = "            ";
            }
            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);                           //PostName
            FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 12);         //UniqID
            FldValue += FormatSpaces(SequenceNo, "R", 2);                       //Sequence Number
            FldValue += FormatSpaces(SSN, "R", 9);                              //SSN
            FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 33); //Addr1
            FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 33); //Addr2
            FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 21);  //City
            FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2);  //State
            FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 9);             //Zip
            FldValue += FormatSpaces(HomePhone, "R", 10);                       //HomePhone
            FldValue += FormatSpaces("          ", "R", 10);                    //WorkPhone
            FldValue += FormatSpaces("  ", "R", 2);                             //Coverage
            FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 12);      // GroupCode
            FldValue += FormatSpaces(TermDate, "R", 8);                         //TermDate
            FldValue += FormatSpaces(EffDate, "R", 8);                          //EffDate
            FldValue += FormatSpaces(DOB, "R", 8);                              //DOB
            FldValue += FormatSpaces(Relation, "R", 1);                         //Relation
            FldValue += FormatSpaces(" ", "R", 1);                              //StudentStatus
            FldValue += FormatSpaces("    ", "R", 4);                           //Plan
            FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1);          //Gender


            try
            {
                if (File.Exists(OutputStream))
                {
                    using (StreamWriter sw = File.AppendText(OutputStream))
                    {
                        if (FName != "" && LName != "")
                        {
                            sw.WriteLine(FldValue);
                        }
                        sw.Flush();
                    }
                }
                else
                {
                    using (StreamWriter sw = File.CreateText(OutputStream))
                    {
                        if (FName != "" && 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 StandardPrintData
Exemple #2
0
        }// end of StandardPrintData

        private static void PekinPrintData()
        {// Pekin's data is not in the order it needs to print.
         // That's why it has it's own print method.
            string filler = "          000000000000000000000000000            00000000000000                    0000000      H000000100          00000000000000                                        0000000                                                                                         0000000000                                         ";

            int fillerlength = filler.Length;



            if (string.IsNullOrEmpty(TermDate))
            {
                TermDate = "       ";
            }
            object locker = new object();

            //FldValue = FormatSpaces("", "R", 3);//Title
            FldValue += FormatSpaces("PRXPEK", "R", 9);                          //?
            FldValue += FormatSpaces("006", "R", 15);                            //?
            FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 15);       // GroupCode
            FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 18);          //UniqID
            FldValue += FormatSpaces(SequenceNo + " ", "R", 3);                  //Sequence Number
            FldValue += FormatSpaces("1" + LName.Replace("?", ""), "R", 26);     //LName
            FldValue += FormatSpaces(FName.Replace("?", ""), "R", 15);           //FName
            FldValue += FormatSpaces(MidIni.Replace("?", ""), "R", 1);           // Middle Initial
            FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1);           //Gender
            FldValue += FormatSpaces(DOB + "0", "R", 9);                         //DOB
            FldValue += FormatSpaces(" 1Y                  A00032773", "R", 30); // No idea what any of this is.
            FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 25);  //Addr1
            FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 15);  //Addr2
            FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 20);   //City
            FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2);   //State
            FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 11);             //Zip
            FldValue += FormatSpaces("USA ", "R", 4);                            //USA?
            FldValue += FormatSpaces("0000000000 ", "R", 11);                    //Supposed to be home phone.
            FldValue += FormatSpaces("0A00032773         ", "R", 19);            //Don't know what this is.
            FldValue += FormatSpaces("00000000000000", "R", 14);                 //Don't know what this is.
            FldValue += FormatSpaces(EffDate, "R", 7);                           //EffDate
            FldValue += FormatSpaces(TermDate, "R", 7);                          //TermDate
            FldValue += FormatSpaces(filler, "R", 323);                          //TermDate



            //   FldValue += FormatSpaces(SSN.Replace("?", ""), "R", 9);//SSN

            //    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

            //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


            try
            {
                if (File.Exists(OutputStream))
                {
                    using (StreamWriter sw = File.AppendText(OutputStream))
                    {
                        if (FName != "" && LName != "")
                        {
                            sw.WriteLine(FldValue);
                        }
                        sw.Flush();
                    }
                }
                else
                {
                    using (StreamWriter sw = File.CreateText(OutputStream))
                    {
                        if (FName != "" && 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 PekinPrintData
Exemple #3
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