wing;System.Linq;System.Text;System.Threading.Tasks;System.Windows.Forms;Logic;Entity;Firm
{partial class Form1: Form
{Form f; int countOfColumns; Form1 ()
{();
} void Form1_Load (object sender, EventArgs e)
{. Text=Logic.WorkWithDB.DBConnect (); NewTable=new TableStruct ();=Logic.WorkWithDB.ReadRecords ( Clients ); (NewTable); TablesNames=new Note () ;=Logic.WorkWithDB.TableNames (); (int i=1; i lt; TablesNames.Records.Count; i ++)
{. Items.Add (TablesNames.Records [i]);
} query= SELECT * FROM + ComboBox.Text;=Logic.WorkWithDB.Find (query); (int i=0; i lt; NewTable.Notes [0] .Records.Count; i ++)
{. Items.Add (NewTable.Notes [0] .Records [i] .ToString ());
}
} void NewTableGrid (TableStruct table)
{. Columns.Clear (); (int i=0; i lt; table.Notes [0] .Records.Count; i ++)
{. Columns.Add (i.ToString (), table.Notes [0] .Records [i] .ToString ()) ;. Columns [i] .Name=table.Notes [0 ] .Records [i] .ToString ();
}=table.Notes [0] .Records.Count; (int i=1; i lt; table.Notes.Count; i ++)
{. Rows.Add (); (int j=0; j lt; table.Notes [i] .Records.Count; j ++)
{. Rows [i - 1] .Cells [j] .Value=table.Notes [i] .Records [j] .ToString ();
}
}
} void NewTableGrid2 (TableStruct table)
{. Columns.Clear (); (int i=0; i lt; table.Notes [0] .Records.Count; i ++)
{. Columns.Add (i.ToString (), table.Notes [0] .Records [i] .ToString ());
}=table.Notes [0] .Records.Count; (int i=1; i lt; table.Notes.Count; i ++)
{. Rows.Add (); (int j=0; j lt; table.Notes [i] .Records.Count; j ++)
{. Rows [i - 1] .Cells [j] .Value=table.Notes [i] .Records [j] .ToString ();
}
}
} void Form1_FormClosed (object sender, FormClosedEventArgs e)
{. WorkWithDB.CloseConnection ();
} void comboBox_SelectedValueChanged (object sender, EventArgs e)
{NewTable=new TableStruct ();=Logic.WorkWithDB.ReadRecords (comboBox.SelectedItem.ToString ()); (NewTable); query= SELECT * FROM + ComboBox.Text;=Logic.WorkWithDB.Find (query) ;. Items.Clear (); (int i=0; i lt; NewTable.Notes [0] .Records.Count; i ++)
{. Items.Add (NewTable.Notes [0] .Records [i] .ToString ());
}
} void Add_button_Click (object sender, EventArgs e)
{f=new AddForm (comboBox.Text) ;. Text=comboBox.Text; .Show ();
} void but_Click (object sender, EventArgs e)
{. Hide ();
} void DelButton_Click (object sender, EventArgs e)
{(comboBox.Text)
{ Merchandise :. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [Product_Code]=raquo;+dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Personal_Dataraquo;:.WorkWithDB.Delete(laquo;DELETE FROM Services_Rendered WHERE [Employee]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Salary WHERE [№Contract]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Empl_Data WHERE [№Contract]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [№Contract]= + dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Empl_Dataraquo;:.WorkWithDB.Delete(laquo;DELETE FROM Services_Rendered WHERE [Employee]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Salary WHERE [№Contract]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Empl_Data WHERE [№Contract]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [№Contract]= + dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Comingraquo;:.WorkWithDB.Delete(laquo;DELETE FROM Sale WHERE [Product_Code]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Merchandise WHERE [Product_Code]= + dataGridView.CurrentRow.Cells [ 0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [Product Code]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ( )) ;. WorkWithDB.Delete ( DELETE FROM Expenses WHERE [№]= + dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Salaryraquo;:.WorkWi...