コード例 #1
0
        public IList <JSYD> GetJSYDByZJDDataSourceViewModel(ZJDDataSourceViewModel model)
        {
            ObservableCollection <ZJDXZDM> zjdXZDM = ZJDXZDMCustom.GetExcelToZJDXZDM(model.ZJDXZDMTablePath);
            ObservableCollection <JTCY>    hzs     = JTCYCustom.GetExcelToHZS(model.JTCYTablePath);

            //户主必须要先检查
            zjdDao.ChecSFZ(hzs, model);

            ObservableCollection <JSYD> jsyds = JSYDCustom.GetExcelToJSYDS(model.JSYDTablePath);

            IWorkbook workbook = ExcelRead.ReadExcel(model.NFTablePath);
            ObservableCollection <NF>    nfs    = NFCustom.GetExcelToNFS(workbook.GetSheetAt(0));
            ObservableCollection <Floor> floors = FloorCustom.GetExcelToFloors(workbook.GetSheetAt(1));

            ObservableCollection <Zdinfo> zdinfos = ZdinfoCustom.GetMDBToZdinfos(model.ZdinfoMDBPath);
            Dictionary <string, JSYD>     jsydDic = MyUtils.Utils.GetGroupDic("ZDNUM", jsyds);

            JSYDCustom.SetZdinfo(jsydDic, zdinfos);

            ObservableCollection <JSYD> gyrs = JSYDCustom.GetExcelToGYRS(model.JSYDTablePath);

            JSYDCustom.SetHZs(jsyds, gyrs, hzs);
            JSYDCustom.SetNF(jsydDic, nfs);
            JSYDCustom.SetFloor(jsydDic, floors);
            JSYDCustom.SetZJDXZDM(jsydDic, zjdXZDM);

            ObservableCollection <QZB> qzbs = QZBCustom.GetMDBToQZB(model.QZ_BSMDBPath);

            JSYDCustom.SetQZBs(jsyds, qzbs);
            ObservableCollection <JZXInfo> jzxs = JZXInfoCustom.GetMDBToJZX(model.QZ_BSMDBPath);

            JSYDCustom.SetJZXs(jsyds, jzxs);
            return(jsyds);
        }
コード例 #2
0
        /// <summary>
        /// 保存内容
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            double areaDX = GetNF_Floor_Area();

            if ((areaDX == 0 && Utils.MessageBoxShow("确定保存吗?")) || Utils.MessageBoxShow("农房表与分层表,面积之差:" + areaDX + ",确定保存吗?"))
            {
                JSYDCustom.SavejSYDRow(ectypalJSYD, dataSourceViewModel);

                //电话号码设置
                if (MyUtils.Utils.CheckListExists(JSYD.HZs))
                {
                    JSYD.HZs[0].LXDH = LXDHTexEdit.Text;
                }



                if (MyUtils.Utils.CheckListExists(JSYD.QZBs))
                {
                    //删除以前的签章表
                    MDBUtils.DeleteBySql(dataSourceViewModel.QZ_BSMDBPath, "Delete From " + QZBCustom.QZBTableName + "  Where BZDH ='" + JSYD.ZDNUM + "'");
                    //保存现在的
                    MDBUtils.WriteData(dataSourceViewModel.QZ_BSMDBPath, QZBCustom.QZBTableName, ectypalJSYD.QZBs);
                }
                if (MyUtils.Utils.CheckListExists(JSYD.JZXInfos))
                {
                    //删除以前的标示表
                    MDBUtils.DeleteBySql(dataSourceViewModel.QZ_BSMDBPath, "Delete From " + JZXInfoCustom.JZXTableName + " Where BZDH ='" + JSYD.ZDNUM + "'");
                    //保存现在的
                    MDBUtils.WriteData(dataSourceViewModel.QZ_BSMDBPath, JZXInfoCustom.JZXTableName, ectypalJSYD.JZXInfos);
                }
                //对象复制
                ReflectUtils.ClassCopy(ectypalJSYD, JSYD);
            }
        }
コード例 #3
0
        public JSYDDataShowWindow(JSYD jsyd, ZJDDataSourceViewModel dataSourceViewModel) : this()
        {
            this.JSYD = jsyd;

            ectypalJSYD = JSYDCustom.Clone(jsyd);


            this.dataSourceViewModel = dataSourceViewModel;
            this.DataContext         = ectypalJSYD;
            if (MyUtils.Utils.CheckListExists(ectypalJSYD.HZs))
            {
                JTCYTable.ItemsSource     = ectypalJSYD.HZs[0].JTCies;
                LXDHTexEdit.Text          = JSYD.HZs[0].LXDH;
                JTCYCountTextEdit.Content = JSYD.HZs[0].JTCies.Count;
            }
            //NFTable.ItemsSource = ectypalJSYD.NFs;
            //FloorTable.ItemsSource = ectypalJSYD.Floors;
            //QZBTable.ItemsSource = ectypalJSYD.QZBs;
            //BSBTable.ItemsSource = ectypalJSYD.JZXInfos;
            //签章表
            ContextMenu aMenu    = new ContextMenu();
            MenuItem    lastMenu = new MenuItem();

            lastMenu.Header = "上行插入";
            lastMenu.Click += QZBTableLastMenu_Click;
            aMenu.Items.Add(lastMenu);

            MenuItem nextMenu = new MenuItem();

            nextMenu.Header = "下行行插入";
            nextMenu.Click += QZBTableNextMenu_Click;
            aMenu.Items.Add(nextMenu);

            MenuItem deleteMenu = new MenuItem();

            deleteMenu.Header = "删除";
            deleteMenu.Click += QZBTableDeleteMenu_Click;
            aMenu.Items.Add(deleteMenu);
            QZBTable.ContextMenu = aMenu;


            //标示表
            ContextMenu bMenu     = new ContextMenu();
            MenuItem    blastMenu = new MenuItem();

            blastMenu.Header = "上行插入";
            blastMenu.Click += BSBTableLastMenu_Click;
            bMenu.Items.Add(blastMenu);

            MenuItem bnextMenu = new MenuItem();

            bnextMenu.Header = "下行行插入";
            bnextMenu.Click += BSBTableNextMenu_Click;
            bMenu.Items.Add(bnextMenu);

            MenuItem bdeleteMenu = new MenuItem();

            bdeleteMenu.Header = "删除";
            bdeleteMenu.Click += BSBTableDeleteMenu_Click;
            bMenu.Items.Add(bdeleteMenu);
            BSBTable.ContextMenu = bMenu;

            //注入标示表
            PageAddDangAnDdaiQZBAndBSB();
            //检查农房表 与 建设用地表
            GetNF_Floor_Area();
            TipBox1.Text = "未确权颁证\r\n遗失/灭失\r\n已提交原件";
            TipBox2.Text = "其他情形\r\n改建扩建";
            TipBox3.Text = "自建\r\n翻建";
        }