Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions sources/HumanResourcesLibrary/DataClasses/Vacancy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ public class Vacancy : UniqueItem, IDeepCopy<Vacancy>
{
public string Title { get; set; }

public string Project { get; set; }

public string City { get; set; }

public string ResponsiblePerson { get; set; }

public DateTime DateStart { get; set; }

public DateTime DateFinish { get; set; }

public TypeEmployment TypeEmployment { get; set; }

public LevelEnglish LevelEnglish { get; set; }

public Status Status { get; set; }

public string Skills { get; set; }

public string Description { get; set; }

public Dictionary<DateTime, string> ListComment { get; set; }

public Vacancy CreateDeepCopy()
{
Vacancy copy = new Vacancy();
Expand All @@ -26,6 +48,7 @@ public Vacancy CreateDeepCopy()
copy.Description = this.Description;
return copy;
}

public Vacancy()
{
/*ProjectId = 0;
Expand All @@ -40,6 +63,7 @@ public Vacancy()
Description = System.String.Empty;
ListComment = new Dictionary<DateTime, string>();*/
}

public Vacancy(string name, Project project, City city, Status status, ResponsiblePerson responsiblePerson, DateTime dateStart, DateTime dateFinish,
TypeEmployment typeEmployment, LevelEnglish levelEnglish, string skills, string description)
{
Expand All @@ -57,29 +81,5 @@ public Vacancy(string name, Project project, City city, Status status, Responsib
//ListComment = listComment;
//VacancyId = vacancyId;
}

// public int VacancyId { get; set; }

public string Project { get; set; }

public string City { get; set; }

public string ResponsiblePerson { get; set; }

public DateTime DateStart { get; set; }

public DateTime DateFinish { get; set; }

public TypeEmployment TypeEmployment { get; set; }

public LevelEnglish LevelEnglish { get; set; }

public Status Status { get; set; }

public string Skills { get; set; }

public string Description { get; set; }

public Dictionary<DateTime, string> ListComment { get; set; }
}
}
19 changes: 14 additions & 5 deletions sources/VacanciesBrowser/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
Expand All @@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
Expand All @@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
Expand All @@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
Expand All @@ -109,9 +112,15 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="License" xml:space="preserve">
<value>Лицензионное соглашение устанавливает условия использования программы для ЭВМ «Vacancy» и заключено между любым лицом, использующим Программу («Пользователь»), и Group_1, являющейся правообладателем исключительного права на Программу («Правообладатель»).\n1.1. Пользователь не имеет права воспроизводить и распространять Программу в коммерческих целях (в том числе за плату), в том числе в составе сборников программных продуктов, без письменного согласия Правообладателя.\n1.2. Программа должна использоваться под наименованием: «Vacancy».\n1.3. Программа предоставляется на условиях «как есть» (as is). Правообладатель не предоставляет никаких гарантий в отношении безошибочной и бесперебойной работы Программы.</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version №001</value>
</data>
</root>
6 changes: 6 additions & 0 deletions sources/VacanciesBrowser/Properties/licenses.licx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v14.2, Version=14.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
5 changes: 2 additions & 3 deletions sources/VacanciesBrowser/VacanciesBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<DependentUpon>VacancyAddOrEdit.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="VacancyMainForm.resx">
<DependentUpon>VacancyMainForm.cs</DependentUpon>
</EmbeddedResource>
Expand All @@ -80,6 +81,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -100,9 +102,6 @@
<Name>HumanResourcesLibrary</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
15 changes: 14 additions & 1 deletion sources/VacanciesBrowser/VacancyAddOrEdit.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 34 additions & 24 deletions sources/VacanciesBrowser/VacancyAddOrEdit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public partial class VacancyAddOrEdit : Form
public VacancyAddOrEdit()
{
InitializeComponent();
this.vacancy = new Vacancy();
}
public VacancyAddOrEdit(Vacancy vacancy)
{
Expand All @@ -39,33 +40,28 @@ private void Cancel_Click(object sender, EventArgs e)
}
this.Close();
}

