コード例 #1
0
        private void DataGrid_科目设置_Row_MouseDoubleClick(object sender, RoutedEventArgs e)
        {
            string header = DataGrid_科目设置.CurrentCell.Column.Header.ToString();

            if (header == "是否启用" || header == "借贷方向" || header == "年初数")
            {
                return;
            }
            if (DataGrid_科目设置.SelectedCells.Count > 0)
            {
                Model_科目管理 m = new Model_科目管理();
                m = DataGrid_科目设置.SelectedCells[0].Item as Model_科目管理;
                DoubleClickSubject = m.科目编号;
                Windows.Win_子细目 w = new Windows.Win_子细目(m.科目编号, m.科目名称, m.借贷标记);
                w.ShowDialog();
            }
        }
コード例 #2
0
        private void Button_编辑子细目_Click(object sender, RoutedEventArgs e)
        {
            Model_科目管理 m = new Model_科目管理();

            try
            {
                m = DataGrid_科目设置.SelectedCells[0].Item as Model_科目管理;
            }
            catch (Exception ex)
            {
                Log.Write(ex.Message);
            }
            if (m.科目编号 != null)
            {
                Windows.Win_子细目 w = new Windows.Win_子细目(m.科目编号, m.科目名称, m.借贷标记);
                w.ShowDialog();
            }
            else
            {
                MessageBoxCommon.Show("请选择科目!");
            }
        }
コード例 #3
0
 private void DataGrid_科目设置_Row_MouseDoubleClick(object sender, RoutedEventArgs e)
 {
     string header = DataGrid_科目设置.CurrentCell.Column.Header.ToString();
     if (header == "是否启用" || header == "借贷方向" || header == "年初数")
     {
         return;
     }
     if (DataGrid_科目设置.SelectedCells.Count > 0)
     {
         Model_科目管理 m = new Model_科目管理();
         m = DataGrid_科目设置.SelectedCells[0].Item as Model_科目管理;
         DoubleClickSubject = m.科目编号;
         Windows.Win_子细目 w = new Windows.Win_子细目(m.科目编号, m.科目名称, m.借贷标记);
         w.ShowDialog();
     }
 }
コード例 #4
0
 private void Button_编辑子细目_Click(object sender, RoutedEventArgs e)
 {
     Model_科目管理 m = new Model_科目管理();
     try
     {
         m = DataGrid_科目设置.SelectedCells[0].Item as Model_科目管理;
     }
     catch (Exception ex)
     {
         Log.Write(ex.Message);
     }
     if (m.科目编号 != null)
     {
         Windows.Win_子细目 w = new Windows.Win_子细目(m.科目编号, m.科目名称, m.借贷标记);
         w.ShowDialog();
     }
     else
     {
         MessageBoxCommon.Show("请选择科目!");
     }
 }