PIBD-22. Denisov V.D. LabWork_1 #2
@ -32,38 +32,35 @@
|
||||
buttonCancel = new Button();
|
||||
buttonSave = new Button();
|
||||
comboBoxDoctor = new ComboBox();
|
||||
groupBox = new GroupBox();
|
||||
dataGridViewPay = new DataGridView();
|
||||
ColumnMonth = new DataGridViewTextBoxColumn();
|
||||
ColumnCount = new DataGridViewTextBoxColumn();
|
||||
ColumnPayment = new DataGridViewTextBoxColumn();
|
||||
groupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridViewPay).BeginInit();
|
||||
label4 = new Label();
|
||||
dateTimePicker = new DateTimePicker();
|
||||
SuspendLayout();
|
||||
//
|
||||
// labelDoctor
|
||||
//
|
||||
labelDoctor.AutoSize = true;
|
||||
labelDoctor.Location = new Point(31, 32);
|
||||
labelDoctor.Location = new Point(35, 43);
|
||||
labelDoctor.Name = "labelDoctor";
|
||||
labelDoctor.Size = new Size(34, 15);
|
||||
labelDoctor.Size = new Size(43, 20);
|
||||
labelDoctor.TabIndex = 0;
|
||||
labelDoctor.Text = "Врач";
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
buttonCancel.Location = new Point(310, 396);
|
||||
buttonCancel.Location = new Point(240, 143);
|
||||
buttonCancel.Margin = new Padding(3, 4, 3, 4);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new Size(93, 29);
|
||||
buttonCancel.Size = new Size(106, 39);
|
||||
buttonCancel.TabIndex = 11;
|
||||
buttonCancel.Text = "Отмена";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonSave
|
||||
//
|
||||
buttonSave.Location = new Point(22, 396);
|
||||
buttonSave.Location = new Point(35, 143);
|
||||
buttonSave.Margin = new Padding(3, 4, 3, 4);
|
||||
buttonSave.Name = "buttonSave";
|
||||
buttonSave.Size = new Size(93, 29);
|
||||
buttonSave.Size = new Size(106, 39);
|
||||
buttonSave.TabIndex = 10;
|
||||
buttonSave.Text = "Сохранить";
|
||||
buttonSave.UseVisualStyleBackColor = true;
|
||||
@ -73,76 +70,45 @@
|
||||
//
|
||||
comboBoxDoctor.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxDoctor.FormattingEnabled = true;
|
||||
comboBoxDoctor.Location = new Point(86, 29);
|
||||
comboBoxDoctor.Location = new Point(193, 40);
|
||||
comboBoxDoctor.Margin = new Padding(3, 4, 3, 4);
|
||||
comboBoxDoctor.Name = "comboBoxDoctor";
|
||||
comboBoxDoctor.Size = new Size(121, 23);
|
||||
comboBoxDoctor.Size = new Size(153, 28);
|
||||
comboBoxDoctor.TabIndex = 12;
|
||||
//
|
||||
// groupBox
|
||||
// label4
|
||||
//
|
||||
groupBox.Controls.Add(dataGridViewPay);
|
||||
groupBox.Location = new Point(22, 114);
|
||||
groupBox.Name = "groupBox";
|
||||
groupBox.Size = new Size(384, 223);
|
||||
groupBox.TabIndex = 13;
|
||||
groupBox.TabStop = false;
|
||||
groupBox.Text = "groupBox1";
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(35, 99);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(54, 20);
|
||||
label4.TabIndex = 17;
|
||||
label4.Text = "Месяц";
|
||||
//
|
||||
// dataGridViewPay
|
||||
// dateTimePicker
|
||||
//
|
||||
dataGridViewPay.AllowUserToResizeColumns = false;
|
||||
dataGridViewPay.AllowUserToResizeRows = false;
|
||||
dataGridViewPay.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewPay.Columns.AddRange(new DataGridViewColumn[] { ColumnMonth, ColumnCount, ColumnPayment });
|
||||
dataGridViewPay.Dock = DockStyle.Fill;
|
||||
dataGridViewPay.Location = new Point(3, 19);
|
||||
dataGridViewPay.Margin = new Padding(3, 2, 3, 2);
|
||||
dataGridViewPay.MultiSelect = false;
|
||||
dataGridViewPay.Name = "dataGridViewPay";
|
||||
dataGridViewPay.RowHeadersVisible = false;
|
||||
dataGridViewPay.RowHeadersWidth = 51;
|
||||
dataGridViewPay.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridViewPay.Size = new Size(378, 201);
|
||||
dataGridViewPay.TabIndex = 1;
|
||||
//
|
||||
// ColumnMonth
|
||||
//
|
||||
ColumnMonth.HeaderText = "Месяц";
|
||||
ColumnMonth.MinimumWidth = 6;
|
||||
ColumnMonth.Name = "ColumnMonth";
|
||||
ColumnMonth.Resizable = DataGridViewTriState.True;
|
||||
ColumnMonth.SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
ColumnMonth.Width = 125;
|
||||
//
|
||||
// ColumnCount
|
||||
//
|
||||
ColumnCount.HeaderText = "Кол-во пациентов";
|
||||
ColumnCount.MinimumWidth = 6;
|
||||
ColumnCount.Name = "ColumnCount";
|
||||
ColumnCount.Width = 125;
|
||||
//
|
||||
// ColumnPayment
|
||||
//
|
||||
ColumnPayment.HeaderText = "Оплата";
|
||||
ColumnPayment.MinimumWidth = 6;
|
||||
ColumnPayment.Name = "ColumnPayment";
|
||||
ColumnPayment.Width = 125;
|
||||
dateTimePicker.CustomFormat = "MMMM yyyy";
|
||||
dateTimePicker.Format = DateTimePickerFormat.Custom;
|
||||
dateTimePicker.Location = new Point(193, 94);
|
||||
dateTimePicker.Name = "dateTimePicker";
|
||||
dateTimePicker.Size = new Size(153, 27);
|
||||
dateTimePicker.TabIndex = 22;
|
||||
//
|
||||
// FormDoctorPayment
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(418, 450);
|
||||
Controls.Add(groupBox);
|
||||
ClientSize = new Size(370, 207);
|
||||
Controls.Add(dateTimePicker);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(comboBoxDoctor);
|
||||
Controls.Add(buttonCancel);
|
||||
Controls.Add(buttonSave);
|
||||
Controls.Add(labelDoctor);
|
||||
Margin = new Padding(3, 4, 3, 4);
|
||||
Name = "FormDoctorPayment";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Оплата врачу";
|
||||
groupBox.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridViewPay).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@ -153,10 +119,7 @@
|
||||
private Button buttonCancel;
|
||||
private Button buttonSave;
|
||||
private ComboBox comboBoxDoctor;
|
||||
private GroupBox groupBox;
|
||||
private DataGridView dataGridViewPay;
|
||||
private DataGridViewTextBoxColumn ColumnMonth;
|
||||
private DataGridViewTextBoxColumn ColumnCount;
|
||||
private DataGridViewTextBoxColumn ColumnPayment;
|
||||
private Label label4;
|
||||
private DateTimePicker dateTimePicker;
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace ProjectPolyclinic.Forms;
|
||||
|
||||
@ -31,21 +32,16 @@ public partial class FormDoctorPayment : Form
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dataGridViewPay.RowCount < 1 || comboBoxDoctor.SelectedIndex < 0)
|
||||
if (comboBoxDoctor.SelectedIndex < 0)
|
||||
{
|
||||
throw new Exception("Имеются не заполненные поля");
|
||||
throw new Exception("Имеются незаполненные поля.");
|
||||
}
|
||||
|
||||
string month = dataGridViewPay.Rows[0].Cells["ColumnMonth"].Value?.ToString();
|
||||
int countPatient = int.Parse(dataGridViewPay.Rows[0].Cells["Column2"].Value?.ToString() ?? "0");
|
||||
int payment = int.Parse(dataGridViewPay.Rows[0].Cells["Column3"].Value?.ToString() ?? "0");
|
||||
string month = dateTimePicker.Value.ToString();
|
||||
|
||||
if (string.IsNullOrEmpty(month))
|
||||
{
|
||||
throw new Exception("Месяц не заполнен");
|
||||
}
|
||||
//сделать запрос на счет пациентов у каждого врача в medicalhis
|
||||
|
||||
_doctorPayRepository.CreateDoctorPayments(DoctorPay.CreateElement(0, (int)comboBoxDoctor.SelectedValue!, month, countPatient, payment));
|
||||
_doctorPayRepository.CreateDoctorPayments(DoctorPay.CreateElement(0, (int)comboBoxDoctor.SelectedValue!, month, 0, 0));
|
||||
|
||||
|
||||
|
||||
|
@ -117,13 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ColumnMonth.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnPayment.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
@ -47,18 +47,18 @@
|
||||
// labelPacientName
|
||||
//
|
||||
labelPacientName.AutoSize = true;
|
||||
labelPacientName.Location = new Point(30, 36);
|
||||
labelPacientName.Location = new Point(34, 48);
|
||||
labelPacientName.Name = "labelPacientName";
|
||||
labelPacientName.Size = new Size(54, 15);
|
||||
labelPacientName.Size = new Size(69, 20);
|
||||
labelPacientName.TabIndex = 0;
|
||||
labelPacientName.Text = "Пациент";
|
||||
//
|
||||
// labelDoctorName
|
||||
//
|
||||
labelDoctorName.AutoSize = true;
|
||||
labelDoctorName.Location = new Point(30, 88);
|
||||
labelDoctorName.Location = new Point(34, 117);
|
||||
labelDoctorName.Name = "labelDoctorName";
|
||||
labelDoctorName.Size = new Size(47, 15);
|
||||
labelDoctorName.Size = new Size(59, 20);
|
||||
labelDoctorName.TabIndex = 1;
|
||||
labelDoctorName.Text = "Доктор";
|
||||
//
|
||||
@ -66,26 +66,30 @@
|
||||
//
|
||||
comboBoxPacient.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxPacient.FormattingEnabled = true;
|
||||
comboBoxPacient.Location = new Point(129, 33);
|
||||
comboBoxPacient.Location = new Point(147, 44);
|
||||
comboBoxPacient.Margin = new Padding(3, 4, 3, 4);
|
||||
comboBoxPacient.Name = "comboBoxPacient";
|
||||
comboBoxPacient.Size = new Size(133, 23);
|
||||
comboBoxPacient.Size = new Size(151, 28);
|
||||
comboBoxPacient.TabIndex = 2;
|
||||
//
|
||||
// comboBoxDoctor
|
||||
//
|
||||
comboBoxDoctor.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxDoctor.FormattingEnabled = true;
|
||||
comboBoxDoctor.Location = new Point(129, 85);
|
||||
comboBoxDoctor.Location = new Point(147, 113);
|
||||
comboBoxDoctor.Margin = new Padding(3, 4, 3, 4);
|
||||
comboBoxDoctor.Name = "comboBoxDoctor";
|
||||
comboBoxDoctor.Size = new Size(133, 23);
|
||||
comboBoxDoctor.Size = new Size(151, 28);
|
||||
comboBoxDoctor.TabIndex = 3;
|
||||
//
|
||||
// groupBox
|
||||
//
|
||||
groupBox.Controls.Add(dataGridView);
|
||||
groupBox.Location = new Point(30, 175);
|
||||
groupBox.Location = new Point(34, 233);
|
||||
groupBox.Margin = new Padding(3, 4, 3, 4);
|
||||
groupBox.Name = "groupBox";
|
||||
groupBox.Size = new Size(235, 247);
|
||||
groupBox.Padding = new Padding(3, 4, 3, 4);
|
||||
groupBox.Size = new Size(269, 329);
|
||||
groupBox.TabIndex = 4;
|
||||
groupBox.TabStop = false;
|
||||
groupBox.Text = "groupBox";
|
||||
@ -97,12 +101,14 @@
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnDrug, DrugCount });
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(3, 19);
|
||||
dataGridView.Location = new Point(3, 24);
|
||||
dataGridView.Margin = new Padding(3, 4, 3, 4);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(229, 225);
|
||||
dataGridView.Size = new Size(263, 301);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
// ColumnDrug
|
||||
@ -115,14 +121,16 @@
|
||||
// DrugCount
|
||||
//
|
||||
DrugCount.HeaderText = "Количество";
|
||||
DrugCount.MinimumWidth = 6;
|
||||
DrugCount.Name = "DrugCount";
|
||||
DrugCount.Width = 125;
|
||||
//
|
||||
// label
|
||||
//
|
||||
label.AutoSize = true;
|
||||
label.Location = new Point(30, 139);
|
||||
label.Location = new Point(34, 185);
|
||||
label.Name = "label";
|
||||
label.Size = new Size(43, 15);
|
||||
label.Size = new Size(52, 20);
|
||||
label.TabIndex = 5;
|
||||
label.Text = "Статус";
|
||||
//
|
||||
@ -130,26 +138,28 @@
|
||||
//
|
||||
comboBoxStatus.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxStatus.FormattingEnabled = true;
|
||||
comboBoxStatus.Location = new Point(129, 136);
|
||||
comboBoxStatus.Location = new Point(147, 181);
|
||||
comboBoxStatus.Margin = new Padding(3, 4, 3, 4);
|
||||
comboBoxStatus.Name = "comboBoxStatus";
|
||||
comboBoxStatus.Size = new Size(133, 23);
|
||||
comboBoxStatus.Size = new Size(151, 28);
|
||||
comboBoxStatus.TabIndex = 6;
|
||||
comboBoxStatus.SelectedIndexChanged += comboBoxStatus_SelectedIndexChanged;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
buttonCancel.Location = new Point(169, 519);
|
||||
buttonCancel.Location = new Point(193, 692);
|
||||
buttonCancel.Margin = new Padding(3, 4, 3, 4);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new Size(93, 29);
|
||||
buttonCancel.Size = new Size(106, 39);
|
||||
buttonCancel.TabIndex = 10;
|
||||
buttonCancel.Text = "Отмена";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonSave
|
||||
//
|
||||
buttonSave.Location = new Point(30, 519);
|
||||
buttonSave.Location = new Point(34, 692);
|
||||
buttonSave.Margin = new Padding(3, 4, 3, 4);
|
||||
buttonSave.Name = "buttonSave";
|
||||
buttonSave.Size = new Size(93, 29);
|
||||
buttonSave.Size = new Size(106, 39);
|
||||
buttonSave.TabIndex = 9;
|
||||
buttonSave.Text = "Сохранить";
|
||||
buttonSave.UseVisualStyleBackColor = true;
|
||||
@ -157,9 +167,9 @@
|
||||
//
|
||||
// FormMedicalHistory
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(296, 574);
|
||||
ClientSize = new Size(325, 765);
|
||||
Controls.Add(buttonCancel);
|
||||
Controls.Add(buttonSave);
|
||||
Controls.Add(comboBoxStatus);
|
||||
@ -169,6 +179,7 @@
|
||||
Controls.Add(comboBoxPacient);
|
||||
Controls.Add(labelDoctorName);
|
||||
Controls.Add(labelPacientName);
|
||||
Margin = new Padding(3, 4, 3, 4);
|
||||
Name = "FormMedicalHistory";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Медицинская история";
|
||||
|
@ -94,9 +94,4 @@ public partial class FormMedicalHistory : Form
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void comboBoxStatus_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -123,4 +123,10 @@
|
||||
<metadata name="DrugCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnDrug.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DrugCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
x
Reference in New Issue
Block a user