public Contract(string id, string fK_ClientId, DateTime startDate, DateTime endDate, char contractTypeId, ContractType contractType) { Id = id; OldKey = id; FK_ClientId = fK_ClientId; StartDate = startDate; EndDate = endDate; FK_ContractTypeId = contractTypeId; ContractType = contractType; }
public Contract(DataRow dataRow) { Id = dataRow["PK_ContractID"].ToString(); OldKey = Id; FK_ClientId = dataRow["FK_ClientID"].ToString(); StartDate = (DateTime)dataRow["StartDate"]; EndDate = (DateTime)dataRow["EndDate"]; FK_ContractTypeId = Convert.ToChar(dataRow["FK_ContractTypeID"].ToString().Substring(0, 1)); contractType = new ContractType(dataRow); ServiceLevel = new ServiceLevel(dataRow); FK_ServiceLevelId = Convert.ToChar(dataRow["FK_ServiceLevelID"].ToString().Substring(0, 1)); }
public override string ToString() { return((Year.ToString() + ContractType.ToString().ToUpper() + ClientImportance.ToString().ToUpper() + Last6Digits.ToString().PadLeft(6, '0')).Trim()); }