Beispiel #1
0
        public async void load_subtypeAndAdditionall(F form, string type_id)
        {
            CurtainDesigner.Models.Classes.FabricCurtainManage <L>             model = new CurtainDesigner.Models.Classes.FabricCurtainManage <L>();
            CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T> view  = new CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T>();
            SqlDataReader reader = null;

            reader = await model.getDataFromDB($"Select * From [Fabric_curtains_subtypes] fcs Where [fcs].[Type_id] = {type_id};");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxCurtainSubtype, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Subtype_name", "Subtype_id");

            reader = await model.getDataFromDB($"Select * From [Additional_equipment] fcs Where [fcs].[Type_id] = {type_id};");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxEquipment, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Equipment", "Equipment_id");
        }
Beispiel #2
0
        public async void load_data_once_comboboxes(ComboBox comboBox, string query, string key, string value, int selected_value)
        {
            CurtainDesigner.Models.Classes.FabricCurtainManage <L>             model = new CurtainDesigner.Models.Classes.FabricCurtainManage <L>();
            CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T> view  = new CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T>();
            SqlDataReader reader = null;

            reader = await model.getDataFromDB(query);

            view.loadDataFromDB_comboboxes(comboBox, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), key, value, selected_value);
        }
Beispiel #3
0
        public async void load_installations(F form)
        {
            CurtainDesigner.Models.Classes.FabricCurtainManage <L>             model = new CurtainDesigner.Models.Classes.FabricCurtainManage <L>();
            CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T> view  = new CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T>();
            SqlDataReader reader = null;

            reader = await model.getDataFromDB($"Select * From [Installation];");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxInstallation, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Price", "Installation_id");

            model.closeConnection();
        }
Beispiel #4
0
        public async void load_data(F form, string type_id, string subtype_id)
        {
            CurtainDesigner.Models.Classes.FabricCurtainManage <L>             model = new CurtainDesigner.Models.Classes.FabricCurtainManage <L>();
            CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T> view  = new CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T>();
            SqlDataReader reader = null;

            reader = await model.getDataFromDB($"Select * From [Fabric] f Where [f].[Type_id] = {type_id} and [f].[Subtype_id] = {subtype_id};");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxFabric, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Name", "Fabric_id");

            model.closeConnection();
        }
Beispiel #5
0
        public async void load_data(F form)
        {
            CurtainDesigner.Models.Classes.FabricCurtainManage <L>             model = new CurtainDesigner.Models.Classes.FabricCurtainManage <L>();
            CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T> view  = new CurtainDesigner.Views.Classes.FabricCurtainViewManage <O, L, F, T>();
            SqlDataReader reader = null;

            reader = await model.getDataFromDB("Select * From [Fabric_curtains_types];");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxCurtainType, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Type_name", "Type_id");

            reader = await model.getDataFromDB("Select * From [Control];");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxSide, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Control_side", "Control_id");

            reader = await model.getDataFromDB("Select * From [System_color];");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxSystemColor, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Name", "Color_id");

            reader = await model.getDataFromDB($"Select * From [Installation];");

            view.loadDataFromDB_comboboxes((form as CurtainDesigner.FormFabricCurtainOrder).comboBoxInstallation, reader, new System.ComponentModel.BindingList <KeyValuePair <string, int> >(), "Price", "Installation_id");

            model.closeConnection();
        }