private async void finishAlbum_Click(object sender, EventArgs e)
        {
            if (this.ValidateChildren())
            {
                if (picboxAlbum.Image == null)
                {
                    errorProvider.SetError(picboxAlbum, "Image is required");
                    return;
                }
                else
                {
                    errorProvider.SetError(picboxAlbum, null);
                }


                byte[] ImageData = ImageHelperMethods.PrepareImgForDB(picboxAlbum.Image);

                AlbumInsertRequest obj = new AlbumInsertRequest()
                {
                    Name = txtTitle.Text, GenreId = (int)cmbGenre.SelectedValue, YearRelease = (int)cmbYear.SelectedValue, Image = ImageData, PerformerId = (int)cmbPerformer.SelectedValue, Description = txtAbout.Text
                };
                await _albumService.Insert <AlbumInsertRequest>(obj, "InsertAlbum");

                this.Close();
            }
        }
        private async void btnUpdate_Click(object sender, EventArgs e)
        {
            byte[]             imgByte = ImageHelperMethods.PrepareImgForDB(picboxAlbum.Image);
            AlbumInsertRequest obj     = new AlbumInsertRequest
            {
                Name        = txtTitle.Text,
                YearRelease = Convert.ToInt32(cmbYear.SelectedValue),
                GenreId     = Convert.ToInt32(cmbGenre.SelectedValue),
                PerformerId = Convert.ToInt32(cmbPerformer.SelectedValue),
                Image       = imgByte
            };
            await _albumService.Update <AlbumInsertRequest>(_albumId, obj);

            this.Close();
        }
        private async void btnSaveUser_Click(object sender, EventArgs e)
        {
            if (this.ValidateChildren())
            {
                if (picboxUser.Image == null)
                {
                    errorProvider.SetError(picboxUser, "Image is required!");
                    return;
                }
                else
                {
                    errorProvider.SetError(picboxUser, null);
                }


                //prepare image for database
                byte[] ImageData = ImageHelperMethods.PrepareImgForDB(picboxUser.Image);

                UserInsertRequest obj = new UserInsertRequest()
                {
                    Name                 = txtboxName.Text,
                    Surname              = txtboxSurname.Text,
                    Username             = txtboxUsername.Text,
                    Email                = txtboxEmail.Text,
                    PhoneNumber          = txtBoxPhone.Text,
                    UserTypeId           = Convert.ToInt32(cmbUserType.SelectedValue),
                    CityId               = Convert.ToInt32(cmbCity.SelectedValue),
                    Password             = txtboxPassword.Text,
                    PasswordConfirmation = txtboxConfirmPassword.Text,
                    Image                = ImageData,
                    Status               = true //active by default
                };

                await _userService.Insert <UserInsertRequest>(obj, "InsertUser");

                this.Close();
            }
        }
        private async void btnAddPerformer_Click(object sender, EventArgs e)
        {
            if (this.ValidateChildren())
            {
                if (picBoxPerformer.Image == null)
                {
                    errorProvider.SetError(picBoxPerformer, "Image is required");
                    return;
                }
                else
                {
                    errorProvider.SetError(picBoxPerformer, null);
                }

                byte[]    img = ImageHelperMethods.PrepareImgForDB(picBoxPerformer.Image);
                Performer obj = new Performer()
                {
                    Name = txtName.Text, Surname = txtSurname.Text, ArtisticName = txtArtisticName.Text, Image = img, About = txtAbout.Text
                };
                await _performerService.Insert <Performer>(obj, "AddPerformer");

                this.Close();
            }
        }