Доделал. Отправляю...

This commit is contained in:
Pipiaka 2024-11-16 19:20:12 +04:00
parent d5a10abe57
commit 736b16822b
44 changed files with 31 additions and 228 deletions

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities;
public class Client

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities;
public class Employee

View File

@ -1,6 +1,5 @@
namespace Accounting_Time_It_Company.Entities.Enums;
[Flags]
public enum TypePost
{
None = 0,

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities.Enums;
[Flags]
@ -15,5 +10,5 @@ public enum TypeProduct
Suppurt = 2,
Supervision = 3
Supervision = 4
}

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Accounting_Time_It_Company.Entities.Enums;
using Accounting_Time_It_Company.Entities.Enums;
namespace Accounting_Time_It_Company.Entities;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Entities;

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities;
public class TypeJob
@ -22,7 +17,8 @@ public class TypeJob
public IEnumerable<WorkTime> WorkTimesManager { get; private set; } = [];
public static TypeJob CreateOperation(int id, int productId, string discription, int allowanceForJob, IEnumerable<WorkTime> workTimesDevelop, IEnumerable<WorkTime> workTimesManager)
public static TypeJob CreateOperation(int id, int productId, string discription, int allowanceForJob,
IEnumerable<WorkTime> workTimesDevelop, IEnumerable<WorkTime> workTimesManager)
{
return new TypeJob
{

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities;
public class Vacation

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Accounting_Time_It_Company.Entities;
public class WorkTime

View File

@ -101,6 +101,7 @@
Controls.Add(textBoxName);
Controls.Add(labelName);
Name = "FormClient";
StartPosition = FormStartPosition.CenterParent;
Text = "Клиент";
ResumeLayout(false);
PerformLayout();

View File

@ -1,15 +1,5 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Repositories;
using Accounting_Time_It_Company.Repositories.Implementations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{

View File

@ -1,14 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -146,6 +146,7 @@
Controls.Add(textBoxName);
Controls.Add(labelName);
Name = "FormEmployee";
StartPosition = FormStartPosition.CenterParent;
Text = "Работник";
((System.ComponentModel.ISupportInitialize)numericUpDownAllowance).EndInit();
ResumeLayout(false);

View File

@ -1,14 +1,5 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{
@ -83,6 +74,7 @@ namespace Accounting_Time_It_Company.Forms
private void ButtonCansle_Click(object sender, EventArgs e) => Close();
private Employee CreateEmployee(int id) => Employee.CreateEntity(id, (int)comboBoxPost.SelectedValue!, textBoxName.Text, maskedTextBoxPhone.Text, (float)numericUpDownAllowance.Value);
private Employee CreateEmployee(int id) => Employee.CreateEntity(id, (int)comboBoxPost.SelectedValue!, textBoxName.Text,
maskedTextBoxPhone.Text, (float)numericUpDownAllowance.Value);
}
}

View File

@ -108,6 +108,7 @@
Controls.Add(dataGridViewData);
Controls.Add(panel1);
Name = "FormEmployees";
StartPosition = FormStartPosition.CenterParent;
Text = "Работники";
Load += FormEmployees_Load;
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();

View File

@ -1,13 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -127,6 +127,7 @@
Controls.Add(labelAllowance);
Controls.Add(labelName);
Name = "FormPost";
StartPosition = FormStartPosition.CenterParent;
Text = "Должность";
((System.ComponentModel.ISupportInitialize)numericUpDownWage).EndInit();
ResumeLayout(false);

View File

@ -1,15 +1,6 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Entities.Enums;
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{
@ -79,6 +70,7 @@ namespace Accounting_Time_It_Company.Forms
private void ButtonCansle_Click(object sender, EventArgs e) => Close();
private Post CreatePost(int id) => Post.CreateEntity(id, (TypePost)comboBoxName.SelectedItem!, textBoxLevelPost.Text, (int)numericUpDownWage.Value);
private Post CreatePost(int id) => Post.CreateEntity(id, (TypePost)comboBoxName.SelectedItem!,
textBoxLevelPost.Text, (int)numericUpDownWage.Value);
}
}

View File

@ -108,6 +108,7 @@
Controls.Add(dataGridViewData);
Controls.Add(panel1);
Name = "FormPosts";
StartPosition = FormStartPosition.CenterParent;
Text = "Должности";
Load += FormPosts_Load;
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();

View File

@ -1,13 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -123,6 +123,7 @@
Controls.Add(textBoxName);
Controls.Add(labelName);
Name = "FormProduct";
StartPosition = FormStartPosition.CenterParent;
Text = "Проект";
ResumeLayout(false);
PerformLayout();

View File

@ -1,16 +1,6 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Entities.Enums;
using Accounting_Time_It_Company.Repositories;
using Microsoft.VisualBasic.FileIO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{

View File

@ -108,6 +108,7 @@
Controls.Add(dataGridViewData);
Controls.Add(panel1);
Name = "FormProducts";
StartPosition = FormStartPosition.CenterParent;
Text = "Проекты";
Load += FormProducts_Load;
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();

View File

@ -1,13 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -238,6 +238,7 @@
Controls.Add(textBoxDescriptoin);
Controls.Add(labelProduct);
Name = "FormTypeJob";
StartPosition = FormStartPosition.CenterParent;
Text = "Тип работы";
((System.ComponentModel.ISupportInitialize)numericUpDownAllowanceForJob).EndInit();
groupBoxDevelops.ResumeLayout(false);

View File

@ -1,15 +1,7 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Entities.Enums;
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{
@ -17,7 +9,8 @@ namespace Accounting_Time_It_Company.Forms
{
private readonly ITypeJobRepositories _typeJobRepositories;
public FormTypeJob(ITypeJobRepositories typeJobRepositories, IProductRepositories productRepositories, IEmployeeRepositories employeeRepositories)
public FormTypeJob(ITypeJobRepositories typeJobRepositories, IProductRepositories productRepositories,
IEmployeeRepositories employeeRepositories)
{
InitializeComponent();
_typeJobRepositories = typeJobRepositories ?? throw new ArgumentNullException(nameof(typeJobRepositories));

View File

@ -95,6 +95,7 @@
Controls.Add(panel1);
Controls.Add(dataGridViewData);
Name = "FormTypeJobs";
StartPosition = FormStartPosition.CenterParent;
Text = "Тип работ";
Load += FormTypeJobs_Load;
panel1.ResumeLayout(false);

View File

@ -1,13 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -122,6 +122,7 @@
Controls.Add(comboBoxEmployee);
Controls.Add(labelEmployee);
Name = "FormVacation";
StartPosition = FormStartPosition.CenterParent;
Text = "Отпуск";
ResumeLayout(false);
PerformLayout();

View File

@ -1,14 +1,5 @@
using Accounting_Time_It_Company.Entities;
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Accounting_Time_It_Company.Forms
{
@ -35,7 +26,8 @@ namespace Accounting_Time_It_Company.Forms
throw new Exception("Имеются незаполненные поля");
}
_vacationRepositories.CreateVacation(Vacation.CreateOpeartion(0, (int)comboBoxEmployee.SelectedIndex!, dateTimePickerStartDate.Value, dateTimePickerEndDate.Value));
_vacationRepositories.CreateVacation(Vacation.CreateOpeartion(0, (int)comboBoxEmployee.SelectedIndex!,
dateTimePickerStartDate.Value, dateTimePickerEndDate.Value));
Close();
}

View File

@ -82,6 +82,7 @@
Controls.Add(panel1);
Controls.Add(dataGridViewData);
Name = "FormVacations";
StartPosition = FormStartPosition.CenterParent;
Text = "Отпуска";
Load += FormVacations_Load;
panel1.ResumeLayout(false);

View File

@ -1,13 +1,4 @@
using Accounting_Time_It_Company.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Unity;
namespace Accounting_Time_It_Company.Forms

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;
@ -11,12 +6,10 @@ internal class ClientRepositories : IClientRepositories
{
public void CreateClient(Client client)
{
}
public void DeleteClient(int id)
{
}
public Client ReadClientById(int id)
@ -31,6 +24,5 @@ internal class ClientRepositories : IClientRepositories
public void UpdateClient(Client client)
{
throw new NotImplementedException();
}
}

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;

View File

@ -1,9 +1,4 @@
using Accounting_Time_It_Company.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Accounting_Time_It_Company.Repositories.Implementations;
@ -13,7 +8,8 @@ public class VacationRepositories : IVacationRepositories
{
}
public IEnumerable<Vacation> ReadVacations(DateTime? startDateFrom = null, DateTime? startDateTo = null, DateTime? endDateFrom = null, DateTime? endtDateTo = null, int? employeeId = null)
public IEnumerable<Vacation> ReadVacations(DateTime? startDateFrom = null, DateTime? startDateTo = null,
DateTime? endDateFrom = null, DateTime? endtDateTo = null, int? employeeId = null)
{
return [];
}