예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                MailMessage mail       = new MailMessage();
                SmtpClient  SmtpServer = new SmtpClient("smtp.live.com");

                mail.From = new MailAddress("*****@*****.**");
                mail.To.Add("*****@*****.**");
                mail.Subject = "Bug Report";
                if (radioButton1.Checked == true)
                {
                    mail.Body = radioButton1.Text;
                }
                if (radioButton2.Checked == true)
                {
                    mail.Body = radioButton2.Text;
                }
                if (radioButton3.Checked == true)
                {
                    mail.Body = radioButton3.Text;
                }
                if (radioButton4.Checked == true)
                {
                    mail.Body = richTextBox1.Text;
                }

                SmtpServer.Port        = 587;
                SmtpServer.Credentials = new System.Net.NetworkCredential("*****@*****.**", "#include<oscar>");
                SmtpServer.EnableSsl   = true;

                SmtpServer.Send(mail);
            }
            catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("An Error Occured Please check Your Internet Connection"); this.Close(); }
        }
예제 #2
0
        private void bkk_Authenti_DoWork(object sender, DoWorkEventArgs e)
        {
            string uname = "";

            try
            {
                SqlCeConnection conn = new SqlCeConnection(Properties.Settings.Default.Misc_DBConnectionString);
                SqlCeCommand    cmd  = new SqlCeCommand("SELECT * FROM co_nfo", conn);
                conn.Open();
                SqlCeDataReader dr  = cmd.ExecuteReader();
                DataTable       dtp = new DataTable();
                dtp.Load(dr);
                uname = dtp.Rows[0].ItemArray[5].ToString();
                conn.Close();
                dtp.Clear(); dtp.Dispose();
            }
            catch (Exception erty) { bkk_Authenti.CancelAsync(); Am_err ner = new Am_err(); ner.tx("Authentication Processing Failed"); }
            try
            {
                SqlConnection conn = new SqlConnection(s2);
                SqlCommand    cmd  = new SqlCommand("SELECT * FROM perms WHERE [uname] = '" + uname + "' AND [ForApp] = '" + app_ + "'", conn);
                conn.Open();
                SqlDataReader dr  = cmd.ExecuteReader();
                DataTable     dtp = new DataTable();
                dtp.Load(dr);
                pwd = dtp.Rows[0].ItemArray[1].ToString();
                conn.Close(); dtp.Clear(); dtp.Dispose();
            }
            catch (Exception erty) { bkk_Authenti.CancelAsync(); }
        }
예제 #3
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         if (Main.Amatrix.acc == "")
         {
             SqlCeConnection conn = new SqlCeConnection(Properties.Settings.Default.Misc_DBConnectionString);
             SqlCeCommand    cmd  = new SqlCeCommand("DELETE FROM acc_linking WHERE [Key] = '" + dgv[0, 0].Value.ToString() + "'", conn);
             conn.Open();
             SqlCeDataReader dr = cmd.ExecuteReader();
             conn.Close();
             loaddb();
             ok();
         }
         else
         {
             DataTable dtpy = new DataTable();
             basql.Execute(Main.Amatrix.acc, "DELETE FROM acc_linking WHERE [Key] = '" + dgv[0, 0].Value.ToString() + "'", "acc_linking", dtpy);
             dtpy.Clear();
             dtpy.Dispose();
             loaddb();
             ok();
         }
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Amatrix was Unable to Replace Your Record"); }
 }
예제 #4
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            if (radioButton2.Checked == true)
            {
                try
                {
                    string docs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                    byte[] b    = (byte[])dataGridView1[4, dataGridView1.CurrentRow.Index].Value;
                    Directory.CreateDirectory(docs + "\\Amatrix Downloaded Files\\");
                    FileStream fs = new FileStream(docs + "\\Amatrix Downloaded Files\\" + dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString(), FileMode.Create, FileAccess.ReadWrite);
                    fs.Flush(); fs.Close();
                    File.WriteAllBytes(docs + "\\Amatrix Downloaded Files\\" + dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString(), b);

                    try
                    {
                        System.Diagnostics.Process.Start(docs + "\\Amatrix Downloaded Files\\" + dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString());
                    }
                    catch (Exception erty) { Am_err ner = new Am_err(); ner.tx(erty.Message); }
                }
                catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("The File Was Not Found on the Server"); }
            }
            else
            {
                try
                {
                    System.Diagnostics.Process.Start(dataGridView1[2, dataGridView1.CurrentRow.Index].Value.ToString());
                }
                catch (Exception erty) { Am_err ner = new Am_err(); ner.tx(erty.Message); }
            }
        }
