コード例 #1
0
ファイル: HouseInfo.xaml.cs プロジェクト: fire-insurance/BD
        private void EditBtn_Click(object sender, RoutedEventArgs e)
        {
            if (HouseInfoTable.SelectedIndex == -1)
            {
                Error.Text = "Не выбрана строка!";
                return;
            }
            Error.Text = "";
            int RowIndex     = HouseInfoTable.SelectedIndex;
            int House_Number = (int)dt.Rows[RowIndex][0];



            Query     = "SELECT Код_здания FROM здание WHERE Номер_Здания =" + House_Number + " AND Код_Землевладения= " + Land_Index + ";";
            connector = new MySqlConnection(connection);

            connector.Open();
            command = new MySqlCommand(Query, connector);
            int House_index = (int)command.ExecuteScalar();


            AddHouse newHouse = new AddHouse(this, 2, Land_Index, House_index);

            newHouse.Show();
            connector.Close();
        }
コード例 #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     AddHouse form = new AddHouse();
     form.Token = this.Token;
     form.Buildings = _buildings;
     form.Add_Callback += Form_Add_Callback;
     form.ShowDialog(this);
 }
コード例 #3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (_selectedNode == null)
     {
         SOAFramework.Client.Controls.MessageBox.Show(this, "请先选择一个楼盘");
         return;
     }
     var building = _selectedNode.Tag as FullBuilding;
     AddHouse form = new AddHouse();
     form.Token = this.Token;
     form.Buildings = _buildings;
     form.BuildingID = building.ID;
     form.Floor = _currentFloor;
     form.Add_Callback += AddHouse_Callback;
     form.ShowDialog(this);
 }
コード例 #4
0
ファイル: HouseInfo.xaml.cs プロジェクト: fire-insurance/BD
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            AddHouse newHouse = new AddHouse(this, 1, Land_Index, 0);

            newHouse.Show();
        }