private void btnModificar_Click(object sender, EventArgs e)
        {
            frmFileUploadEdit frm = new frmFileUploadEdit();

            frm.Action = ActionForm.Edit;

            frm.FileEntity = new FileInfoDto
            {
                FileName         = _fileName,
                Description      = _fileDescription,
                ThumbnailFile    = _byteArrayFile,
                MultimediaFileId = _multimediaFileId,
                //Dni = Dni,
                //Fecha = Fecha.Replace("/",""),
                //Consultorio = Consultorio,
                ServiceComponentMultimediaId = _serviceComponentMultimediaId
            };
            frm.Dni         = Dni;
            frm.Fecha       = Fecha.Replace("/", "");
            frm.Consultorio = Consultorio;
            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            LoadDataGridView();
        }
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            frmFileUploadEdit frm = new frmFileUploadEdit();

            frm.PersonId           = PersonId;
            frm.ServiceComponentId = ServiceComponentId;
            frm.Dni         = Dni;
            frm.Fecha       = Fecha.Replace("/", "");
            frm.Consultorio = Consultorio;
            frm.Action      = ActionForm.Add;

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            LoadDataGridView();


            //if (frm.FileName != null)
            //{
            //    if (CheckFileExistsInList(frm.FileName))
            //        return;
            //}

            //if (frm.FileEntity != null)
            //{
            //    var searchResult = _files.Find(p => p.FileName == frm.FileEntity.FileName);

            //    if (searchResult != null)   // se encontro una coincidencia
            //    {
            //        if (searchResult.Action == (int)ActionForm.Delete)
            //        {
            //            searchResult.Description = frm.FileEntity.Description;
            //            searchResult.ByteArrayFile = frm.FileEntity.ByteArrayFile;
            //            searchResult.Action = frm.FileEntity.Action;
            //        }
            //        else
            //        {
            //            MessageBox.Show("El archivo [" + searchResult.FileName + "] ya está agregado. corrija por favor.", "FileUpload::", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            //            return;
            //        }

            //    }
            //    else  // ok se agrega con normalidad
            //    {
            //        _files.Add(frm.FileEntity);
            //    }

            //    // Cargar grilla
            //    LoadDataGridView();
            _isLoadingData = true;
            //    ButtonsEnabled();
            //}
        }