예제 #5
0
        private void prev_Click(object sender, EventArgs e)
        {
            try
            {
                biggest  = (int)dgv.Rows[0].Cells[0].Value;
                smallest = biggest - 100;
            }
            catch (Exception erty) { biggest = biggest - 100; smallest = biggest - 100; }

            SqlCeDataReader dr2;

            dt2.Clear(); dt2.Columns.Clear();
            SqlCeConnection conny = new SqlCeConnection(connxt);
            SqlCeCommand    commy = conny.CreateCommand();

            try
            {
                conny.Open();
                commy.CommandText = "SELECT * FROM [" + choosebook.Text + "] WHERE [Serial Number] >= " + smallest.ToString() + " AND [Serial Number] <= " + biggest.ToString();
                dr2 = commy.ExecuteReader();
                dt2.Load(dr2, LoadOption.PreserveChanges);
                refresh_dgv();
                conny.Close();
                commy.Dispose();
            }
            catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("A Fatal Error Occured While Opening the Current Book."); }
            try
            {
                huntme.Text = dgv.Rows[0].Cells[0].Value.ToString() + "-" + dgv.Rows[dgv.RowCount - 2].Cells[0].Value.ToString();
            }
            catch (Exception erty) { huntme.Text = "N.A. -" + " N.A."; }
        }
예제 #6
0
 private void tms_Tick(object sender, EventArgs e)
 {
     try
     {
         if (Properties.Settings.Default.usable_month >= 10)
         {
             foreach (Form ff in Application.OpenForms)
             {
                 if (ff.Name != "Am_err" && ff.Name != "Amatrix")
                 {
                     ff.Close();
                 }
                 if (ff.Name == "Amatrix")
                 {
                     ff.Enabled = false;
                     ff.Visible = false;
                 }
             }
             Am_err ner = new Am_err();
             ner.tx("Amatrix Has Terminated Its Demo Services.");
             tms.Stop();
             ner.Disposed += new EventHandler(ner_Disposed);
         }
     }
     catch (Exception erty) { }
 }
예제 #7
0
        private void startup(string loc, string tabl)
        {
            dgv.Select();
            tblstr = choosebook.Text;
            if (loc != "Local")
            {
                connxt = "DataSource='" + loc + "'";
                if (checkBox1.Checked == true)
                {
                }
                else
                {
                    connxt = connxt + "; Password='******'";
                }
                SqlCeDataReader dr2;
                dt2.Clear();
                SqlCeConnection conny = new SqlCeConnection(connxt);
                SqlCeCommand    commy = conny.CreateCommand();

                try
                {
                    conny.Open();
                    commy.CommandText = "SELECT * FROM [" + tabl + "] WHERE [Serial Number] >= 1 AND [Serial Number] <= 100";
                    dr2 = commy.ExecuteReader();
                    dt2.Load(dr2);
                    dgv.DataSource = dt2;
                    conny.Close();
                    commy.Dispose();
                }
                catch (Exception erty) { }
                panel2.Visible = false;
            }
            else if (loc == "Local")
            {
                SqlCeDataReader dr2;
                dst2.Clear();
                connxt = Properties.Settings.Default.UCBConnectionString;
                SqlCeConnection conny = new SqlCeConnection(Properties.Settings.Default.UCBConnectionString);
                SqlCeCommand    commy = conny.CreateCommand();
                try
                {
                    conny.Open();
                    commy.CommandText = "SELECT * FROM [" + tabl + "] WHERE [Serial Number] >= 1 AND [Serial Number] <= 100";
                    dr2 = commy.ExecuteReader();
                    dt2.Load(dr2, LoadOption.PreserveChanges);
                    dgv.DataSource = dt2;
                    conny.Close();
                    commy.Dispose();
                }
                catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("A Fatal Error Occured While Opening the Current Book."); }
                panel2.Visible = false;
            }
            try
            {
                dgv.Columns[0].ReadOnly = true;
            }
            catch (Exception erty) { }
            numoff();
        }
