예제 #1
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            DataModel.IISM_Dataset.ProducCategoryDataTable dt = new DataModel.IISM_Dataset.ProducCategoryDataTable();
            DataModel.IISM_DatasetTableAdapters.ProducCategoryTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.ProducCategoryTableAdapter();
            adpt.Fill(dt);

            var qry = from i in dt
                      select new
            {
                ID = i.PCatID.ToString("000"),
                i.PCatDesc
            };

            Classes.FillDataGridcs._lst.Clear();
            Classes.FillDataGridcs.DataGridName = "Product Category";
            foreach (var item in qry)
            {
                Classes.FillDataGridcs.AddElements(item);
            }

            dt.Dispose(); adpt.Dispose();

            IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
            OpenW.Show();
        }
예제 #2
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DataModel.IISM_Dataset.WarehouseDataTable dt = new DataModel.IISM_Dataset.WarehouseDataTable();
                DataModel.IISM_DatasetTableAdapters.WarehouseTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.WarehouseTableAdapter();
                adpt.Fill(dt);


                var qry = from i in dt

                          select new
                {
                    WhID = i.WhID.ToString("00"),
                    i.WhDesc,
                    i.Notes
                };
                Classes.FillDataGridcs._lst.Clear();
                Classes.FillDataGridcs.DataGridName = "Warehouses";

                foreach (var item in qry)
                {
                    Classes.FillDataGridcs.AddElements(item);
                }

                dt.Dispose(); adpt.Dispose();

                IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
                OpenW.Show();
            }
            catch (Exception)
            {
            }
        }
예제 #3
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            DataModel.IISM_Dataset.ProductsDataTable dt = new DataModel.IISM_Dataset.ProductsDataTable();
            DataModel.IISM_DatasetTableAdapters.ProductsTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.ProductsTableAdapter();
            adpt.Fill(dt);

            DataModel.IISM_Dataset.ProducCategoryDataTable dt2 = new DataModel.IISM_Dataset.ProducCategoryDataTable();
            DataModel.IISM_DatasetTableAdapters.ProducCategoryTableAdapter adpt2 = new DataModel.IISM_DatasetTableAdapters.ProducCategoryTableAdapter();
            adpt2.Fill(dt2);

            var qry = from p in dt
                      join c in dt2 on p.PCatID equals c.PCatID
                      select new
            {
                Prodno   = p.ProdNoID.ToString("0000"), p.ProdName, p.Price, p.Description,
                IsActive = p.Active, SalesTax = p.IVU, p.Cost, PCatID = p.PCatID.ToString("000"), c.PCatDesc
            };

            Classes.FillDataGridcs._lst.Clear();
            Classes.FillDataGridcs.DataGridName = "Products";
            foreach (var item in qry)
            {
                Classes.FillDataGridcs.AddElements(item);
            }

            dt.Dispose(); adpt.Dispose(); dt2.Dispose(); adpt2.Dispose();

            IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
            OpenW.Show();
        }
예제 #4
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            DataModel.IISM_Dataset.CorporationDataTable dt = new DataModel.IISM_Dataset.CorporationDataTable();
            DataModel.IISM_DatasetTableAdapters.CorporationTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.CorporationTableAdapter();
            adpt.Fill(dt);

            DataModel.IISM_Dataset.BussinessTypeDataTable dt2 = new DataModel.IISM_Dataset.BussinessTypeDataTable();
            DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter adpt2 = new DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter();
            adpt2.Fill(dt2);

            var qry = from corp in dt
                      join bs in dt2 on corp.BussinessTypeID equals bs.BussinessTypeID
                      select new
            {
                CorpId = corp.CorpID.ToString("00"), CorpName = corp.CorpDesc,
                corp.Address, corp.Postal, corp.Phone, corp.Email, corp.Fax, IsActive = corp.Active,
                BussinessTypeID = corp.BussinessTypeID.ToString("000"), bs.BussinessDesc
            };

            Classes.FillDataGridcs._lst.Clear();
            Classes.FillDataGridcs.DataGridName = "Corporations";
            foreach (var item in qry)
            {
                Classes.FillDataGridcs.AddElements(item);
            }

            dt.Dispose(); adpt.Dispose(); dt2.Dispose(); adpt2.Dispose();

            IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
            OpenW.Show();
        }
