Example #1
0
        private void buttonGetDALData_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime t1 = DateTime.Now;

                tableProfiles = UserProfilesDAL.Import1CUserProfiles.ImportRecords(
                    Properties.Settings.Default.soapServerUrl,
                    Properties.Settings.Default.soapServerUser,
                    Properties.Settings.Default.soapServerPassword
                    );
                dataGridViewABDal.DataSource = tableProfiles.GetProfiles();
                dataGridViewABDal.Refresh();

                DateTime t2 = DateTime.Now;
                labelABDalStatus.Text = string.Format("Received {0} records, t = {1:N2} sec",
                                                      tableProfiles.Count, (double)((t2 - t1).TotalMilliseconds / 1000));
            }
            catch (Exception ex)
            {
                MessageBox.Show(String.Format("The error was occured while importing data from {0}\nThe error message:{1}\n",
                                              Properties.Settings.Default.soapServerUrl, ex.Message), "Error!", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void buttonbuttonGetSPData_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime t1 = DateTime.Now;

                tableProfilesSP.ReadSPProfiles(Properties.Settings.Default.spSiteUrl);
                dataGridViewSP.DataSource = tableProfilesSP.GetProfiles();
                dataGridViewSP.Refresh();

                DateTime t2 = DateTime.Now;
                labelSPStatus.Text = string.Format("Received {0} records, t = {1:N2} sec",
                                                   tableProfilesSP.Count, (double)((t2 - t1).TotalMilliseconds / 1000));
            }
            catch (Exception ex)
            {
                MessageBox.Show(String.Format("The error was occured while importing from sharepoint server '{0}'\nThe error message:{1}\n",
                                              Properties.Settings.Default.spSiteUrl, ex.Message), "Error!", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
Example #3
0
        private void buttonGetDALData_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime t1 = DateTime.Now;

                tableProfiles = UserProfilesDAL.Import1CUserProfiles.ImportRecords(
                    Properties.Settings.Default.soapServerUrl,
                    Properties.Settings.Default.soapServerUser,
                    Properties.Settings.Default.soapServerPassword
                    );
                dataGridViewABDal.DataSource = tableProfiles.GetProfiles();
                dataGridViewABDal.Refresh();

                DateTime t2 = DateTime.Now;
                labelABDalStatus.Text = string.Format("Received {0} records, t = {1:N2} sec",
                    tableProfiles.Count, (double)((t2 - t1).TotalMilliseconds / 1000));
            }
            catch (Exception ex)
            {
                MessageBox.Show(String.Format("The error was occured while importing data from {0}\nThe error message:{1}\n",
                    Properties.Settings.Default.soapServerUrl, ex.Message), "Error!", MessageBoxButtons.OK,
                    MessageBoxIcon.Error);
            }
        }