Esempio n. 1
0
        /// <summary>
        /// 设置界址线表
        /// </summary>
        /// <param name="jsydDic"></param>
        /// <param name="jzxs"></param>
        internal static void SetJZXs(ObservableCollection <JSYD> jsyds, ObservableCollection <JZXInfo> jzxs)
        {
            Dictionary <string, ObservableCollection <JZXInfo> > dic = null;

            try
            {
                dic = Utils.GetGroupDicToList("BZDH", jzxs);
            }
            catch (Exception e)
            {
                MessageBox.Show("界址线表:宗地编码:" + e.Message);
                return;
            }


            ObservableCollection <JZXInfo> list;

            foreach (JSYD jsyd in jsyds)
            {
                if (!Utils.IsStrNull(jsyd.ZDNUM) && dic.TryGetValue(jsyd.ZDNUM, out list))
                {
                    jsyd.JZXInfos = list;
                }
            }
        }
Esempio n. 2
0
        internal static void SetFloor(Dictionary <string, JSYD> jsydDic, IList <Floor> floors)
        {
            Dictionary <string, IList <Floor> > dic = null;

            try
            {
                dic = Utils.GetGroupDicToList("ZDNUM", floors);
            }
            catch (Exception e)
            {
                MessageBox.Show("分层表:宗地编码:" + e.Message);
                return;
            }

            JSYD jsyd;

            foreach (string zdnum in dic.Keys)
            {
                if (jsydDic.TryGetValue(zdnum, out jsyd))
                {
                    jsyd.Floors = dic[zdnum];
                    foreach (Floor floor in jsyd.Floors)
                    {
                        floor.JSYD = jsyd;
                    }
                }
            }
        }
Esempio n. 3
0
        internal static void SetNF(Dictionary <string, JSYD> jsydDic, IList <NF> nfs)
        {
            Dictionary <string, IList <NF> > dic = null;

            try
            {
                dic = Utils.GetGroupDicToList("ZDNUM", nfs);
            }
            catch (Exception e)
            {
                MessageBox.Show("农房表:宗地编码:" + e.Message);
                return;
            }


            JSYD jsyd;

            foreach (string zdnum in dic.Keys)
            {
                if (jsydDic.TryGetValue(zdnum, out jsyd))
                {
                    jsyd.NFs = dic[zdnum];
                    foreach (NF nf in jsyd.NFs)
                    {
                        nf.JSYD = jsyd;
                    }
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 设置每一个户主的 地块
        /// </summary>
        /// <param name="hzs"></param>
        /// <param name="dks"></param>
        internal static void SetJTCY_DK(IList <JTCY> hzs, IList <DK> dks)
        {
            Dictionary <string, IList <DK> > cbfbmDKs = Utils.GetGroupDicToList("CBFBM", dks);
            IList <DK> dkTemp;

            foreach (JTCY hz in hzs)
            {
                string cbfbm = hz.CBFBM;
                if (cbfbmDKs.TryGetValue(cbfbm, out dkTemp))
                {
                    hz.DKs = dkTemp;
                }
            }
        }
Esempio n. 5
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);
        }
Esempio n. 6
0
File: ZJDDao.cs Progetto: YB9527/CG
        /// <summary>
        /// 检查重复的身份证
        /// </summary>
        /// <param name="hzs"></param>
        /// <returns></returns>
        public IList <string> ChecSFZ(IList <JTCY> hzs, ZJDDataSourceViewModel model)
        {
            IList <string> errors = new List <string>();
            IList <JTCY>   jtcys  = JTCYCustom.GetAllJTCY(hzs);
            Dictionary <string, IList <JTCY> > sfzDic = Utils.GetGroupDicToList("GMSFHM", jtcys);

            foreach (string sfz in sfzDic.Keys)
            {
                IList <JTCY> sfzList = sfzDic[sfz];
                if (sfzList.Count > 1)
                {
                    foreach (JTCY jtcy in sfzList)
                    {
                        if (sfz == "")
                        {
                            errors.Add(sfz + ",证件号码为空");
                        }
                        else
                        {
                            CheckZJDWriteError(jtcy.Row, model.JTCYTableErrorCellIndex, "证件号码重复");
                        }
                    }
                }
                else
                {
                    if (!Utils.CheckIDCard18(sfz))
                    {
                        if (sfz == "")
                        {
                            CheckZJDWriteError(sfzList[0].Row, model.JTCYTableErrorCellIndex, "证件号码为空");
                        }
                        else
                        {
                            CheckZJDWriteError(sfzList[0].Row, model.JTCYTableErrorCellIndex, "证件号码不符合规则");
                        }
                    }
                }
            }
            return(errors);
        }
Esempio n. 7
0
        internal static void SetHZs(IList <JSYD> jsyds, IList <JSYD> gyrs, IList <JTCY> hzs)
        {
            Dictionary <string, JTCY> hzZJHMDic = null;

            try
            {
                hzZJHMDic = MyUtils.Utils.GetGroupDic("GMSFHM", hzs);
            }
            catch (Exception e)
            {
                MessageBox.Show("家庭成员表:证件号码:" + e.Message);
                return;
            }
            Dictionary <string, IList <JSYD> > gyrDic = Utils.GetGroupDicToList("ZDNUM", gyrs);
            JTCY         hz;
            IList <JSYD> gyrTem;

            foreach (JSYD jsyd in jsyds)
            {
                string zjhm = jsyd.ZJHM;
                if (!Utils.IsStrNull(zjhm) && hzZJHMDic.TryGetValue(zjhm, out hz))
                {
                    jsyd.HZs.Add(hz);
                }
                //
                string zdnum = jsyd.ZDNUM;
                if (gyrDic.TryGetValue(zdnum, out gyrTem))
                {
                    foreach (JSYD gyr in gyrTem)
                    {
                        zjhm = gyr.ZJHM;
                        if (!Utils.IsStrNull(zjhm) && hzZJHMDic.TryGetValue(zjhm, out hz))
                        {
                            jsyd.HZs.Add(hz);
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 所有家庭成员 设置到户主中 去
        /// </summary>
        /// <param name="jtcys"></param>
        /// <returns></returns>
        private static ObservableCollection <JTCY> GetJTCYSToHz(ObservableCollection <JTCY> jtcys)
        {
            if (jtcys == null)
            {
                return(null);
            }

            string tem   = "";
            int    index = 1;

            foreach (JTCY jtcy in jtcys)
            {
                if (!Utils.IsStrNull(jtcy.CBFBM))
                {
                    tem        = (index++) + "";
                    jtcy.CBFBM = tem;
                }
                else
                {
                    jtcy.CBFBM = tem;
                }
            }
            Dictionary <string, ObservableCollection <JTCY> > jtcyGroupDic = Utils.GetGroupDicToList("CBFBM", jtcys);
            ObservableCollection <JTCY> hzs = new ObservableCollection <JTCY>();

            foreach (string cbfbm in jtcyGroupDic.Keys)
            {
                IList <JTCY> oneJTCY = jtcyGroupDic[cbfbm];
                JTCY         hz      = FindOneJtcyHZ(oneJTCY);
                if (hz != null)
                {
                    hz.JTCies = oneJTCY;
                    hzs.Add(hz);
                }
            }
            return(hzs);
        }