Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
        public IList <T> DeleteCurrentItem()
        {
            IList <T> list  = new List <T>();
            var       items = tabGrid.SelectedItems;

            if (items != null && items.Count > 0 && Utils.MessageBoxShow("确定要删除共" + items.Count + " 条数据吗?"))
            {
                foreach (T t in items)
                {
                    list.Add(t);
                }
                DeleteEntry(list);
            }
            return(list);
        }