private void Save_Click(object sender, EventArgs e)
{
List<Vacancy> list = new List<Vacancy>();
repo = RepositoryService.Repository;
list = repo.GetAllVacancies();
Vacancy vacancy = new Vacancy();
vacancy.Title = NameVacancy.Text;
vacancy.Project = ListProject.Text;
vacancy.City = ListCity.Text;
vacancy.LevelEnglish = (LevelEnglish)Enum.Parse(typeof(LevelEnglish), ListLevelEnglish.Text.ToString());
vacancy.Status = (Status)Enum.Parse(typeof(Status), ListStatus.Text.ToString());
vacancy.Skills = ListSkills.Text;
vacancy.Description = DescriptionVacancy.Text;
vacancy.ResponsiblePerson = ListResponsiblePerson.Text;
vacancy.TypeEmployment = (TypeEmployment)Enum.Parse(typeof(TypeEmployment), ListTypeEmployment.Text.ToString());
vacancy.DateStart = (DateTime)StartDate.EditValue;
vacancy.DateFinish = (DateTime)FinishDate.EditValue;
/*if (isNew)
{
vacancy.Id = Guid.NewGuid();
}
*/
repo = RepositoryService.Repository;
repo.SaveVacancy(vacancy);
MessageBox.Show("Вакансия сохранена");
this.Close();
repo = RepositoryService.Repository;
if (isNew)
{
vacancy = new Vacancy();
vacancy.Title = NameVacancy.Text;
vacancy.Project = ListProject.Text;
vacancy.City = ListCity.Text;
vacancy.LevelEnglish = (LevelEnglish)Enum.Parse(typeof(LevelEnglish), ListLevelEnglish.Text.ToString());
vacancy.Status = (Status)Enum.Parse(typeof(Status), ListStatus.Text.ToString());
vacancy.Skills = ListSkills.Text;
vacancy.Description = DescriptionVacancy.Text;
vacancy.ResponsiblePerson = ListResponsiblePerson.Text;
vacancy.TypeEmployment = (TypeEmployment)Enum.Parse(typeof(TypeEmployment), ListTypeEmployment.Text.ToString());
vacancy.DateStart = (DateTime)StartDate.EditValue;
vacancy.DateFinish = (DateTime)FinishDate.EditValue;
}
repo.SaveVacancy(vacancy);
MessageBox.Show("Вакансия сохранена");
this.Close();
}

private void VacancyAddOrEdit_Load(object sender, EventArgs e)
Expand Down Expand Up @@ -126,5 +122,19 @@ private void VacancyAddOrEdit_Load(object sender, EventArgs e)
StartDate.EditValue = vacancy.DateStart;
FinishDate.EditValue = vacancy.DateFinish;
}

private void VacancyAddOrEdit_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Escape: //Закрыть форму
DialogResult dialogResult = MessageBox.Show("Вы действительно хотите выйти?", "Выход из программы", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
this.Close();
}
break;
}
}
}
}
5 changes: 3 additions & 2 deletions sources/VacanciesBrowser/VacancyMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Windows.Forms;
using HumanResourcesLibrary.DataClasses;
using HumanResourcesLibrary;
using VacanciesBrowser.Properties;

namespace VacanciesBrowser
{
Expand Down Expand Up @@ -55,12 +56,12 @@ private void barButtonItem_EditVacancy_ItemClick(object sender, DevExpress.XtraB

private void barButtonItem_Version_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
MessageBox.Show("Version №001", "Version");
MessageBox.Show(Resources.Version, "Version");
}

private void barButtonItem_Licence_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
MessageBox.Show("Лицензионное соглашение устанавливает условия использования программы для ЭВМ «Vacancy» и заключено между любым лицом, использующим Программу («Пользователь»), и Group_1, являющейся правообладателем исключительного права на Программу («Правообладатель»).\n1.1. Пользователь не имеет права воспроизводить и распространять Программу в коммерческих целях (в том числе за плату), в том числе в составе сборников программных продуктов, без письменного согласия Правообладателя.\n1.2. Программа должна использоваться под наименованием: «Vacancy».\n1.3. Программа предоставляется на условиях «как есть» (as is). Правообладатель не предоставляет никаких гарантий в отношении безошибочной и бесперебойной работы Программы.", "Лицензионное соглашение");
MessageBox.Show(Resources.License, "Лицензионное соглашение");
}

private void VacancyMainForm_Load(object sender, EventArgs e)
Expand Down