You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.0 KiB

using System.ComponentModel;
namespace eCompanies
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum Status
{
[Description("Еще не заключен")]
NotReachedYet,
[Description("Заключен")]
Reached,
[Description("Расторгнут")]
Terminated
}
public class Contract
{
private Company c;
public Contract (Company c)
{
this.c = c;
}
public string ContractStatusString
{
get
{
switch (c.CompanyId)
{
case 1: return "Заключен";
case 2: return "Расторгнут";
default: return "Еще не заключен";
}
}
set
{
}
}
public Status ContractStatusId
{
get { return (Status)c.ContractStatus; }
set { c.ContractStatus = (int)value; }
}
}
}