예제 #1
0
파일: DlgLayerType.cs 프로젝트: zfc317/mscd
 private void btn_Add_Click(object sender, EventArgs e)
 {
     var dlgAddLayerType = new DlgAddLayerType(ref _layerTypes,new Model.LayerType(), LayerTypeEditType.Add);
     if(dlgAddLayerType.ShowDialog()==DialogResult.OK)
     {
         gc_LayerType.RefreshDataSource();
     }
 }
예제 #2
0
파일: DlgLayerType.cs 프로젝트: zfc317/mscd
        private void btn_Add_Click(object sender, EventArgs e)
        {
            var dlgAddLayerType = new DlgAddLayerType(ref _layerTypes, new Model.LayerType(), LayerTypeEditType.Add);

            if (dlgAddLayerType.ShowDialog() == DialogResult.OK)
            {
                gc_LayerType.RefreshDataSource();
            }
        }
예제 #3
0
파일: DlgLayerType.cs 프로젝트: zfc317/mscd
 private void btn_Rename_Click(object sender, EventArgs e)
 {
     if(gv_LayerType.GetFocusedRow()==null)
     {
         XtraMessageBox.Show("请选择要重命名的数据!", "提示");
         return;
     }
     var id =Convert.ToInt32(gv_LayerType.GetFocusedRowCellValue("id"));
     var name = gv_LayerType.GetFocusedRowCellValue("Name").ToString();
     var updateModel =new Model.LayerType(){id = id,Name = name};
     var dlgAddLayerType = new DlgAddLayerType(ref _layerTypes, updateModel, LayerTypeEditType.Rename)
                               {Text = "修改图层类型名称"};
     if (dlgAddLayerType.ShowDialog() == DialogResult.OK)
     {
         gc_LayerType.RefreshDataSource();
     }
 }
예제 #4
0
파일: DlgLayerType.cs 프로젝트: zfc317/mscd
        private void btn_Rename_Click(object sender, EventArgs e)
        {
            if (gv_LayerType.GetFocusedRow() == null)
            {
                XtraMessageBox.Show("请选择要重命名的数据!", "提示");
                return;
            }
            var id          = Convert.ToInt32(gv_LayerType.GetFocusedRowCellValue("id"));
            var name        = gv_LayerType.GetFocusedRowCellValue("Name").ToString();
            var updateModel = new Model.LayerType()
            {
                id = id, Name = name
            };
            var dlgAddLayerType = new DlgAddLayerType(ref _layerTypes, updateModel, LayerTypeEditType.Rename)
            {
                Text = "修改图层类型名称"
            };

            if (dlgAddLayerType.ShowDialog() == DialogResult.OK)
            {
                gc_LayerType.RefreshDataSource();
            }
        }