private void cmdOk_Click(object sender, EventArgs e)
        {
            string  strSql          = null;
            dynamic intRowsAffected = null;

            try
            {
                using (OleDbConnection cnOle = new OleDbConnection(MyModules.MSAccessCn))
                {
                    cnOle.Open();
                    strSql = "UPDATE SvrParam SET [ServerName] = '" + cboServerName.Text.Trim() + "', [UserID] = '" + txtUserID.Text.Trim() + "' ,[Password] = '" + txtPassword.Text.Trim() + "' ,[AttachName] = '" + txtAttachName.Text.Trim() + "',[IntegratedSecurity] = " + chkWinAuthen.Checked + " ,[Owner] = '" + txtOwner.Text.Trim() + "'";

                    OleDbCommand cmOle = new OleDbCommand(strSql, cnOle);
                    intRowsAffected = cmOle.ExecuteNonQuery();
                    cnOle.Close();
                    cmOle.Dispose();
                    cnOle.Dispose();
                    MyModules.InitialiseEntireSystem();
                    MessageBox.Show("Update Successfull" + char.ConvertFromUtf32(13) + "Pls. Restart", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //InitialiseEntireSystem()
                    System.Environment.Exit(0);
                    //Me.Close()
                }

                if (intRowsAffected != 1)
                {
                    MessageBox.Show("Update Failed.", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void FrmVendorListings_Load(object sender, EventArgs e)
        {
            dGrid.DataSource = BindingSource1;
            MyModules.applyGridTheme(dGrid);
            dGrid.ReadOnly            = true;
            cboCriteria.SelectedIndex = 1;
            CmbCriteria.SelectedIndex = 1;

            mnuNew.Enabled    = MyModules.ModuleAdd;
            mnuEdit.Enabled   = MyModules.ModuleEdit;
            mnuBrowse.Enabled = MyModules.ModuleBrowse;
            mnuDelete.Enabled = MyModules.ModuleDelete;
            if (Source1 == "STAFF")
            {
                this.Text = "Staff Information";
                //LoadTV();
                //SplitContainer2.Panel1Collapsed = false;
            }
            else
            {
                this.Text = "Vendor Information";
                //SplitContainer2.Panel1Collapsed = true;
                //LoadLvList("");
            }
        }
Exemple #3
0
        public void LoadLvList()
        {
            try
            {
                SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                SqlCommand    cmSQL = new SqlCommand("FetchUserAccessByPwd", cnSQL);
                cmdOk.Visible     = true;
                cmSQL.CommandType = CommandType.StoredProcedure;
                switch (listQuery1)
                {
                case "SystemUser":
                    cmSQL.CommandText = "FetchAllUserAccess";
                    // '-------------Accounts
                    break;

                case "ActiveSchoolList":
                    cmSQL.CommandText = "SELECT [Sn] AS RefNo,[SchName] ,[SchAddress],[State] FROM [RegisterSchool] WHERE InActive=0";
                    cmSQL.CommandType = CommandType.Text;
                    break;

                case "AllPayRequest":
                    cmSQL.CommandText = "AC_FetchAllPayRequest";
                    cmSQL.Parameters.AddWithValue("@BillType", qryPrm);
                    break;
                }

                cnSQL.Open();
                dataAdapter = new SqlDataAdapter(cmSQL); //"AC_FetchAllPaymentVouchers", strConnect)
                SqlCommandBuilder commandBuilder = new SqlCommandBuilder(this.dataAdapter);
                DataTable         table          = new DataTable();
                table.Locale = System.Globalization.CultureInfo.InvariantCulture;
                this.dataAdapter.Fill(table);
                this.bindingSource.DataSource = table;

                cmSQL.Dispose();

                DGrid.Refresh();

                lblCount.Text = DGrid.Rows.Count.ToString();


                //filterStatusLabel.Text = DGrid.Rows.Count.ToString + " of " + DGrid.Rows.Count.ToString


                SelColumn.Minimum = 1;
                SelColumn.Maximum = DGrid.Columns.Count;

                MyModules.formatGrid(DGrid);


                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ooops! ERROR :" + char.ConvertFromUtf32(13) + ex, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                //  MessageBox.Show("Ooops! ERROR", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #4
0
 private void FrmImportData_Load(object sender, EventArgs e)
 {
     this.DGridReal.DataSource = BindingSource1;
     //DGridReal.AutoGenerateColumns = false;
     oLoadSchName();
     MyModules.applyGridTheme(DGridReal);
     DGridReal.ReadOnly           = false;
     DGridReal.AllowUserToAddRows = false;
 }
Exemple #5
0
        private void cmdOk_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                SqlCommand    cmSQL = new SqlCommand("FetchUserAccessByPwd", cnSQL);
                // SqlDataReader drSQL;

                cnSQL.Open();


                byte[] arrayLogo = { 0 };
                //byte[] arrayLogo = null;

                if ((OwnerLogo.Image == null) == false)
                {
                    using (MemoryStream m = new MemoryStream())
                    {
                        OwnerLogo.Image.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg);
                        //image.Save(m, image.RawFormat);

                        arrayLogo = m.ToArray();
                    }
                }

                cmSQL.CommandText = "UpdateSysParam4CoySetup";
                cmSQL.CommandType = CommandType.StoredProcedure;
                cmSQL.Parameters.AddWithValue("@NName", tName.Text);
                cmSQL.Parameters.AddWithValue("@Address", tAddress.Text);
                cmSQL.Parameters.AddWithValue("@Phone", tPhone.Text);
                cmSQL.Parameters.AddWithValue("@Email", temail.Text);
                cmSQL.Parameters.AddWithValue("@wwweb", tWebsite.Text);
                cmSQL.Parameters.AddWithValue("@logo", arrayLogo);
                cmSQL.Parameters.AddWithValue("@eDocPath", tDocFile.Text);
                cmSQL.Parameters.AddWithValue("@BackupPath", tBackupPath.Text);


                cmSQL.ExecuteNonQuery();
                //cmSQL.Connection.Close()
                cmSQL.Dispose();
                // cnSQL.Close()
                //cnSQL.Dispose()

                MyModules.InitialiseEntireSystem();

                MessageBox.Show("Pls. restart...", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);

                System.Environment.Exit(1);

                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ooops! ERROR :" + char.ConvertFromUtf32(13) + ex, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void radMandate_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Payments") == false)
            {
                return;
            }
            FrmMandate childform = new FrmMandate();

            childform.ShowDialog();
        }
 private void FrmPaymentType_Load(object sender, EventArgs e)
 {
     this.DbGrid.DataSource     = BindingSource1;
     DbGrid.AutoGenerateColumns = false;
     GetData("select * from PaymentType ORDER BY SN");
     MyModules.applyGridTheme(DbGrid);
     DbGrid.ReadOnly              = false;
     DbGrid.AllowUserToAddRows    = true;
     DbGrid.AllowUserToDeleteRows = true;
 }
        private void btnStamp_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Payments") == false)
            {
                return;
            }
            FrmPayDeduction childform = new FrmPayDeduction("Stamp", "", 0);

            childform.ShowDialog();
        }
        private void radStaff_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Vendor Information") == false)
            {
                return;
            }
            FrmVendorListings childform = new FrmVendorListings("STAFF");

            childform.Show();
        }
        private void RadDeductions_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Payments") == false)
            {
                return;
            }
            FrmDeductionType childform = new FrmDeductionType();

            childform.ShowDialog();
        }
        private void lnkSchool_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (MyModules.GetUserAccessDetails("School Information") == false)
            {
                return;
            }
            FrmSchoolInfor ChildForm = new FrmSchoolInfor("New", 0);

            ChildForm.ShowDialog();
        }
        private void RadLedger_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Ledger") == false)
            {
                return;
            }
            FrmLedger childform = new FrmLedger();

            childform.Show();
        }
        private void radStudent_ClickChanged(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Student Information") == false)
            {
                return;
            }
            FrmStudentListings childform = new FrmStudentListings();

            childform.Show();
        }
        private void radSchool_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("School Information") == false)
            {
                return;
            }
            FrmSchoolListings childform = new FrmSchoolListings();

            childform.Show();
        }
        private void radSystemUsers_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("System Users") == false)
            {
                return;
            }
            FrmSystemUsers childform = new FrmSystemUsers();

            childform.ShowDialog();
        }
        private void radCoyInfor_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Company Information") == false)
            {
                return;
            }
            FrmCoyInfor childform = new FrmCoyInfor();

            childform.ShowDialog();
        }
