コード例 #1
0
        private void btn_FetchData_Click(object sender, EventArgs e)
        {
            dsRecords = null;
            btnDataTransfer.Enabled = false;
            try {
                if (FillDestinationDbInfo() == true)
                {
                    if (FillMappingFields() == true)
                    {
                        DG1.DataSource = null;

                        dsRecords = new DataSet();

                        DataSet     dsdata = new DataSet();
                        ClassSqlLit obj    = new ClassSqlLit();
                        dsdata = obj.FillData(varSourceTableName);

                        dsRecords = dsdata.Clone();


                        ReconcileData(dsdata);
                        lblStatus.Text          = "Fetched Successfully - " + dsRecords.Tables[0].Rows.Count.ToString() + " Records to tansfer.";
                        btnDataTransfer.Enabled = true;
                        DG1.DataSource          = dsRecords.Tables[0];
                    }
                }
            }
            catch (Exception ex)
            {
                WriteErrorLog(spath, ex.Message + "   " + ex.ToString());
                MessageBox.Show(ex.Message.ToString(), "btn_FetchData_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void FillTRansferLoggTable()
        {
            ClassSqlLit obj = new ClassSqlLit();

            dsForLoggTable = new DataSet();

            dsForLoggTable = obj.FillTransferLoggTables("transfer_tables");
        }
コード例 #3
0
        private void FillSourceTables()
        {
            ClassSqlLit obj    = new ClassSqlLit();
            DataSet     dsdata = new DataSet();

            CboSourceTables.Items.Clear();
            Application.DoEvents();
            dsdata = obj.FillAllTables();
            if (IsValidate(dsdata) == true)
            {
                foreach (DataRow row in dsdata.Tables[0].Rows)
                {
                    CboSourceTables.Items.Add(row["Tablename"].ToString());
                }
                CboSourceTables.SelectedIndex = 0;
            }
        }
コード例 #4
0
        private void FillLvSource()
        {
            LvSource.Items.Clear();
            ClassSqlLit obj    = new ClassSqlLit();
            DataSet     dsdata = new DataSet();

            Application.DoEvents();
            dsdata = obj.FillSqlLitFields(CboSourceTables.Text);
            if (IsValidate(dsdata) == true)
            {
                foreach (DataRow row in dsdata.Tables[0].Rows)
                {
                    LvSource.Items.Add(row["name"].ToString());
                    LvSource.Items[LvSource.Items.Count - 1].SubItems.Add(row["type"].ToString());
                }
            }
        }