Example #1
0
        private void buttonProgressSubmit_Click(object sender, EventArgs e)//save button action
        {
            textBoxInProgressName.ReadOnly = textBoxInProgressContact.ReadOnly = textBoxInProgressAddress.ReadOnly = true;
            buttonNextProgress.Enabled     = false;
            if (listboxindex != 7)
            {
                //if not finalized update the datebase 'inprogress'
                appToProgress.setname(textBoxInProgressName.Text);
                appToProgress.setaddress(textBoxInProgressAddress.Text);
                appToProgress.setcontact(int.Parse(textBoxInProgressContact.Text));
                String[] progress = { "Approved",    "Visited",                "Estimated", "Voucher Prepared", "Payment Received",
                                      "Bond Signed", "Connection Established", "Finalized" };
                appToProgress.setprogress(progress[listboxindex]);

                dbprog.updateMany(new string[] { "name", "mail", "contact", "progress" },
                                  listViewInProgress.SelectedItems[0].Text,
                                  new string[] { textBoxInProgressName.Text, textBoxInProgressAddress.Text, textBoxInProgressContact.Text, appToProgress.progress });
                clrprog();
            }
        }