Example #1
0
        internal static IList <JTCY> ExtractHZs(IList <JTCY> jTCies)
        {
            IList <JTCY> hzs = new List <JTCY>();
            Dictionary <string, IList <JTCY> > bmDic = Utils.GetGroupDicToList("CBFBM", jTCies);

            foreach (string bm in bmDic.Keys)
            {
                try
                {
                    JTCY hz = ExtractHZ(bmDic[bm]);
                    hzs.Add(hz);
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message);
                    return(null);
                }
            }
            return(hzs);
        }
Example #2
0
        private static JTCY ExtractHZ(IList <JTCY> list)
        {
            JTCY hz = null;

            foreach (JTCY jtcy in list)
            {
                if (jtcy.YHZGX == "02" || jtcy.YHZGX == "户主")
                {
                    hz = jtcy;
                    break;
                }
            }
            if (hz == null)
            {
                throw new Exception("家庭成员没有户主:" + list[0].XM);
            }
            else
            {
                hz.jTCies = list;
                return(hz);
            }
        }