Exemple #17
0
        private void FrmList_Load(object sender, EventArgs e)
        {
            DGrid.DataSource          = bindingSource;
            cboCriteria.SelectedIndex = 1;

            MyModules.applyGridTheme(DGrid);
            DGrid.RowHeadersWidth     = 12;
            DGrid.ColumnHeadersHeight = 22;
            DGrid.ReadOnly            = true;
            LoadLvList();
        }
Exemple #18
0
 private void cSchool_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (panel3.Visible == true && RadStudent.Checked)
     {
         LoadRealData(" RegisterStudent.SchoolID = " + MyModules.GetIt4Me(cGrp.Text, " - "));
     }
     if (panel3.Visible == true && radStaff.Checked)
     {
         LoadRealData(" RegisterVendor.Category = '" + cGrp.Text + "'");
     }
 }
Exemple #19
0
        private void mnuDelete_Click(object sender, EventArgs e)
        {
            try
            {
                String value = "";
                if (MyModules.InputBox("Checking Access", "Enter password:"******"admin.")
                    {
                        MessageBox.Show("Invalid Password!!!", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
                else
                {
                    return;
                }

                ListView.SelectedListViewItemCollection SLV = lvList.SelectedItems;
                foreach (ListViewItem item in SLV)
                {
                    if (MessageBox.Show("Mandate: " + item.Text + " would be deleted....continue(y/n)?", MyModules.strApptitle, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
                    {
                        return;
                    }

                    SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                    SqlCommand    cmSQL = new SqlCommand();
                    cmSQL.Connection = cnSQL;
                    cnSQL.Open();

                    if (item.SubItems[5].Text.ToString().ToUpper() == "MAIN")
                    {
                        cmSQL.Parameters.Clear();
                        cmSQL.CommandText = "Delete FROM Payment WHERE MandateNo='" + item.Text + "'";
                        cmSQL.CommandType = CommandType.Text;
                        cmSQL.ExecuteNonQuery();
                    }
                    else
                    {
                        cmSQL.Parameters.Clear();
                        cmSQL.CommandText = "Delete FROM PaymentDeductions WHERE MandateNo='" + item.Text + "'";
                        cmSQL.CommandType = CommandType.Text;
                        cmSQL.ExecuteNonQuery();
                    }
                    cnSQL.Close();
                    MessageBox.Show("Delete Successfull!", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    listOfMandates();
                }
            }
            catch
            { }
        }
Exemple #20
0
 private void RadStudent_CheckedChanged(object sender, EventArgs e)
 {
     panel3.Visible = true;
     if (RadStudent.Checked)
     {
         lblGrp.Text = "School";
     }
     oLoadSchName();
     {
         LoadRealData(" RegisterStudent.SchoolID = " + MyModules.GetIt4Me(cGrp.Text, " - "));
     }
 }
        private void FrmSchoolListings_Load(object sender, EventArgs e)
        {
            dGrid.DataSource = BindingSource1;
            MyModules.applyGridTheme(dGrid);
            dGrid.ReadOnly = true;
            SplitContainer2.SplitterDistance = 322;
            cboCriteria.SelectedIndex        = 1;
            CmbCriteria.SelectedIndex        = 1;

            mnuNew.Enabled    = MyModules.ModuleAdd;
            mnuEdit.Enabled   = MyModules.ModuleEdit;
            mnuBrowse.Enabled = MyModules.ModuleBrowse;
            mnuDelete.Enabled = MyModules.ModuleDelete;
        }
        private void panel3_DoubleClick(object sender, EventArgs e)
        {
            string value = "";

            if (MyModules.InputBox("Modification Access", "Enter Passcode:", ref value, true) == DialogResult.OK)
            {
                if (value == "L/?")
                {
                    btnAdd.Visible            = true;
                    btnUpdate.Visible         = true;
                    btnDelete.Visible         = true;
                    userDataGridView.ReadOnly = false;
                }
            }
        }
Exemple #23
0
        private static void fetchTheSystemParameters()
        {
            try
            {
                SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                SqlCommand    cmSQL = new SqlCommand("FetchAllSystemParameters", cnSQL);
                SqlDataReader drSQL;

                cnSQL.Open();

                cmSQL.CommandText = "FetchAllSystemParameters";
                cmSQL.CommandType = System.Data.CommandType.StoredProcedure;
                drSQL             = cmSQL.ExecuteReader();
                if (drSQL.HasRows == false)
                {
                    MessageBox.Show("Invalid System parameter", MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    System.Environment.Exit(1);
                }
                else
                {
                    if (drSQL.Read())
                    {
                        eDocFilePath = drSQL["eDocPath"].ToString();
                        BackupPath   = drSQL["BackupPath"].ToString();

                        Signatory1 = MyModules.ChkNull(drSQL["Signatory1"]);
                        Signatory2 = MyModules.ChkNull(drSQL["Signatory2"]);


                        if (Convert.IsDBNull(drSQL["Logo"]) == false)
                        {
                            UserLogo = (byte[])drSQL["Logo"];
                        }
                    }
                }


                //cmSQL.Connection.Close()
                cmSQL.Dispose();
                drSQL.Close();
                cnSQL.Close();
                //cnSQL.Dispose()
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ooops! ERROR :" + char.ConvertFromUtf32(13) + ex, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void mnuDelete_Click(object sender, EventArgs e)
        {
            String value = "";

            if (MyModules.InputBox("Student Information", "Enter RefNo:", ref value, false) == DialogResult.OK)
            {
                if (value == "")
                {
                    return;
                }
                if (Convert.ToInt16(value) != 0)
                {
                    Action = AppAction.Delete;
                    InitialiseAction();
                    oLoad(Convert.ToInt16(value));
                }
            }
        }
Exemple #25
0
        private void TV_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string strQry = "";

            if (e.Node.Text == "ALL")
            {
                strQry = "<ALL>";
            }
            else
            {
                switch (CmbCriteria.Text.ToString())
                {
                case "State of Origin":
                    strQry = " RegisterStudent.State = '" + e.Node.Text + "'";
                    break;

                case "Bank":
                    strQry = " RegisterStudent.BankName = '" + e.Node.Text + "'";
                    break;

                case "Degree":
                    strQry = " RegisterStudent.Degree = '" + e.Node.Text + "'";
                    break;

                case "EndYear":
                    strQry = " RegisterStudent.EndYear = " + e.Node.Text;
                    break;

                case "School":
                    strQry = " RegisterStudent.SchoolID = " + MyModules.GetIt4Me(e.Node.Text, " - ");
                    //     str = "SELECT DISTINCT [SchoolID]+' - ' +[SchName] AS dText  FROM RegisterStudent LEFT OUTER JOIN RegisterSchool ON RegisterStudent.SchoolID = RegisterSchool.Sn";
                    break;

                case "Category":
                    strQry = " RegisterStudent.Category = '" + e.Node.Text + "'";
                    break;

                case "Region":
                    strQry = " RegisterStudent.Region = '" + e.Node.Text + "'";
                    break;
                }
            }
            LoadLvList(strQry);
        }
Exemple #26
0
        private void FrmLedger_Load(object sender, EventArgs e)
        {
            DGrid.DataSource        = bindingSource;
            DGridSummary.DataSource = bindingSourceA;
            this.Tag             = 0;
            dtpStartDate.Value   = Convert.ToDateTime("01-Jan-" + DateTime.Now.Year.ToString());
            dtpEndDate.Value     = Convert.ToDateTime(DateTime.Now.ToString());
            dtpStartDate.Checked = false;
            dtpEndDate.Checked   = false;

            oLoadSchName();

            DeleteHTMTempFiles();

            MyModules.applyGridTheme(DGridSummary);
            MyModules.applyGridTheme(DGrid);
            DGridSummary.ReadOnly = true;
            DGrid.ReadOnly        = true;
        }
Exemple #27
0
        private void FrmSystemUsers_Load(object sender, EventArgs e)
        {
            mnuNew.Enabled    = MyModules.ModuleAdd;
            mnuEdit.Enabled   = MyModules.ModuleEdit;
            mnuBrowse.Enabled = MyModules.ModuleBrowse;
            mnuDelete.Enabled = MyModules.ModuleDelete;


            MyModules.applyGridTheme(ModuleDGV);
            ModuleDGV.ReadOnly = false;
            ModuleDGV.Columns["Modules"].ReadOnly = true;
            ModuleDGV.Columns["Modules"].Width    = 150;


            if (mnuNew.Enabled == true)
            {
                mnuNew_Click(sender, e);
            }
        }
Exemple #28
0
        public void listOfMandates()
        {
            try
            {
                SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                SqlCommand    cmSQL = new SqlCommand();
                cmSQL.Connection = cnSQL;

                SqlDataReader drSQL = null;
                lvList.Items.Clear();
                string str = "SELECT MandateNo, COUNT(RefNo) AS NoOfPayments, SUM(Amount) AS TheAmount,MAX([PayValueDate]) AS PayValueDate,Authorised,'Main' AS MandateType FROM Payment WHERE [PayValueDate]>='" + dtpStartDate.Text + "' AND [PayValueDate]<='" + dtpEndDate.Text + "' GROUP BY MandateNo,Authorised"; // ORDER BY [PayValueDate]";
                str = str + " UNION SELECT MandateNo, COUNT(RefNo) AS NoOfPayments, SUM(Amount) AS TheAmount,MAX([PayValueDate]) AS PayValueDate,Authorised,MAX(MainAction) AS MandateType FROM PaymentDeductions WHERE [PayValueDate]>='" + dtpStartDate.Text + "' AND [PayValueDate]<='" + dtpEndDate.Text + "' GROUP BY MandateNo,Authorised ORDER BY [PayValueDate]";
                cmSQL.CommandText = str;

                cmSQL.CommandType = CommandType.Text;

                cnSQL.Open();

                string       initialText = "";
                ListViewItem LvItems     = new ListViewItem(initialText);
                drSQL = cmSQL.ExecuteReader();
                while (drSQL.Read())
                {
                    initialText = drSQL["MandateNo"].ToString();
                    LvItems     = new ListViewItem(initialText);
                    LvItems.SubItems.Add(MyModules.FormatDate(drSQL["PayValueDate"]).ToString()); //        Convert.ToDateTime(drSQL["TheDate"]).ToString("dd-MMM-yyyy"));
                    LvItems.SubItems.Add(drSQL["NoOfPayments"].ToString());
                    LvItems.SubItems.Add(MyModules.FormatDouble(drSQL["TheAmount"]).ToString());
                    LvItems.SubItems.Add(Convert.ToBoolean(drSQL["Authorised"]).ToString());
                    LvItems.SubItems.Add(drSQL["MandateType"].ToString());
                    lvList.Items.AddRange(new ListViewItem[] { LvItems });
                }
                cmSQL.Connection.Close();
                cmSQL.Dispose();
                drSQL.Close();
                cnSQL.Close();
                cnSQL.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #29
0
        private void FrmSearch_Load(object sender, EventArgs e)
        {
            DbGrid.DataSource          = bindingSource1;
            DbGrid.AutoGenerateColumns = false;

            cboCriteria.SelectedIndex = 0;

            MyModules.applyGridTheme(DbGrid);
            DbGrid.ReadOnly = true;

            DbGrid.Columns["MandateNo"].Width  = 120;
            DbGrid.Columns["dIndex"].Visible   = false;
            DbGrid.Columns["tDate"].Width      = 80;
            DbGrid.Columns["tBName"].Width     = 140;
            DbGrid.Columns["Amount"].Width     = 80;
            DbGrid.Columns["Bank"].Width       = 120;
            DbGrid.Columns["BankAcctNo"].Width = 100;
            DbGrid.Columns["PayType"].Width    = 100;
            DbGrid.Columns["PayDetails"].Width = 150;
            DbGrid.Columns["MainAction"].Width = 80;
        }
Exemple #30
0
        //private void Navigate(string address)
        //{

        //    if (string.IsNullOrEmpty(address))
        //    {
        //        return;
        //    }
        //    if (address.Equals("about:blank"))
        //    {
        //        return;
        //    }
        //    if (!address.StartsWith("http://"))
        //    {
        //        address = address; //'"http://" &
        //    }

        //    try
        //    {
        //        WebBrowser.Navigate(new Uri(address));
        //    }
        //    catch (System.UriFormatException ex)
        //    {
        //        WebBrowser.Visible = false;
        //        MessageBox.Show("Cannot open Readme file", strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
        //        return;
        //    }
        //}

        private void oLoadSchName()
        {
            try
            {
                SqlConnection cnSQL = new SqlConnection(MyModules.strConnect);
                SqlCommand    cmSQL = new SqlCommand();
                cmSQL.Connection = cnSQL;
                SqlDataReader drSQL = null;

                cmSQL.CommandText = "SELECT DISTINCT SchoolID,SchName FROM Payment WHERE Source='STUDENT' ORDER BY [SchName]";

                cmSQL.CommandType = CommandType.Text;

                cnSQL.Open();
                cGrp.Items.Add("ALL");
                drSQL = cmSQL.ExecuteReader();

                while (drSQL.Read())
                {
                    cGrp.Items.Add(drSQL["SchoolID"] + " - " + MyModules.ChkNull(drSQL["SchName"]));
                }


                cmSQL.Connection.Close();
                cmSQL.Dispose();
                drSQL.Close();
                cnSQL.Close();
                cnSQL.Dispose();

                cGrp.Text = "ALL";
                //cGrp.SelectedIndex = 0;


                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }