Esempio n. 1
0
        private void Search(string partNumber)
        {
            EplPartProperties = EplControlExtension.Search(partNumber);
            EplControlExtension.CloseDb();

            BindingPartSource();
        }
Esempio n. 2
0
 private void Remove_Click(object sender, EventArgs e)
 {
     foreach (var item in PartViewer.SelectedRows)
     {
         EplPartProperties part = (item as DataGridViewRow).DataBoundItem as EplPartProperties;
         EplControlExtension.Remove(part.PartNumber);
         var p = EplPartProperties.Where(i => i.PartNumber == part.PartNumber).FirstOrDefault();
         EplPartProperties.Remove(p);
     }
     BindingPartSource();
     EplControlExtension.CloseDb();
 }
        private void btnSaveChanges_Click(object sender, EventArgs e)
        {
            Logger.WriteLine("Save free properties", JsonConvert.SerializeObject(EplPartProperties.PartFreeProperties));
            if (EplPartProperties.SaveChanges())
            {
                MessageBox.Show("Save changes successed");
            }
            else
            {
                MessageBox.Show("Save changes failed");
            }

            EplControlExtension.CloseDb();
        }
Esempio n. 4
0
        private void SaveChanges_Click(object sender, EventArgs e)
        {
            var selectedItem = PartsDataSource.Current as EplPartProperties;

            if (selectedItem == null)
            {
                return;
            }

            txtConfigPath.Focus();

            MessageBox.Show($"{(selectedItem.SaveChanges() ? "Save changes successed" : "Save changes error")}");

            EplControlExtension.CloseDb();
        }