Пример #1
0
        //private void btnDeploy_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        Common.ExecuteNonQueryWithGo(rtbContent.Text);

        //        MessageBox.Show("Script deployed successfully");
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show("Deploy Failed!\n" + ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}

        //private void LbDV_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        switch (lbDV.SelectedIndex)
        //        {
        //            case 0:
        //                rtbContent.Text = DATAVAULT.GenerateTableSAT();
        //                break;
        //            case 1:
        //                rtbContent.Text = DATAVAULT.GenerateUSPSAT();
        //                break;
        //            case 2:
        //                rtbContent.Text = DATAVAULT.GenerateTableHUB();
        //                break;
        //            case 3:
        //                rtbContent.Text = DATAVAULT.GenerateUSPHUB();
        //                break;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}



        private void BtnGenList_Click(object sender, EventArgs e)
        {
            DataClassesDataContext dc = new DataClassesDataContext();

            try
            {
                dc.ExecuteCommand("EXEC  META.dbo.USP_INIT_LIST");
                MessageBox.Show("Done.\n");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed!\n" + ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #2
0
        private void FULLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("This will make all new and existing table to be configed, are you sure?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                DataClassesDataContext dc = new DataClassesDataContext();

                try
                {
                    dc.ExecuteCommand("EXEC  META.dbo.USP_INIT_LIST");
                    MessageBox.Show("Done.\n");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Failed!\n" + ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }