public void CreateDeptBusiUnit() { var deptId = Guid.NewGuid(); var busiId = Guid.NewGuid(); var unitId = Guid.NewGuid(); var unit = new LocationUnit() { UnitId = unitId, UnitName = "TEST Unit 2", BusinessLocationId = busiId }; var business = new LocationBusiness() { BusinessLocationId = busiId, BusinessName = "Test Business 2", DepartmentId = deptId, Unit = new List <LocationUnit>() { unit } }; var department = new LocationDepartment() { DepartmentId = deptId, DepatmentName = "Test Department 2", Business = new List <LocationBusiness>() { business } }; dFactory.Create(department); }
public void UpdateDepartment() { var department = new LocationDepartment() { DepartmentId = Guid.Parse("D73554EA-A8A6-4779-8C91-051024F488F2"), DepatmentName = "Test update Department" }; dFactory.Update(department); }
public void CreateDepartment() { var department = new LocationDepartment() { DepartmentId = Guid.NewGuid(), DepatmentName = "Test Department" }; dFactory.Create(department); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 5, Configuration.FieldSeparator), Id, PrimaryKeyValueLcc?.ToDelimitedString(), LocationDepartment?.ToDelimitedString(), AccommodationType != null ? string.Join(Configuration.FieldRepeatSeparator, AccommodationType.Select(x => x.ToDelimitedString())) : null, ChargeCode != null ? string.Join(Configuration.FieldRepeatSeparator, ChargeCode.Select(x => x.ToDelimitedString())) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
public void UpdateLocationDepartment() { try { ILocationDepartment locationDepartment = new LocationDepartment(); locationDepartment.DepartmentId = Guid.Parse("9EBA6D35-66D7-4905-8D2D-34F772D03733"); locationDepartment.DepatmentName = "Light2"; ltr.Update((LocationDepartment)locationDepartment); } catch (Exception ex) { throw ex; } }
public void AddLocationDepartment() { try { ILocationDepartment locationDepartment = new LocationDepartment(); locationDepartment.DepartmentId = Guid.NewGuid(); locationDepartment.DepatmentName = "Cracking4"; ltr.Create((LocationDepartment)locationDepartment); } catch (Exception ex) { throw ex; } }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 13, Configuration.FieldSeparator), Id, PrimaryKeyValueLdp?.ToDelimitedString(), LocationDepartment?.ToDelimitedString(), LocationService != null ? string.Join(Configuration.FieldRepeatSeparator, LocationService.Select(x => x.ToDelimitedString())) : null, SpecialtyType != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialtyType.Select(x => x.ToDelimitedString())) : null, ValidPatientClasses != null ? string.Join(Configuration.FieldRepeatSeparator, ValidPatientClasses.Select(x => x.ToDelimitedString())) : null, ActiveInactiveFlag, ActivationDateLdp.HasValue ? ActivationDateLdp.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, InactivationDateLdp.HasValue ? InactivationDateLdp.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, InactivatedReason, VisitingHours != null ? string.Join(Configuration.FieldRepeatSeparator, VisitingHours.Select(x => x.ToDelimitedString())) : null, ContactPhone?.ToDelimitedString(), LocationCostCenter?.ToDelimitedString() ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
// PUT: api/LocationDepartment/5 public HttpResponseMessage Put(LocationDepartment locationDepartment) { try { response.StatusCode = HttpStatusCode.Created; response.Content = new StringContent(locationDepartmentFactory.Update(locationDepartment).ToString()); response.Headers.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.FromMinutes(20) }; } catch (Exception ex) { response.StatusCode = HttpStatusCode.BadRequest; response.Content = new StringContent(ex.Message); response.Headers.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.FromMinutes(20) }; } return(response); }