예제 #8
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start(Application.StartupPath + "\\Attndce.exe");
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Could not Find 'Attndce.exe'"); }
 }
예제 #9
0
 private void ofd_FileOk(object sender, CancelEventArgs e)
 {
     try
     {
         pictureBox1.BackgroundImage = Image.FromFile(ofd.FileName);
     }
     catch (Exception ertyt) { Am_err ner = new Am_err(); ner.tx("Invalid Image."); }
 }
예제 #10
0
 private void pst_Click(object sender, EventArgs e)
 {
     try
     {
         dgv.Rows[dgv.CurrentCell.RowIndex].Cells[dgv.CurrentCell.ColumnIndex].Value = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[dgv.CurrentCell.ColumnIndex].Value.ToString() + copycutpaste[0].ToString();
     }
     catch (Exception erty) { Am_err mer = new Am_err(); mer.tx(erty.Message); }
 }
예제 #11
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start("www.astreous.tk");
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("An Error Occured While Opening your Browser."); }
 }
예제 #12
0
 private void openTaskManagmentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start(Application.StartupPath + "\\extr_mgmt.exe");
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Could not Open 'extr_mgmt.exe'."); }
 }
예제 #13
0
 private void shptlsclc(object sender, EventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start(Environment.CurrentDirectory + "\\Connect\\Amatrix Connect Business Client.exe");
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Unable to Start Amatrix Connect"); }
 }
예제 #14
0
        private void ok()
        {
            if (old == false)
            {
                try
                {
                    loaddb();
                    if (lnktpe == 0 && dgv.RowCount == 0)
                    {
                        if (Main.Amatrix.acc == "")
                        {
                            SqlCeConnection conn = new SqlCeConnection(Properties.Settings.Default.Misc_DBConnectionString);
                            SqlCeCommand    cmd  = new SqlCeCommand("INSERT INTO acc_linking VALUES('" + "KEY-" + DateTime.Now.ToString() + DateTime.Now.Ticks.ToString() + "','" + frbkk + "','" + lnktpe_str + "','" + dgvr.Cells[0].Value.ToString() + "','" + cbx.SelectedItem.ToString() + "')", conn);
                            conn.Open();
                            cmd.ExecuteScalar();
                            conn.Close();

                            SqlCeConnection conn2 = new SqlCeConnection(Properties.Settings.Default.AmdtbseConnectionString);
                            SqlCeCommand    cmd2  = new SqlCeCommand("UPDATE invoice SET [Binded to Journal Entry] = '" + cbx.Text + "', [Binded to Journal] = '" + frbkk + "' WHERE [Invoice Reference Number (ID)] = '" + cbx.Text + "'", conn2);
                            conn2.Open();
                            cmd2.ExecuteScalar();
                            conn2.Close();
                        }
                        else
                        {
                            basql.Execute(Main.Amatrix.acc, "INSERT INTO acc_linking VALUES('" + "KEY-" + DateTime.Now.ToString() + DateTime.Now.Ticks.ToString() + "','" + frbkk + "','" + lnktpe_str + "','" + dgvr.Cells[0].Value.ToString() + "','" + cbx.SelectedItem.ToString() + "')", "acc_linking", dtp2);
                            basql.Execute(Main.Amatrix.acc, "UPDATE invoice SET [Binded to Journal Entry] = '" + cbx.Text + "', [Binded to Journal] = '" + frbkk + "' WHERE [Invoice Reference Number (ID)] = '" + cbx.Text + "'", "invoice", dtp2);
                        }
                        loaddb();
                        if (lnktpe == 0)
                        {
                            if (frbkk == "salesbook")
                            {
                                acjrn.set_linked(0, "salesbook", dgv[4, 0].Value.ToString());
                            }
                            else if (frbkk == "purchasebook")
                            {
                                acjrn.set_linked(0, "purchasebook", dgv[4, 0].Value.ToString());
                            }
                            this.Close();
                        }
                    }
                    else
                    {
                        Am_err ner = new Am_err(); ner.tx("Cannot Enter More than One Invoice Entry per Journal Entry.");
                    }
                }
                catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Amatrix was Unable to add the Specified Key"); }
            }
            else
            {
                this.Close();
            }
        }
