예제 #1
0
        private void InitCombo()
        {
            BLL.Administer.ProvinceIndexBll provBll = new BLL.Administer.ProvinceIndexBll();

            var comboProvince = provBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["propinsi"]).PropertiesComboBox.TextField  = "province_name";
            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["propinsi"]).PropertiesComboBox.ValueField = "province_code";
            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["propinsi"]).PropertiesComboBox.DataSource = comboProvince;

            BLL.Administer.MasterKantorCabangBll kancabBll = new BLL.Administer.MasterKantorCabangBll();

            var comboKacab = kancabBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["cabang"]).PropertiesComboBox.TextField  = "branch_name";
            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["cabang"]).PropertiesComboBox.ValueField = "branch_code";
            ((GridViewDataComboBoxColumn)gvMapCabangProvinsi.Columns["cabang"]).PropertiesComboBox.DataSource = comboKacab.DefaultView;

            var comboProvinceMap = bll.SelectProvince(new Hashtable());

            cbbCabang.DataSource = comboKacab;
            cbbCabang.ValueField = "branch_code";
            cbbCabang.TextField  = "branch_name";
            cbbCabang.DataBind();

            cbbProvinsi.DataSource = comboProvinceMap;
            cbbProvinsi.ValueField = "province_code";
            cbbProvinsi.TextField  = "province_name";
            cbbProvinsi.DataBind();
        }
예제 #2
0
        private void InitCombo()
        {
            BLL.Administer.ProvinceIndexBll provBll = new BLL.Administer.ProvinceIndexBll();
            var comboProvince = provBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["province_code"]).PropertiesComboBox.TextField  = "province_name";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["province_code"]).PropertiesComboBox.ValueField = "province_code";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["province_code"]).PropertiesComboBox.DataSource = comboProvince.DefaultView;

            BLL.Administer.CityIndexBll kotaBll = new BLL.Administer.CityIndexBll();

            var comboKota = kotaBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["city_id"]).PropertiesComboBox.TextField  = "city_name";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["city_id"]).PropertiesComboBox.ValueField = "city_appcode";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["city_id"]).PropertiesComboBox.DataSource = comboKota.DefaultView;

            BLL.Administer.MasterKantorCabangBll cabangBll = new BLL.Administer.MasterKantorCabangBll();

            var comboCabang = cabangBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["branch_code"]).PropertiesComboBox.TextField  = "branch_name";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["branch_code"]).PropertiesComboBox.ValueField = "branch_code";
            ((GridViewDataComboBoxColumn)gvMappingKotaAC.Columns["branch_code"]).PropertiesComboBox.DataSource = comboCabang.DefaultView;

            cbbKota.DataSource = comboKota;
            cbbKota.ValueField = "city_appcode";
            cbbKota.TextField  = "city_name";
            cbbKota.DataBind();

            cbbProvinsi.DataSource = comboProvince;
            cbbProvinsi.ValueField = "province_code";
            cbbProvinsi.TextField  = "province_name";
            cbbProvinsi.DataBind();

            cbbWilayah.DataSource = comboCabang;
            cbbWilayah.ValueField = "branch_code";
            cbbWilayah.TextField  = "branch_name";
            cbbWilayah.DataBind();
        }