Esempio n. 1
0
        internal IEnumerable GetTable(string tableName, DataSet ds)
        {
            switch (tableName)
            {
            case "state":
                return(StateTable.DataSetToList(ds));

            case "destination":
                return(DestinationTable.DataSetToList(ds));

            case "fashion":
                return(FashionTable.DataSetToList(ds));

            case "manufacturer":
                return(ManufacturerTable.DataSetToList(ds));

            case "material":
                return(MaterialTable.DataSetToList(ds));

            case "material_type":
                return(MaterialTypeTable.DataSetToList(ds));

            case "orders":
                return(OrdersTable.DataSetToList(ds));

            case "received_material":
                return(ReceivedMaterialTable.DataSetToList(ds));

            case "issued_materials":
                return(IssuedMaterialsTable.DataSetToList(ds));

            case "materialview":
                return(MaterialViewTable.DataSetToList(ds));

            case "issuedview":
                return(IssuedViewTable.DataSetToList(ds));

            case "receivedview":
                return(ReceivedViewTable.DataSetToList(ds));

            case "ordersview":
                return(OrdersViewTable.DataSetToList(ds));
            }
            throw new Exception();
        }
Esempio n. 2
0
        private BufferData()
        {
            UserType = SystemUser.GetInstance().UserType;
            Mode     = Modes.Structure;
            Rebuild();
            NameOfAttribDictinionary = new Dictionary <string, string>();
            InitListOfNameOfAttrib();

            DestinationTable      = new DestinationTable();
            FashionTable          = new FashionTable();
            IssuedMaterialsTable  = new IssuedMaterialsTable();
            IssuedViewTable       = new IssuedViewTable();
            ManufacturerTable     = new ManufacturerTable();
            MaterialTable         = new MaterialTable();
            MaterialTypeTable     = new MaterialTypeTable();
            MaterialViewTable     = new MaterialViewTable();
            OrdersTable           = new OrdersTable();
            OrdersViewTable       = new OrdersViewTable();
            ReceivedMaterialTable = new ReceivedMaterialTable();
            ReceivedViewTable     = new ReceivedViewTable();
            StateTable            = new StateTable();

            RelateDbTableNameWithClasses();
        }
Esempio n. 3
0
        public void OpenTable(string tableName)
        {
            DepotDbConnector depotDbConnector = DepotDbConnector.GetInstance();
            DataSet          ds = depotDbConnector.SelectQuerry("SELECT * FROM " + tableName);

            //MessageBox.Show(tableName);
            switch (tableName)
            {
            case "state":
                StateTable.DataSetToList(ds);
                break;

            case "destination":
                DestinationTable.DataSetToList(ds);
                break;

            case "fashion":
                FashionTable.DataSetToList(ds);
                break;

            case "manufacturer":
                ManufacturerTable.DataSetToList(ds);
                break;

            case "material":
                MaterialTable.DataSetToList(ds);
                break;

            case "material_type":
                MaterialTypeTable.DataSetToList(ds);
                break;

            case "orders":
                OrdersTable.DataSetToList(ds);
                break;

            case "received_material":
                ReceivedMaterialTable.DataSetToList(ds);
                break;

            case "issued_materials":
                IssuedMaterialsTable.DataSetToList(ds);
                break;

            case "materialview":
                MaterialViewTable.DataSetToList(ds);
                break;

            case "issuedview":
                IssuedViewTable.DataSetToList(ds);
                break;

            case "receivedview":
                ReceivedViewTable.DataSetToList(ds);
                break;

            case "ordersview":
                OrdersViewTable.DataSetToList(ds);
                break;
            }
        }