예제 #15
0
 private void assco()
 {
     if (!FileAssociation.IsAssociated(".afd"))
     {
         try
         {
             FileAssociation.Associate(".afd", "Main2", "afd File", Environment.CurrentDirectory + "\\beta tech.ico", Application.StartupPath + "\\Main2.exe");
         }
         catch (Exception erty) { Am_err ner = new Am_err(); ner.tx(erty.Message); }
     }
 }
예제 #16
0
 private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 3 || e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7 || e.ColumnIndex == 8)
     {
         try
         {
             dataGridView1[12, dataGridView1.CurrentRow.Index].Value = ((Convert.ToDouble(dataGridView1[3, dataGridView1.CurrentRow.Index].Value) + Convert.ToDouble(dataGridView1[7, dataGridView1.CurrentRow.Index].Value) + Convert.ToDouble(dataGridView1[8, dataGridView1.CurrentRow.Index].Value)) - Convert.ToDouble(dataGridView1[6, dataGridView1.CurrentRow.Index].Value));
         }
         catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Unable to Update the Total Value, as a Failsafe This may be Done Manually"); }
     }
 }
예제 #17
0
 void bttokclc(object sender, EventArgs e)
 {
     try
     {
         tbxwbx.RightToLeft = RightToLeft.Yes;
     }
     catch (Exception excrtlft)
     {
         Am_err aerrtlft = new Am_err();
         aerrtlft.tx(excrtlft.ToString() + "An error has occured.");
     }
 }
예제 #18
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Process          p  = new Process();
         ProcessStartInfo pi = new ProcessStartInfo(Environment.CurrentDirectory + "\\ShareP\\Amatrix Document Server.exe");
         p.StartInfo = pi;
         Amatrix.al_prc.Add(p);
         p.Start();
         this.Close();
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Unable to open Share Point, the .exe is missing, Call maintenance for Check-up."); }
 }
예제 #19
0
 private void bkk_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Cancelled == true)
     {
         Am_err ner = new Am_err();
         ner.tx("The Message Could not Be Sent, Check your Connection Settings.");
     }
     else
     {
         MessageBox.Show("Advertisment Submitted For Approval, You will recieve an Email at " + textBox1.Text + " within a week", "Advertisment Submitted", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     this.Close();
 }
예제 #20
0
 private void bkk_SEND_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Cancelled == true)
     {
         Am_err ner = new Am_err();
         ner.tx("The Message Could not Be Sent, Check your Connection Settings.");
     }
     else if (e.Cancelled == false)
     {
         MessageBox.Show("The Message Was Sent.", "Email Sent", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     this.Close();
 }
예제 #21
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (dataGridView2[0, 0].Value != DBNull.Value && dataGridView2[0, dataGridView2.CurrentRow.Index].Value != DBNull.Value)
                {
                    setprods();
                    foreach (DataGridViewRow dgvr in dataGridView2.SelectedRows)
                    {
                        try
                        {
                            dgvr.Cells[3].Value = "Shipping (Logistics)";
                            dgvr.Cells[4].Value = ID;
                        }
                        catch (Exception erty) { }
                    }
                    DataTable table = new DataTable();
                    try
                    {
                        dataGridView2.CurrentCell = dataGridView2[0, dataGridView2.CurrentRow.Index + 1];
                    }
                    catch (Exception erty)
                    {
                        dataGridView2.CurrentCell = dataGridView2[0, dataGridView2.CurrentRow.Index - 1];
                    }

                    table = (DataTable)dataGridView2.DataSource;
                    DataTable table2 = new DataTable();
                    if (Main.Amatrix.mgt == "")
                    {
                        using (var con = new SqlCeConnection(Properties.Settings.Default.Amdtbse_4ConnectionString))
                            using (var adapter = new SqlCeDataAdapter("SELECT * FROM prod_bulk", con))
                                using (new SqlCeCommandBuilder(adapter))
                                {
                                    adapter.Fill(table2);
                                    con.Open();
                                    adapter.Update(table);
                                }
                    }
                    else
                    {
                        asql.Save(table, "prod_bulk", Main.Amatrix.mgt);
                    }
                    opr_temp.glue(dataGridView1[1, dataGridView1.CurrentRow.Index].Value.ToString());
                    abtclse.Start();
                }
            }
            catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("The Selected Row is Not Valid. Operation Aborted."); }
        }
