Beispiel #1
0
        private void addOrigin_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                Arquivador.DataClass.Structure.OriginStructure myOriginStruct = new Arquivador.DataClass.Structure.OriginStructure();
                myOriginStruct.Path = folderBrowserDialog1.SelectedPath;

                Arquivador.BusinessClasses.Origin myOriginBussinessClass = new Arquivador.BusinessClasses.Origin();

                myOriginBussinessClass.Insert(myOriginStruct);

                LoadOrigins();
            }
        }
Beispiel #2
0
        private void LoadOrigins()
        {
            Arquivador.BusinessClasses.Origin myOrigins = new Arquivador.BusinessClasses.Origin();

            lstBoxSources.DataSource = myOrigins.GetPaths().Tables[0];
            lstBoxSources.DisplayMember = new Arquivador.DataClass.Structure.OriginStructure().Schema.Path;
            lstBoxSources.ValueMember = new Arquivador.DataClass.Structure.OriginStructure().Schema.Id;
        }
Beispiel #3
0
        private void delOrigin_Click(object sender, EventArgs e)
        {
            Arquivador.DataClass.Structure.OriginStructure myOriginStructure = new Arquivador.DataClass.Structure.OriginStructure();

            myOriginStructure.Id = Convert.ToInt32(lstBoxSources.SelectedValue);

            Arquivador.BusinessClasses.Origin myOriginBussinesClass = new Arquivador.BusinessClasses.Origin();
            //myOriginBussinesClass.Load(myOriginStructure);

            myOriginBussinesClass.Delete(myOriginStructure);

            LoadOrigins();
        }