Ejemplo n.º 1
0
        private void Geographic_Features_DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataRowView rowview = Geographic_Features_DataGrid.SelectedItem as DataRowView;

            if (rowview != null)
            {
                String  RowID    = rowview.Row[7].ToString();
                Decimal RowIDDec = System.Convert.ToDecimal(RowID);

                Geographic_Features_Data_Entry_Window Geo_Data_Window = new Geographic_Features_Data_Entry_Window(RowIDDec);
                Geo_Data_Window.DataChanged += Geo_Data_Window_DataChanged;
                Geo_Data_Window.Show();
            }
        }
Ejemplo n.º 2
0
 private void button_New_Click(object sender, RoutedEventArgs e)
 {
     using (SqlConnection conn = new SqlConnection(ConStr))
     {
         string     NextID     = "SELECT NEXT VALUE FOR dbo.Control_Form_Sequence";
         SqlCommand ShowNextID = new SqlCommand(NextID, conn);
         conn.Open();
         String  StrNextID = ShowNextID.ExecuteScalar().ToString();
         Decimal DecNextID = System.Convert.ToDecimal(StrNextID.ToString());
         Geographic_Features_Data_Entry_Window Geo_Data_Window = new Geographic_Features_Data_Entry_Window(DecNextID);
         Geo_Data_Window.DataChanged += Geo_Data_Window_DataChanged;
         Geo_Data_Window.Show();
         conn.Close();
     }
 }