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 loginFRM : Form
  14. {
  15. public loginFRM()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20.  
  21. private void Enter_Click(object sender, EventArgs e)
  22. {
  23.  
  24.  
  25. }
  26.  
  27. private void back_Click(object sender, EventArgs e)
  28. {
  29. Mapping db_Work = new Mapping();
  30.  
  31. string query = "SELECT * FROM [Workers] WHERE Login = '" + login.Text + "' and Password='" + pass.Text + "';";
  32.  
  33. DataTable result = db_Work.Show(query);
  34.  
  35. List<string> errors = new List<string>();
  36.  
  37. if (login.Text.Length == 0 || pass.Text.Length == 0)
  38. {
  39. errors.Add("введите логин или пароль");
  40. }
  41.  
  42. if (result.Rows.Count == 0)
  43. {
  44. errors.Add("Неправильный логин или пароль");
  45. }
  46.  
  47. if (errors.Count == 0)
  48. {
  49. Config.right = result.Rows[0][2].ToString();
  50. Config.user_id = result.Rows[0][0].ToString();
  51. Config.forms["menuFRM"].Show();
  52. Hide();
  53. }
  54. else
  55. {
  56. MessageBox.Show(errors[0]);
  57. }
  58. }
  59.  
  60. private void Close_order_Click(object sender, EventArgs e)
  61. {
  62. Close();
  63. }
  64. }
  65. }
  66.  
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,37): error CS0246: The type or namespace name `Form' could not be found. Are you missing an assembly reference?
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty