final changes
This commit is contained in:
parent
4e1acff83c
commit
413256e850
@ -41,8 +41,8 @@
|
|||||||
labelContractDeadline = new Label();
|
labelContractDeadline = new Label();
|
||||||
labelContractPaymentAmount = new Label();
|
labelContractPaymentAmount = new Label();
|
||||||
dataGridViewServices = new DataGridView();
|
dataGridViewServices = new DataGridView();
|
||||||
groupBox = new GroupBox();
|
|
||||||
ColumnServiceDescription = new DataGridViewComboBoxColumn();
|
ColumnServiceDescription = new DataGridViewComboBoxColumn();
|
||||||
|
groupBox = new GroupBox();
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownContractPaymentAmount).BeginInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownContractPaymentAmount).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridViewServices).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridViewServices).BeginInit();
|
||||||
groupBox.SuspendLayout();
|
groupBox.SuspendLayout();
|
||||||
@ -172,6 +172,14 @@
|
|||||||
dataGridViewServices.Size = new Size(352, 244);
|
dataGridViewServices.Size = new Size(352, 244);
|
||||||
dataGridViewServices.TabIndex = 17;
|
dataGridViewServices.TabIndex = 17;
|
||||||
//
|
//
|
||||||
|
// ColumnServiceDescription
|
||||||
|
//
|
||||||
|
ColumnServiceDescription.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
ColumnServiceDescription.HeaderText = "Услуга";
|
||||||
|
ColumnServiceDescription.Name = "ColumnServiceDescription";
|
||||||
|
ColumnServiceDescription.Resizable = DataGridViewTriState.True;
|
||||||
|
ColumnServiceDescription.SortMode = DataGridViewColumnSortMode.Automatic;
|
||||||
|
//
|
||||||
// groupBox
|
// groupBox
|
||||||
//
|
//
|
||||||
groupBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
groupBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
@ -183,14 +191,6 @@
|
|||||||
groupBox.TabStop = false;
|
groupBox.TabStop = false;
|
||||||
groupBox.Text = "Услуги:";
|
groupBox.Text = "Услуги:";
|
||||||
//
|
//
|
||||||
// ColumnServiceDescription
|
|
||||||
//
|
|
||||||
ColumnServiceDescription.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
ColumnServiceDescription.HeaderText = "Услуга";
|
|
||||||
ColumnServiceDescription.Name = "ColumnServiceDescription";
|
|
||||||
ColumnServiceDescription.Resizable = DataGridViewTriState.True;
|
|
||||||
ColumnServiceDescription.SortMode = DataGridViewColumnSortMode.Automatic;
|
|
||||||
//
|
|
||||||
// FormContract
|
// FormContract
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
@ -11,15 +11,16 @@ namespace PIbd_23_Gutorov_I.A._IT_Company.Forms
|
|||||||
ICustomerRepository customerRepository, IExecutorRepository executorRepository)
|
ICustomerRepository customerRepository, IExecutorRepository executorRepository)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_customerExecutorReviewRepository = customerExecutorReviewRepository ?? throw new ArgumentNullException(nameof(customerExecutorReviewRepository));
|
_customerExecutorReviewRepository = customerExecutorReviewRepository ??
|
||||||
|
throw new ArgumentNullException(nameof(customerExecutorReviewRepository));
|
||||||
|
|
||||||
comboBoxCustomerExecutorReviewCustomerId.DataSource = customerRepository.ReadCustomers();
|
comboBoxCustomerExecutorReviewCustomerId.DataSource = customerRepository.ReadCustomers();
|
||||||
comboBoxCustomerExecutorReviewCustomerId.DisplayMember = "Name";
|
comboBoxCustomerExecutorReviewCustomerId.DisplayMember = "Name";
|
||||||
comboBoxCustomerExecutorReviewCustomerId.DisplayMember = "Id";
|
comboBoxCustomerExecutorReviewCustomerId.ValueMember = "Id";
|
||||||
|
|
||||||
comboBoxCustomerExecutorReviewExecutorId.DataSource = executorRepository.ReadExecutors();
|
comboBoxCustomerExecutorReviewExecutorId.DataSource = executorRepository.ReadExecutors();
|
||||||
comboBoxCustomerExecutorReviewExecutorId.DisplayMember = "Name";
|
comboBoxCustomerExecutorReviewExecutorId.DisplayMember = "Name";
|
||||||
comboBoxCustomerExecutorReviewCustomerId.DisplayMember = "Id";
|
comboBoxCustomerExecutorReviewCustomerId.ValueMember = "Id";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonSave_Click(object sender, EventArgs e)
|
private void ButtonSave_Click(object sender, EventArgs e)
|
||||||
@ -33,9 +34,7 @@ namespace PIbd_23_Gutorov_I.A._IT_Company.Forms
|
|||||||
throw new Exception("Имеются незаполненные поля");
|
throw new Exception("Имеются незаполненные поля");
|
||||||
}
|
}
|
||||||
|
|
||||||
_customerExecutorReviewRepository.CreateCustomerExecutorReview(CustomerExecutorReview.CreateElement(
|
_customerExecutorReviewRepository.CreateCustomerExecutorReview(CreateCustomerExecutorReview(0));
|
||||||
0, (int)comboBoxCustomerExecutorReviewCustomerId.SelectedValue!, (int)comboBoxCustomerExecutorReviewExecutorId.SelectedValue!,
|
|
||||||
richTextBoxCustomerExecutorReviewReview.Text, Convert.ToInt32(numericUpDownCustomerExecutorReviewGrade.Value)));
|
|
||||||
|
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
@ -46,5 +45,14 @@ namespace PIbd_23_Gutorov_I.A._IT_Company.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonCancel_Click(object sender, EventArgs e) => Close();
|
private void ButtonCancel_Click(object sender, EventArgs e) => Close();
|
||||||
|
|
||||||
|
private CustomerExecutorReview CreateCustomerExecutorReview(int id)
|
||||||
|
{
|
||||||
|
return CustomerExecutorReview.CreateElement(
|
||||||
|
id, (int)comboBoxCustomerExecutorReviewCustomerId.SelectedValue!,
|
||||||
|
(int)comboBoxCustomerExecutorReviewExecutorId.SelectedValue!,
|
||||||
|
richTextBoxCustomerExecutorReviewReview.Text,
|
||||||
|
Convert.ToInt32(numericUpDownCustomerExecutorReviewGrade.Value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ namespace PIbd_23_Gutorov_I.A._IT_Company.Forms
|
|||||||
if (string.IsNullOrEmpty(richTextBoxServiceDescription.Text))
|
if (string.IsNullOrEmpty(richTextBoxServiceDescription.Text))
|
||||||
throw new Exception("Имеются незаполненные поля");
|
throw new Exception("Имеются незаполненные поля");
|
||||||
|
|
||||||
_serviceRepository.CreateService(Service.CreateEntity(0,
|
if (_serviceId.HasValue) _serviceRepository.UpdateService(Service.CreateEntity(_serviceId.Value, richTextBoxServiceDescription.Text));
|
||||||
richTextBoxServiceDescription.Text));
|
else _serviceRepository.CreateService(Service.CreateEntity(0, richTextBoxServiceDescription.Text));
|
||||||
|
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user