thDB.Delete(laquo;DELETE FROM + comboBox.Text + WHERE [№]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Expenses WHERE [№]= raquo ; + dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Saleraquo;:.WorkWithDB.Delete(laquo;DELETE FROM + comboBox.Text + WHERE [№]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Revenue WHERE [№]= raquo ; + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;; Expenses :. Show ( Delete From This Table Impossible ) ;; Revenue :. Show ( Delete From This Table Impossible ) ;; Departments :. WorkWithDB.Delete ( DELETE FROM Posts WHERE [Department]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [№]= + dataGridView.CurrentRow.Cells[0].Value.ToString());;laquo;Services_Renderedraquo;:.WorkWithDB.Delete(laquo;DELETE FROM + comboBox.Text + WHERE [№]= + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;. WorkWithDB.Delete ( DELETE FROM Revenue WHERE [№]= raquo ; + dataGridView.CurrentRow.Cells [0] .Value.ToString ()) ;;:. WorkWithDB.Delete ( DELETE FROM + comboBox.Text + WHERE [№]= + (dataGridView.CurrentRow.Index + 1) .ToString ()) ;;
} NewTable=new TableStruct ();=Logic.WorkWithDB.ReadRecords (comboBox.Text); (NewTable);
} void button1_Click (object sender, EventArgs e)
{query= SELECT * FROM + comboBox.Text + WHERE [ + FindComboBox.Text + ]= + FindTextBox.Text + raquo ;; NewTable=new TableStruct ();
{= Logic.WorkWithDB.Find (query); (NewTable);
} (Exception ex)
{. Show ( Error , Error );
}
} void UpdateButton_Click (object sender, EventArgs e)
{column=(dataGridView.Columns [dataGridView.CurrentCell.ColumnIndex]). Name.ToString (); firstcolumn=(dataGridView.Columns [0]). Name.ToString ();
//MessageBox.Show (dataGridView.CurrentRow.Cells [0] .Value.ToString ()); query= Update + ComboBox.Text + SET [ + Column + ]= + DataGridView.CurrentCell.Value.ToString () + WHERE [ + Firstcolumn + ]= + DataGridView.CurrentRow.Cells [0] .Value.ToString () + raquo ;;
{. WorkWithDB.Update (query);
} (Exception ex)
{. Show ( Error raquo ;, Error );
}
}
}
}
Вихідний код програмного модуля, що здійснює роботу AddForm
using System;System.Collections.Generic;System.ComponentModel;System.Data;System.Drawing;System.Linq;System.Text;System.Threading.Tasks;System.Windows.Forms;Logic;Entity;Firm
{partial class AddForm: Form
{string tablename1; AddForm (string TableName)
{= TableName; .Text=TableName; (); (TableName)
{ Suppliers raquo ;: textBox1.Visible=true; textBox2.Visible=true; textBox3.Visible=true; textBox4.Visible=true; textBox5.Visible=true; .Text= № raquo ;; label2.Text= F.I.O raquo ;; label3.Text= Adress raquo ;; label4.Text= Tel raquo ;; label5.Text= E-mail raquo ;;. Height=220; .Location=new Point (112, 150) ;; Clients raquo ;: textBox1.Visible=true; textBox2.Visible=true; textBox3.Visible=true; textBox4.Visible=true; textBox5.Visible=true; .Text= № raquo ;; label2.Text= FIO raquo ;; label3.Text= Adress raquo ;; label4.Text= Tel raquo ;; label5.Text= E-mail raquo ;;. Height=220; .Location=new Point (112, 150) ;; Sort raquo ;: textBox1.Visible=true; textBox2.Visible=true; .Text= № raquo ;; label2.Text= Title raquo ;;. Height=220; .Location=new Point (112, 150) ;; Currency :. Height=220; .Location=new Point (112, 150) ;. Visible= true; textBox2.Visible=true; .Text= № raquo ;; label2.Text= Name raquo ;; table5=new TableStruct ();=Logic.WorkWithDB.ReadRecords ( Currency ) ;. Text=table5.Notes.Count.ToString () ;. ReadOnly=true ;; Sort_Rev_Exp :. Height=220; .Location=new Point (112, 150) ;. Visible=true; textBox2.Visible=true; .Text= № raquo ;; label2.Text= Name raquo ;; table4=new TableStruct ();=Logic.WorkWithDB.ReadRecords ( Sort_Rev_Exp ) ;. Text=table4.Notes.Count.ToString () ;. ReadOnly=true ;; Revenue :. Height=220; .Location=new Point (112, 150) ;. Text= This table is a reflection of tables + Environment.NewLine + Sale and Services_Rendered raquo ;;. Text= Back raquo ;;; Expenses :. Height=220; .Location=new Point (112, 150) ;. Text= This table is a reflection of tables + Environment.NewLine + Coming and Salary raquo ;;. Text= Back raquo ;;; Merchandise :. Height=220; .Location=new Point (112, 150) ;. Visible=true; textBox3.Visible=true; te...