Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            locationsBLL l  = new locationsBLL();
            locationDAL  ld = new locationDAL();



            c = dc.Search(companydeact);
            emailsBLL email = new emailsBLL();

            txtemail.Text   = c.c_email;
            txtcompany.Text = c.c_name;
            l = ld.search("template");
            lbltemplate.Text = l.location;
            filePath         = lbltemplate.Text;
            l             = ld.search("save deactivation");
            lblsave.Text  = l.location;
            filepathemail = lblsave.Text;
            savepath      = lblsave.Text;
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string serial = txtserial.Text;
            string cid    = txtcomputer_id.Text;

            locationsBLL   l    = new locationsBLL();
            locationDAL    l1   = new locationDAL();
            OpenFileDialog file = new OpenFileDialog();                    //open dialog to choose file

            if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK) //if there is a file choosen by the user
            {
                l.location = file.FileName;                                //get the path of the file
                l.type     = "template";
                if (l1.Insert(l))
                {
                    MessageBox.Show("file location saved");
                }
                else
                {
                    MessageBox.Show("file can not be added");
                }
            }
        }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog path = new FolderBrowserDialog(); //open dialog to choose file

            path.ShowNewFolderButton = true;
            if (path.ShowDialog() == System.Windows.Forms.DialogResult.OK) //if there is a file choosen by the user
            {
                locationsBLL   l    = new locationsBLL();
                locationDAL    l1   = new locationDAL();
                OpenFileDialog file = new OpenFileDialog(); //open dialog to choose file

                l.location = path.SelectedPath;             //get the path of the file
                l.type     = "save deactivation";
                if (l1.Insert(l))
                {
                    MessageBox.Show("file location saved");
                }
                else
                {
                    MessageBox.Show("file can not be added");
                }
            }
        }