public NewSpecimenEditPresenter(INewSpecimenEditView newSpecimenEditView, DtoSpecimen editSpecimen) { this.newSpecimenEditView = newSpecimenEditView; newSpecimenEditModel = new NewSpecimenModel(); newSpecimenEditView.NewSpecimenDefaultTubes = newSpecimenEditModel.LoadDefaultTubes(); this.editSpecimen = editSpecimen; newSpecimenEditView.NewSpecimenEditLoad += LoadNewSpecimenEditProp; newSpecimenEditView.EditOkClick += EditSpecimen; }
public BindingList<DtoSpecimen> SearchSpecimens(string code, string name) { var dtoSpecimen = new DtoSpecimen() { Code = code, Name = name }; return new BindingList<DtoSpecimen>(new SpecimenServiceClient().FindSpecimens(dtoSpecimen)); }
public NewSpecimenEditPresenter(INewSpecimenEditView newSpecimenEditView, DtoSpecimen editSpecimen) { this.newSpecimenEditView = newSpecimenEditView; newSpecimenEditModel = new NewSpecimenModel(); newSpecimenEditView.NewSpecimenDefaultTubes = newSpecimenEditModel.LoadDefaultTubes(); this.editSpecimen = editSpecimen; newSpecimenEditView.NewSpecimenEditLoad += LoadNewSpecimenEditProp; newSpecimenEditView.EditOkClick += EditSpecimen; }
public BindingList <DtoSpecimen> SearchSpecimens(string code, string name) { var dtoSpecimen = new DtoSpecimen() { Code = code, Name = name }; return(new BindingList <DtoSpecimen>(new SpecimenServiceClient().FindSpecimens(dtoSpecimen))); }
public string EditSpecimen(string code, string name, string defaultTubeCode, bool isEdit) { if (Validation.Instance.ValidateCode(code)) { var dtoSpecimen = new DtoSpecimen() { Code = code, Name = name, DefaultTube = new SpecimenService.DtoTube() { Code = defaultTubeCode }, IsEdit = isEdit }; return(new SpecimenServiceClient().EditSpecimen(dtoSpecimen)); } else { return("Code field is empty!"); } }