示例#1
0
        private void PopulateItem(int _id)
        {
            T_AdsPos  _cateObj = new T_AdsPos();
            AdsPosDAL _cateDAL = new AdsPosDAL();

            _cateObj = _cateDAL.GetOneFromT_AdsPosByID(_id);
            if (_cateObj != null)
            {
                txt_Ads_Name.Text = _cateObj.Ads_Name.ToString();
                cbo_Ads_DisplayType.SelectedValue = _cateObj.Ads_DisplayType.ToString();
                txt_Ads_Width.Text  = _cateObj.Ads_Width.ToString();
                txt_Ads_Height.Text = _cateObj.Ads_Height.ToString();
            }
        }
示例#2
0
        private void getWidthAndHeightPos(int intPosID)
        {
            AdsPosDAL objAdsPosDAL   = new AdsPosDAL();
            T_AdsPos  objInforAdsPos = new T_AdsPos();

            try
            {
                objInforAdsPos = objAdsPosDAL.GetOneFromT_AdsPosByID(intPosID);
                if (objInforAdsPos != null)
                {
                    this.txtWidth.Text  = objInforAdsPos.Ads_Width.ToString();
                    this.txtHeight.Text = objInforAdsPos.Ads_Height.ToString();
                }
            }
            catch { }
            finally
            {
                objAdsPosDAL   = null;
                objInforAdsPos = null;
            }
        }