private void FillDept() { var textFields = new string[] { "DeptCode", "DeptName" }; var pattern = "{0} - {1}"; var orderBy = new string[] { "DeptCode" }; StaffDeptEx.LoadCombo(ref cboDeptCode, textFields, pattern, true, true, "", "", orderBy); }
private bool IsValid() { bool result = true; #region DeptCode 唔可以吉 errorProvider.SetError(txtStaffDeptCode, string.Empty); if (txtStaffDeptCode.Text.Length == 0) { errorProvider.SetError(txtStaffDeptCode, "Cannot be blank!"); return(false); } #endregion #region 新增,要 check CityCode 係咪 in use errorProvider.SetError(txtStaffDeptCode, string.Empty); if (StaffDeptEx.IsDeptCodeInUse(txtStaffDeptCode.Text.Trim())) { errorProvider.SetError(txtStaffDeptCode, "Dept Code in use"); return(false); } #endregion return(result); }
private void FillParentDeptList() { StaffDeptEx.LoadCombo(ref cboParentDept, "DeptName", true, true, string.Empty, ""); }