Example #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            MyPhotos.Property property = new MyPhotos.Property();

            property.Value  = txtValue.Text;
            property.FileId = setFileId;

            if (txtKey.Enabled == true)
            {
                property.Key = txtKey.Text;
            }
            else
            {
                property.Key = keyDropdown.Text;
            }

            if (setProperty != null)
            {
                property.Id = setProperty.Id;
                filePropertyClient.UpdateProperty(property);
            }
            else
            {
                filePropertyClient.AddProperty(property);
            }

            Close();
        }
Example #2
0
        /// <summary>
        /// Daca descrierea propietatii nu este goala, propietatea cu acea descriere
        /// va fi adaugata in baza de date. De asemenea, lista de propietati va fi updatata.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void propertyDescButton_Click(object sender, EventArgs e)
        {
            string propertyDescription = textBox1.Text;

            if (propertyDescription == null || propertyDescription.Length == 0)
            {
                return;
            }
            FilePropertyClient.AddProperty(propertyDescription);
            textBox1.Text = "";
            UpdatePropertyList();
        }