예제 #22
0
 private void svebtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (Main.Amatrix.mgt == "")
         {
             tasksTableAdapter.Update(tasks_DataSet);
         }
         else
         {
             asql.Save(tasks_DataSet.Tasks, "Tasks", Main.Amatrix.mgt);
         }
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Amatrix was Unable to Save Your Task Data."); }
 }
예제 #23
0
 private void confnewpwus_Click(object sender, EventArgs e)
 {
     if (chbnewpw.Checked == true && poid.Text == poid2.Text && textBox1.Text == Properties.Settings.Default.lockpss)
     {
         if (poid.Text != "none")
         {
             Properties.Settings.Default.lockpss = poid2.Text;
             lblsvepriv.Visible = true;
             Properties.Settings.Default.Save();
             this.Close();
         }
         else
         {
             Am_err ner = new Am_err(); ner.tx("'none' is not a valid password.");
         }
     }
     else
     {
         if (poid.Text == poid2.Text)
         {
             poid.ForeColor  = Color.Gray;
             poid2.ForeColor = Color.Gray;
             poid.BackColor  = Color.White;
             poid2.BackColor = Color.White;
         }
         else
         {
             poid.ForeColor  = Color.White;
             poid2.ForeColor = Color.White;
             poid.BackColor  = Color.DarkOrange;
             poid2.BackColor = Color.DarkOrange;
         }
         if (textBox1.Text == Properties.Settings.Default.lockpss)
         {
             textBox1.ForeColor = Color.Black;
             textBox1.ForeColor = Color.Black;
             textBox1.BackColor = Color.Gainsboro;
             textBox1.BackColor = Color.Gainsboro;
         }
         else
         {
             textBox1.ForeColor = Color.White;
             textBox1.ForeColor = Color.White;
             textBox1.BackColor = Color.DarkOrange;
             textBox1.BackColor = Color.DarkOrange;
         }
     }
 }
예제 #24
0
 private void oper_save()
 {
     try
     {
         contactsBindingSource.EndEdit();
         if (radioButton1.Checked == true)
         {
             contactsTableAdapter.Update(amdtbse5_dtst);
         }
         else
         {
             asql.Save(amdtbse5_dtst.Contacts, "Contacts", Main.Amatrix.doc);
         }
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("An Error Occured While Saving Your Contacts, Please Check Your New Entries and Try Again."); }
 }
예제 #25
0
 private void bkk_Authenti_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Cancelled == true)
     {
         Am_err ner = new Am_err(); ner.tx("Authentication Processing Failed");
     }
     if (textBox1.Text == pwd && e.Cancelled == false)
     {
         tms.Stop();
         this.Owner.Enabled = true;
         this.Close();
     }
     else
     {
         textBox1.BackColor = Color.DarkOrange; textBox1.SelectAll();
     }
 }
예제 #26
0
 private void tscbfnt_TextChanged(object sender, EventArgs e)
 {
     try
     {
         int   szet = Convert.ToInt32(szetxt.Text);
         float fte  = (float)szet;
         using (Font fnt = new Font(tscbfnt.Text, fte))
         {
             tbxwbx.SelectionFont = fnt;
         }
     }
     catch (Exception fntszech)
     {
         Am_err amrfnt = new Am_err();
         amrfnt.tx("Work Book was unable to find the required font.");
     }
 }
