public ChangeCleanedActionModal(Model.CleanedMaterial cleanedMaterialToUpdate, CleaningType cleaningTypeToUpdate, Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _userLoggedIn = userLoggedIn;
            _cleanedMaterialToUpdate = cleanedMaterialToUpdate;
            txtDate.ToolTip = txtDate.Text = DateTime.Now.ToString("dd/MMMM/yyyy");

            _cleaningTypeToUpdate = cleaningTypeToUpdate;

            switch (_cleaningTypeToUpdate)
            {
                case CleaningType.CLEANED:
                    this.Title += "Lavado";
                    break;
                case CleaningType.PACKAGED:
                    this.Title += "Empaquetado";
                    break;
                case CleaningType.STERILIZED:
                    this.Title += "Esterilizado";
                    txtGroup.ToolTip = txtGroup.Text = GetNextGroupLetter();
                    break;
                default:
                    break;
            }
		}
        public CleanedMaterialsDetailsModal(Model.CleanedMaterial cleanedMaterialToView)
		{
			this.InitializeComponent();

            _cleanedMaterialToView = cleanedMaterialToView;

            FillWindowInfo();
		}
        public AddEditCleanedMaterialsModal(Model.CleanedMaterial cleanedMaterialToUpdate)
		{
			this.InitializeComponent();

            _cleanedMaterialToUpdate = cleanedMaterialToUpdate;

            _isUpdateCleanedMaterial = cleanedMaterialToUpdate != null;
            txtDate.ToolTip = txtDate.Text = DateTime.Now.ToString("dd/MMMM/yyyy");

            if (_isUpdateCleanedMaterial)
            {
                PrepareWindowForUpdates();
            }
		}
		private void btnAddCleanedMaterial_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            if (_isUpdateCleanedMaterial)
            {
                _cleanedMaterialToUpdate.Observations = txtCleanedMaterialObservations.Text;

                UpdateCleanedMaterial(_cleanedMaterialToUpdate);
            }
            else
            {
                Model.CleanedMaterial cleanedMaterialToAdd = new Model.CleanedMaterial()
                {
                    CreatedDate = DateTime.Now,
                    GroupLetter = "",
                    Cleaned = null,
                    Packaged = null,
                    Sterilized = null,
                    Observations = txtCleanedMaterialObservations.Text,
                    IsDeleted = false
                };

                AddCleanedMaterial(cleanedMaterialToAdd);
            }
		}