예제 #1
0
        private void BtSelect_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog save = new SaveFileDialog();

            save.ShowDialog();
            Table_Class    table    = new Table_Class("select [SchemeName] as \'Название\', [Basis] as \'Основание\', [Reality] as \'Реализация\' from [dbo].[MarkScheme] WHERE [LogDelete] = 0");
            Document_class document = new Document_class();

            document.Document_Create(Document_class.Document_Type.MarkSchemes, save.FileName, table.table);
        }
        private void BtSelect_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog save = new SaveFileDialog();

            save.ShowDialog();
            Table_Class    table    = new Table_Class("SELECT [Name],(select [TypeNAme] from [dbo].[ProductType] WHERE [Type_ID] = [ID_ProductType]),[Storage],[FirstDec],[Price] FROM [dbo].[Product] WHERE [ID_Product] >0 and [LogDelete] = 0");
            Document_class document = new Document_class();

            document.Document_Create(Document_class.Document_Type.Storage, save.FileName, table.table);
        }
예제 #3
0
        private void BtSelect_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog save = new SaveFileDialog();

            save.ShowDialog();
            Table_Class    table    = new Table_Class(String.Format("SELECT [Check] as \'Чек\',(select [Surname] from [dbo].[Staff] where [ID_Staff] = [Staff_ID]) as \'Фамилия\',(select [Name] from [dbo].[Staff] where [ID_Staff] = [Staff_ID]) as \'Имя\',(select [FirstName] from [dbo].[Staff] where [ID_Staff] = [Staff_ID]) as \'Отчество\', (select [Name] from [dbo].[Product] where [ID_Product] = [Product_ID]) as \'Товар\', (select [SchemeName] from [dbo].[MarkScheme] where [ID_Scheme] = (select [Scheme_ID] from [dbo].[Product] where [ID_Product] = [Product_ID])) as \'Схема\',[Amount] as \'Количество\',[SellDate] as \'Дата\',[Price] as \'Сумма\' FROM [dbo].[Sell] WHERE [Check] = \'{0}\'", tbCheck.Text));
            Document_class document = new Document_class();

            document.Document_Create(Document_class.Document_Type.Check, save.FileName, table.table);
            ArrayList array = new ArrayList();

            array.Add(tbCheck.Text);
            array.Add(save.FileName);
            Procedure_Class procedure = new Procedure_Class();

            procedure.procedure_Execution("Sell_Doc_Create", array);
            tbCheck.Clear();
        }
        private void BtSelect_Click(object sender, RoutedEventArgs e)
        {
            Action action = () =>
            {
                SaveFileDialog save = new SaveFileDialog();
                save.ShowDialog();
                Table_Class    table    = new Table_Class(String.Format("select [OrderName],[OrderText] from [dbo].[Order] WHERE [ID_Order] = {0}", tbOrderID.Text));
                Document_class document = new Document_class();
                document.Document_Create(Document_class.Document_Type.Order, save.FileName, table.table);
                ArrayList array = new ArrayList();
                array.Add(tbOrderID.Text);
                array.Add(save.FileName);
                Procedure_Class procedure = new Procedure_Class();
                procedure.procedure_Execution("Order_Doc_Create", array);
                tbOrderID.Clear();
            };

            action.Invoke();
        }