예제 #27
0
        //POS Events
        void activeScanner_DataEvent(object sender, DataEventArgs e)
        {
            ASCIIEncoding encoder = new ASCIIEncoding();

            try
            {
                // Display the ASCII encoded label text
                textBox1.Text = encoder.GetString(activeScanner.ScanDataLabel);
                // re-enable the data event for subsequent scans
                activeScanner.DataEventEnabled = true;
            }
            catch (PosControlException)
            {
                // Log any errors
                Am_err ner = new Am_err(); ner.tx("An error Occured during the Bar-Scan");
            }
        }
예제 #28
0
 private void button1_Click(object sender, EventArgs e)
 {
     panel2.Visible = true;
     Application.DoEvents();
     try
     {
         Attachment atc = new Attachment(ofd.FileName);
         Image      i   = Image.FromFile(ofd.FileName);
         mail.Attachments.Add(atc);
         mail.From = new MailAddress("*****@*****.**");
         mail.To.Add("*****@*****.**");
         mail.Subject = "ADVERT - " + DateTime.Now.ToString();
         mail.Body    = "RETURN TO - " + textBox1.Text + "\n" + "HEADING - " + textBox2.Text + "\n" + "MESSAGE - " + richTextBox1.Text;
         bkk.RunWorkerAsync();
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Could Not Send the Email, Check Your Image, if The Image File is Correct, Contact Astreous at [email protected] for Help."); }
     panel2.Visible = false;
 }
예제 #29
0
 private void dataGridView2_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         dataGridView1[1, dataGridView1.CurrentRow.Index].Value = DateTime.Now;
         try
         {
             dataGridView1[0, dataGridView1.CurrentRow.Index].Value = dataGridView2[0, dataGridView2.CurrentRow.Index].Value.ToString() + " " + dataGridView2[1, dataGridView2.CurrentRow.Index].Value.ToString();
         }
         catch (Exception erty) { dataGridView1[0, dataGridView1.CurrentRow.Index].Value = dataGridView2[0, dataGridView2.CurrentRow.Index].Value.ToString(); }
         try
         {
             dataGridView1[0, dataGridView1.CurrentRow.Index].Value = dataGridView1[0, dataGridView1.CurrentRow.Index].Value + " - " + dataGridView2[5, dataGridView2.CurrentRow.Index].Value;
         }
         catch (Exception erty) { MessageBox.Show("You Have Not Entered an Employee ID Code, Searches and Tasks May Fragment into Duplicate Names(Where people Have the Same Name)."); }
     }
     catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Please Select a Task Row."); }
 }
예제 #30
0
        private void First_use_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                scsql.Execute_Insert_Update(Properties.Settings.Default.Misc_DBConnectionString, "DELETE FROM co_nfo");
                scsql.Execute_Insert_Update(Properties.Settings.Default.Misc_DBConnectionString, "INSERT INTO co_nfo VALUES('" + textBox2.Text + "','" + textBox4.Text + "','" + textBox6.Text + "','" + textBox5.Text + "','" + textBox7.Text + "','" + textBox1.Text + "','" + textBox3.Text + "')");

                if (Main.Amatrix.doc != "")
                {
                    Base_ASQL.BASQL b    = new Base_ASQL.BASQL();
                    DataTable       dtpy = new DataTable();
                    b.Execute(Main.Amatrix.doc, "DELETE FROM co_nfo", "", dtpy);
                    b.Execute(Main.Amatrix.doc, "INSERT INTO co_nfo VALUES('" + textBox2.Text + "', '" + textBox4.Text + "', '" + textBox6.Text + "','', '" + textBox5.Text + "','','','', '" + textBox7.Text + "','','" + "INF-" + DateTime.Now.ToString() + DateTime.Now.Ticks.ToString() + "')", "", dtpy);
                    dtpy.Clear();
                    dtpy.Dispose();
                }
            }
            catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Unable to Save Company Information Data. (" + erty.Message + ")"); e.Cancel = true; }
        }