private CollectImportRecord FixPssos(CollectImportRecord r, SmartTransRecord record, DriverDB db)
        {
            if (record.Description != null)
            {
                if (record.Description.Contains("Form 25 - Property Seizure and Sale Order"))
                {
                    if (record.Reasons != null)
                    {
                        if (record.Reasons.Contains("Completed PSSO"))
                        {
                            r.Identifier = "Completed2";
                            if (record.Reasons.Contains("Completed PSSO - Individual Person"))
                            {
                                r.Portal_Reason = "Person 18";
                                r.Other_Code    = "19";
                                r.Comment1      = "Individual Person 18 - Residence";
                                r.Driver        = db.FindDriverCode(record.Driver);
                            }
                            else if (record.Reasons.Contains("Completed PSSO - Individual Business"))
                            {
                                r.Portal_Reason = "Person 18";
                                r.Other_Code    = "20";
                                r.Comment1      = "Individual Person 18 - Business";
                                r.Driver        = db.FindDriverCode(record.Driver);
                            }
                            else
                            {
                                r.Portal_Reason = "OTHER";
                                r.Other_Code    = "OTHER";
                                r.Comment1      = "Other";
                                r.Driver        = db.FindDriverCode(record.Driver);
                            }
                        }
                    }
                }
            }

            return(r);
        }
        private CollectImportRecord CalculateComments(SmartTransRecord record, CollectImportRecord r, string tempComments, string tempReasons)
        {
            // int stringLength = record.Reasons.Length;

            int commentLength   = 0;
            int ReasonLineCount = 0;

            if (tempComments != null)
            {
                tempComments  = tempComments.Replace("\r", string.Empty).Replace("\n", string.Empty);
                commentLength = tempComments.Length;
            }

            if (tempReasons != null)
            {
                ReasonLineCount = tempReasons.Length;
            }

            if (ReasonLineCount < 60)
            {
                r.Comment1 = tempReasons;

                if (commentLength < 60)
                {
                    r.Comment2 = tempComments;
                }
                else if (commentLength < 120)
                {
                    r.Comment2 = tempComments.Substring(0, 60);
                    r.Comment3 = tempComments.Substring(60, (commentLength - 60)); // this number is the remainder
                }
                else if (commentLength < 180)
                {
                    r.Comment2 = tempComments.Substring(0, 60);
                    r.Comment3 = tempComments.Substring(60, 60);
                    r.Comment4 = tempComments.Substring(120, (commentLength - 120)); // this number is the remainder
                }
                else if (commentLength < 240)
                {
                    r.Comment2 = tempComments.Substring(0, 60);
                    r.Comment3 = tempComments.Substring(61, 60);
                    r.Comment4 = tempComments.Substring(121, 60);
                    r.Comment5 = tempComments.Substring(181, (commentLength - 181)); // this number is the remainder
                }
                else if (commentLength < 300)
                {
                    r.Comment2 = tempComments.Substring(0, 60);
                    r.Comment3 = tempComments.Substring(61, 60);
                    r.Comment4 = tempComments.Substring(121, 60);
                    r.Comment5 = tempComments.Substring(181, 60);
                    r.Comment6 = tempComments.Substring(241, (commentLength - 241)); // this number is the remainder
                }
            }
            else if (ReasonLineCount < 120)
            {
                r.Comment1 = tempReasons.Substring(0, 60);
                r.Comment2 = tempReasons.Substring(60, (ReasonLineCount - 60)); // this number is the remainder

                if (commentLength < 60)
                {
                    r.Comment3 = tempComments;
                }
                else if (commentLength < 120)
                {
                    r.Comment3 = tempComments.Substring(0, 60);
                    r.Comment4 = tempComments.Substring(60, (commentLength - 60)); // this number is the remainder
                }
                else if (commentLength < 180)
                {
                    r.Comment3 = tempComments.Substring(0, 60);
                    r.Comment4 = tempComments.Substring(60, 60);
                    r.Comment5 = tempComments.Substring(120, (commentLength - 120)); // this number is the remainder
                }
                else if (commentLength < 240)
                {
                    r.Comment3 = tempComments.Substring(0, 60);
                    r.Comment4 = tempComments.Substring(61, 60);
                    r.Comment5 = tempComments.Substring(121, 60);
                    r.Comment6 = tempComments.Substring(181, (commentLength - 181)); // this number is the remainder
                }
                else if (commentLength < 300)
                {
                    r.Comment3 = tempComments.Substring(0, 60);
                    r.Comment4 = tempComments.Substring(61, 60);
                    r.Comment5 = tempComments.Substring(121, 60);
                    r.Comment6 = tempComments.Substring(181, 60);
                    r.Comment7 = tempComments.Substring(241, (commentLength - 241)); // this number is the remainder
                }
            }
            else if (ReasonLineCount < 180)
            {
                r.Comment1 = tempReasons.Substring(0, 60);
                r.Comment2 = tempReasons.Substring(60, 60);
                r.Comment3 = tempReasons.Substring(120, (ReasonLineCount - 120)); // this number is the remainder

                if (commentLength < 60)
                {
                    r.Comment4 = tempComments;
                }
                else if (commentLength < 120)
                {
                    r.Comment4 = tempComments.Substring(0, 60);
                    r.Comment5 = tempComments.Substring(60, (commentLength - 60)); // this number is the remainder
                }
                else if (commentLength < 180)
                {
                    r.Comment4 = tempComments.Substring(0, 60);
                    r.Comment5 = tempComments.Substring(60, 60);
                    r.Comment6 = tempComments.Substring(120, (commentLength - 120)); // this number is the remainder
                }
                else if (commentLength < 240)
                {
                    r.Comment4 = tempComments.Substring(0, 60);
                    r.Comment5 = tempComments.Substring(61, 60);
                    r.Comment6 = tempComments.Substring(121, 60);
                    r.Comment7 = tempComments.Substring(181, (commentLength - 181)); // this number is the remainder
                }
                else if (commentLength < 300)
                {
                    r.Comment4 = tempComments.Substring(0, 60);
                    r.Comment5 = tempComments.Substring(61, 60);
                    r.Comment6 = tempComments.Substring(121, 60);
                    r.Comment7 = tempComments.Substring(181, 60);
                    r.Comment8 = tempComments.Substring(241, (commentLength - 241)); // this number is the remainder
                }
            }
            else if (ReasonLineCount < 240)
            {
                r.Comment1 = tempReasons.Substring(0, 60);
                r.Comment2 = tempReasons.Substring(61, 60);
                r.Comment3 = tempReasons.Substring(121, 60);
                r.Comment4 = tempReasons.Substring(181, (ReasonLineCount - 181)); // this number is the remainder
            }
            else if (ReasonLineCount < 300)
            {
                r.Comment1 = tempReasons.Substring(0, 60);
                r.Comment2 = tempReasons.Substring(61, 60);
                r.Comment3 = tempReasons.Substring(121, 60);
                r.Comment4 = tempReasons.Substring(181, 60);
                r.Comment5 = tempReasons.Substring(241, (ReasonLineCount - 241)); // this number is the remainder
            }
            else
            {
                r.Comment1 = tempReasons.Substring(0, 60);
                r.Comment2 = tempReasons.Substring(61, 60);
                r.Comment3 = tempReasons.Substring(121, 60);
                r.Comment4 = tempReasons.Substring(181, 60);
                r.Comment5 = tempReasons.Substring(241, 60);
                r.Comment6 = tempReasons.Substring(301, (ReasonLineCount - 301)); // this number is the remainder
            }

            return(r);
        }