public void queryComboMstAmphures() { MST008Controller mst008Ctrl = new MST008Controller(); MST_AMPHURES form = new MST_AMPHURES(); try { if (!formMstBusiness.BUSINESS_PROVINCE.Equals(0)) { form.PROVINCE_ID = formMstBusiness.BUSINESS_PROVINCE; } else { form.PROVINCE_ID = Int32.Parse(cboProvince.SelectedValue.ToString()); } if (Util.isEmpty(form.PROVINCE_ID)) { return; } object[] result = mst008Ctrl.queryComboMstAmphures(form); MsgForm msgForm = (MsgForm)result[0]; lstdataAmphure = (List <MST_AMPHURES>)result[1]; if (msgForm.statusFlag.Equals(1)) { cboAmphure.DataSource = lstdataAmphure; cboAmphure.ValueMember = "AMPHURE_ID"; cboAmphure.DisplayMember = "NAME_TH"; cboAmphure.SelectedValue = ""; } else { MessageBox.Show("Error : " + msgForm.messageDescription); } } catch (Exception ex) { log.Error(ex.ToString(), ex); MessageBox.Show("Error : " + ex.ToString()); } }