private void cmbjgbm_SelectedIndexChanged(object sender, EventArgs e) { try { InstanceForm.BDatabase = TrasenFrame.Classes.WorkStaticFun.GetJgbmDb(Convert.ToInt32(cmbjgbm.SelectedValue)); Fun.AddcmbYjks(cmbzxks, 1, 0, Convert.ToInt32(cmbjgbm.SelectedValue), InstanceForm.BDatabase); Fun.AddcmbZyks(cmbks, 1, 0, Convert.ToInt32(cmbjgbm.SelectedValue), InstanceForm.BDatabase); cmbzxks.SelectedValue = InstanceForm.BCurrentDept.DeptId; btrefresh_Click(sender, e); } catch (System.Exception err) { MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cmbjgbm_SelectedIndexChanged(object sender, EventArgs e) { try { InstanceForm.BDatabase = TrasenFrame.Classes.WorkStaticFun.GetJgbmDb(Convert.ToInt32(cmbjgbm.SelectedValue)); if (new SystemCfg(10015, InstanceForm.BDatabase).Config == "1") { Fun.AddcmbWardDept(cmbks, 1, "", Convert.ToInt32(cmbjgbm.SelectedValue), InstanceForm.BDatabase); } else { Fun.AddcmbZyks(cmbks, 1, 0, Convert.ToInt32(cmbjgbm.SelectedValue), InstanceForm.BDatabase); } btrefresh_Click(sender, e); } catch (System.Exception err) { MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }