fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Sfera_CRM
  12. {
  13. public partial class DeleteContractsFRM : Form
  14. {
  15. public DeleteContractsFRM()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. Mapping mp = new Mapping();
  21.  
  22. private void DeleteContractsFRM_Load(object sender, EventArgs e)
  23. {
  24. // TODO: данная строка кода позволяет загрузить данные в таблицу "closed_contracts.Closed_contracts". При необходимости она может быть перемещена или удалена.
  25. this.closed_contractsTableAdapter.Fill(this.closed_contracts.Closed_contracts);
  26.  
  27. }
  28.  
  29.  
  30. public void update_data()
  31. {
  32. dataGridView1.DataSource = null;
  33. dataGridView1.DataSource = mp.Show("SELECT * FROM Contracts");
  34. }
  35.  
  36. private void back_Click_1(object sender, EventArgs e)
  37. {
  38. update_data();
  39. Config.forms["menuFRM"].Show();
  40. Hide();
  41. }
  42.  
  43. private void Close_order_Click_1(object sender, EventArgs e)
  44. {
  45.  
  46. string contract_id = dataGridView1.CurrentRow.Cells[0].Value.ToString();
  47.  
  48. mp.CRUD("DELETE FROM Contracts WHERE Contracts_id = " + contract_id);
  49. MessageBox.Show("Договор успешно удалён из базы");
  50. update_data();
  51.  
  52. }
  53.  
  54. private void button1_Click_1(object sender, EventArgs e)
  55. {
  56. update_data();
  57. }
  58. }
  59. }
  60.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(4,14): error CS0234: The type or namespace name `Data' does not exist in the namespace `System'. Are you missing `System.Data' assembly reference?
prog.cs(9,22): error CS0234: The type or namespace name `Forms' does not exist in the namespace `System.Windows'. Are you missing `System.Windows.Forms' assembly reference?
prog.cs(13,47): error CS0246: The type or namespace name `Form' could not be found. Are you missing an assembly reference?
prog.cs(20,9): error CS0246: The type or namespace name `Mapping' could not be found. Are you missing an assembly reference?
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty