Example #1
0
        private void ParseFins(string source) //finId:planId:enrolled
        {
            var items  = source.Split(',');
            var result = new EnrolleeFinTypeDO[items.Length];

            string[] item;
            long     finId;
            long     planId;
            int      enrolled;

            for (var i = 0; i < items.Length; i++)
            {
                item     = items[i].Split(':');
                finId    = long.Parse(item[0]);
                planId   = long.Parse(item[1]);
                enrolled = int.Parse(item[2]);

                result[i] = new EnrolleeFinTypeDO
                {
                    FinTypeId = finId,
                    PlanId    = planId,
                    Enrolled  = enrolled == 1
                };

                //if (enrolled == 1)
                //{
                //    EnrolledTo = planId;
                //}
            }

            FinTypes = result;
        }
Example #2
0
 public EnrolleeDO()
 {
     Plans    = new EnrolleePlanDO[0];
     Marks    = new EnrolleeMarkDO[0];
     FinTypes = new EnrolleeFinTypeDO[0];
 }