private void addExclsion_Click(object sender, EventArgs e) { if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { Arquivador.DataClass.Structure.ExclusionStructure myExclusionStructure = new Arquivador.DataClass.Structure.ExclusionStructure(); myExclusionStructure.Path = folderBrowserDialog1.SelectedPath; Arquivador.BusinessClasses.Exclusion myExclusionBussinesClass = new Arquivador.BusinessClasses.Exclusion(); myExclusionBussinesClass.Insert(myExclusionStructure); LoadExclusions(); } }
private void delExclusion_Click(object sender, EventArgs e) { Arquivador.DataClass.Structure.ExclusionStructure myExclusionStructure = new Arquivador.DataClass.Structure.ExclusionStructure(); myExclusionStructure.Id = Convert.ToInt32(lstBoxExclusions.SelectedValue); Arquivador.BusinessClasses.Exclusion myExclusionBussinesClass = new Arquivador.BusinessClasses.Exclusion(); //myExclusionBussinesClass.Load(myExclusionStructure); myExclusionBussinesClass.Delete(myExclusionStructure); LoadExclusions(); }
private void LoadExclusions() { Arquivador.BusinessClasses.Exclusion myExclusions = new Arquivador.BusinessClasses.Exclusion(); lstBoxExclusions.DataSource = myExclusions.GetPaths().Tables[0]; lstBoxExclusions.DisplayMember = new Arquivador.DataClass.Structure.ExclusionStructure().Schema.Path; lstBoxExclusions.ValueMember = new Arquivador.DataClass.Structure.ExclusionStructure().Schema.Id; }