Beispiel #1
0
        private void ShowSampleAndTestExistingComments(ICommentHelper commentHelper)
        {
            IsExistingSampleAndTestCommentsVisible = false;
            switch (commentHelper.SelectedCommentType)
            {
            case CommentType.Patient:
                LoadExistingTestOrSamlpleOrPatientComments?.Invoke(this, CommentType.Patient);
                break;

            case CommentType.Sample:
                LoadExistingTestOrSamlpleOrPatientComments?.Invoke(this, CommentType.Sample);
                break;

            case CommentType.Result:
                IsExistingSampleAndTestCommentsVisible = true;
                LoadExistingTestOrSamlpleOrPatientComments?.Invoke(this, CommentType.Result);
                break;

            case CommentType.SampleRejection:
                LoadExistingTestOrSamlpleOrPatientComments?.Invoke(this, CommentType.SampleRejection);
                break;

            case CommentType.TestRejection:
                LoadExistingTestOrSamlpleOrPatientComments?.Invoke(this, CommentType.TestRejection);
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        private void GenerateViewTitle(ICommentHelper commentHelper)
        {
            ViewTitle = "";
            switch (commentHelper.SelectedCommentType)
            {
            case CommentType.Patient:
                ViewTitle       = "Select Patient Comment";
                UserInstruction = "Please select the patient comment";
                break;

            case CommentType.Sample:
                ViewTitle       = "Select Sample Comment";
                UserInstruction = "Please select the sample comment";
                break;

            case CommentType.Result:
                ViewTitle       = "Select Test / Result Comment";
                UserInstruction = "Please select the test / result comment";
                break;

            case CommentType.SampleRejection:
                ViewTitle       = "Select Sample Rejection Reason";
                UserInstruction = "Please select a reason for sample rejection";
                break;

            case CommentType.TestRejection:
                ViewTitle       = "Select Test Rejection Reason";
                UserInstruction = "Please select a reason for test rejection";
                break;

            default:
                ViewTitle = "Select Reason";
                break;
            }
        }
Beispiel #3
0
 public void InitializeFetchReasonsAndComments(ICommentHelper commentHelper, int selectedResultId = -1)
 {
     _selectedResultId = selectedResultId;
     GenerateViewTitle(commentHelper);
     ShowSampleAndTestExistingComments(commentHelper);
     FetchReasons?.Invoke(this, (int)commentHelper.SelectedCommentType);
 }
Beispiel #4
0
        public GenericCommentView(IGenericCommentViewModel viewModel, ICommentHelper commentTypeHelper, int resultId = -1)
        {
            InitializeComponent();
            _viewModel         = viewModel;
            _commentTypeHelper = commentTypeHelper;
            InitializeBinding();

            simpleButtonOk.Click += SimpleButtonOk_Click;
            listBoxControlRejectionReasons.Paint += VerifyDisplayedItemsCount;
            _viewModel.InitializeFetchReasonsAndComments(_commentTypeHelper, resultId);

            ManageCommentsPageVisibility();
        }
Beispiel #5
0
 public Repository(DataContext ctx, ISeedHelper seedHelper, ICommentHelper <T> commentHelper)
 {
     context            = ctx;
     this.commentHelper = commentHelper;
     seedHelper.EnsurePopulated(ctx);
 }
Beispiel #6
0
 public ProductRepository(DataContext ctx, ISeedHelper seedHelper, ICommentHelper <Product> commentHelper) : base(ctx, seedHelper, commentHelper)
 {
 }
Beispiel #7
0
 public ArticleRepository(DataContext ctx, ISeedHelper seedHelper, ICommentHelper <Article> commentHelper)
     : base(ctx, seedHelper, commentHelper)
 {
 }
Beispiel #8
0
 public SupplierRepository(DataContext ctx, ISeedHelper seedHelper, ICommentHelper <Supplier> commentHelper) : base(ctx, seedHelper, commentHelper)
 {
 }
Beispiel #9
0
 public EFProductRepository(DataContext ctx, ISeedHelper seedHelper, ICommentHelper <Product> commentHelper)
     : base(ctx, seedHelper, commentHelper)
 {
     cats = context.Categories;
 }
 public void Cenario()
 {
     _commentHelper = new CommentHelper();
 }