protected void fBillProvinceID_SelectedIndexChanged(object sender, EventArgs e) { DADistrict daDistrictBilling = new DADistrict(); fBillDistrictID.DataSource = daDistrictBilling.USP_District_GetDataForComboBox_ByProvinceID(int.Parse(fBillProvinceID.SelectedValue)); fBillDistrictID.DataBind(); }
override protected Boolean GetDataComboBox() { try { DAOrderStatus daOrderStatus = new DAOrderStatus(); fOrderStatusID.DataSource = daOrderStatus.USP_OrderStatus_GetDataForComboBox(); fOrderStatusID.DataBind(); DAPayment daPayment = new DAPayment(); fPaymentID.DataSource = daPayment.USP_Payment_GetDataForComboBox(); fPaymentID.DataBind(); DAShipping daShipping = new DAShipping(); fShippingID.DataSource = daShipping.USP_Shipping_GetDataForComboBox(); fShippingID.DataBind(); DAProvince daProvinceBilling = new DAProvince(); fBillProvinceID.DataSource = daProvinceBilling.USP_Province_GetDataForComboBox(); fBillProvinceID.DataBind(); DADistrict daDistrictBilling = new DADistrict(); fBillDistrictID.DataSource = daDistrictBilling.USP_District_GetDataForComboBox_ByProvinceID(int.Parse(fBillProvinceID.SelectedValue)); fBillDistrictID.DataBind(); DAProvince daProvinceShipping = new DAProvince(); fShipProvinceID.DataSource = daProvinceShipping.USP_Province_GetDataForComboBox(); fShipProvinceID.DataBind(); DADistrict daDistrictShipping = new DADistrict(); fShipDistrictID.DataSource = daDistrictShipping.USP_District_GetDataForComboBox_ByProvinceID(int.Parse(fShipProvinceID.SelectedValue)); fShipDistrictID.DataBind(); DACustomer daCustomer = new DACustomer(); fCustomerID.DataSource = daCustomer.USP_Customer_GetDataForComboBox(); fCustomerID.DataBind(); DAProvince daProvince = new DAProvince(); fProvinceID.DataSource = daProvince.USP_Province_GetDataForComboBox(); fProvinceID.DataBind(); DACustomerGroup daCustomerGroup = new DACustomerGroup(); fCustomerGroupID.DataSource = daCustomerGroup.USP_CustomerGroup_GetDataForComboBox(); fCustomerGroupID.DataBind(); //LoadCategory(); return(true); } catch (Exception ex) { ShowErrorMes("Lỗi hệ thống: " + ex.Message); return(false); } }