コード例 #1
0
        private void FillParentSectorList()
        {
            string sql = "MarketSectorId NOT IN ('" + _MarketSectorId.ToString() + "')";

            string[] orderBy = new string[] { "MarketSectorCode" };

            MarketSectorEx.LoadCombo(ref cboParentSector, "MarketSectorCode", false, true, "", sql, orderBy);
        }
コード例 #2
0
        private bool IsValid()
        {
            bool result = true;

            #region CountryCode 唔可以吉
            errorProvider.SetError(txtMarketSectorCode, string.Empty);
            if (txtMarketSectorCode.Text.Length == 0)
            {
                errorProvider.SetError(txtMarketSectorCode, "Cannot be blank!");
                return(false);
            }
            #endregion

            #region 新增,要 check CountryCode 係咪 in use
            errorProvider.SetError(txtMarketSectorCode, string.Empty);
            if (_MarketSectorId == System.Guid.Empty && MarketSectorEx.IsMarketSectorCodeInUse(txtMarketSectorCode.Text.Trim()))
            {
                errorProvider.SetError(txtMarketSectorCode, "Market Sector Code in use");
                return(false);
            }
            #endregion

            return(result);
        }
コード例 #3
0
        private void FillMarketSectorList()
        {
            var orderBy = new string[] { "MarketSectorName" };

            MarketSectorEx.LoadCombo(ref cboMarketSector, "MarketSectorName", true, true, "", "", orderBy);
        }