예제 #5
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            DataModel.IISM_Dataset.BussinessTypeDataTable dt = new DataModel.IISM_Dataset.BussinessTypeDataTable();
            DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter();
            adpt.Fill(dt);

            DataModel.IISM_Dataset.CustomersDataTable dt2 = new DataModel.IISM_Dataset.CustomersDataTable();
            DataModel.IISM_DatasetTableAdapters.CustomersTableAdapter adpt2 = new DataModel.IISM_DatasetTableAdapters.CustomersTableAdapter();
            adpt2.Fill(dt2);

            var qry = from Cust in dt2
                      join bs in dt on Cust.BussinessTypeID equals bs.BussinessTypeID
                      select new
            {
                CustID = Cust.CstnoID.ToString("0000"), Cust.CstName, Cust.Address, Cust.Postal,
                Cust.Phone, Cust.Email, Cust.Fax, IsActive = Cust.Active, Cust.BussinessTypeID, bs.BussinessDesc
            };

            Classes.FillDataGridcs._lst.Clear();
            Classes.FillDataGridcs.DataGridName = "Customers";
            foreach (var item in qry)
            {
                Classes.FillDataGridcs.AddElements(item);
            }

            dt.Dispose(); adpt.Dispose(); dt2.Dispose(); adpt2.Dispose();

            IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
            OpenW.Show();
        }
예제 #6
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DataModel.IISM_Dataset.SUPPLIERSDataTable dt = new DataModel.IISM_Dataset.SUPPLIERSDataTable();
                DataModel.IISM_DatasetTableAdapters.SUPPLIERSTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.SUPPLIERSTableAdapter();
                adpt.Fill(dt);

                DataModel.IISM_Dataset.BussinessTypeDataTable dt2 = new DataModel.IISM_Dataset.BussinessTypeDataTable();
                DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter adpt2 = new DataModel.IISM_DatasetTableAdapters.BussinessTypeTableAdapter();
                adpt2.Fill(dt2);


                var qry = from s in dt
                          join bt in dt2 on s.BussinessTypeID equals bt.BussinessTypeID
                          select new
                {
                    SupplierId = s.SupplierID.ToString("00000"),
                    s.Name,
                    s.Address,
                    s.Postal,
                    s.Phone,
                    s.EMAIL,
                    s.FAX,
                    BussinessTypeID = s.BussinessTypeID.ToString("000"),
                    bt.BussinessDesc
                };
                Classes.FillDataGridcs._lst.Clear();
                Classes.FillDataGridcs.DataGridName = "Suppliers";
                foreach (var item in qry)
                {
                    Classes.FillDataGridcs.AddElements(item);
                }

                dt.Dispose(); adpt.Dispose(); dt2.Dispose(); adpt2.Dispose();

                IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
                OpenW.Show();
            }
            catch (Exception)
            {
            }
        }
예제 #7
0
        private void mnuReport_Click(object sender, RoutedEventArgs e)
        {
            DataModel.IISM_Dataset.ProdInventoryDataTable dt = new DataModel.IISM_Dataset.ProdInventoryDataTable();
            DataModel.IISM_DatasetTableAdapters.ProdInventoryTableAdapter adpt = new DataModel.IISM_DatasetTableAdapters.ProdInventoryTableAdapter();
            adpt.Fill(dt);

            DataModel.IISM_Dataset.WarehouseDataTable dt2 = new DataModel.IISM_Dataset.WarehouseDataTable();
            DataModel.IISM_DatasetTableAdapters.WarehouseTableAdapter adpt2 = new DataModel.IISM_DatasetTableAdapters.WarehouseTableAdapter();
            adpt2.Fill(dt2);

            DataModel.IISM_Dataset.ProductsDataTable dt3 = new DataModel.IISM_Dataset.ProductsDataTable();
            DataModel.IISM_DatasetTableAdapters.ProductsTableAdapter adpt3 = new DataModel.IISM_DatasetTableAdapters.ProductsTableAdapter();
            adpt3.Fill(dt3);



            var qry = from pi in dt
                      join wh in dt2 on pi.WhID equals wh.WhID
                      join p in dt3 on pi.ProdNoID equals p.ProdNoID
                      orderby pi.ProdNoID, pi.WhID
                select new
            {
                WhId     = pi.WhID.ToString("00"), wh.WhDesc,
                ProdNo   = pi.ProdNoID.ToString("0000"), p.ProdName,
                Quantity = Convert.ToDecimal(pi.Quantity)
            };

            Classes.FillDataGridcs._lst.Clear();
            Classes.FillDataGridcs.DataGridName = "Products Inventory";
            foreach (var item in qry)
            {
                Classes.FillDataGridcs.AddElements(item);
            }

            dt.Dispose(); adpt.Dispose(); dt2.Dispose(); adpt2.Dispose(); dt3.Dispose(); adpt3.Dispose();

            IISM.DataGrid.TemplateDataGrid OpenW = new IISM.DataGrid.TemplateDataGrid();
            OpenW.Show();
        }