Ejemplo n.º 1
0
        private void btnShopCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Shop_Popup pop = new Shop_Popup("", "", false);

            pop.ShowDialog();
            ShopDto dto = pop.Shopdto;

            if (dto != null)
            {
                btnShopCode.Text = dto.ShopCode;
                txtShopName.Text = dto.ShopName;
            }
        }
Ejemplo n.º 2
0
        private void tbnShop_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            List <ShopDto> shopList = new List <ShopDto>();
            Shop_Popup     shop     = new Shop_Popup("", "", true);

            shop.ShowDialog();

            string shopName = string.Empty;
            string shopCode = string.Empty;

            shopList = shop.ShopList;
            if (shopList != null && shopList.Count != 0)
            {
                foreach (ShopDto shopdto in shopList)
                {
                    if (!string.IsNullOrEmpty(shopName))
                    {
                        shopName += "," + shopdto.ShopName;
                    }
                    else
                    {
                        shopName = shopdto.ShopName;
                    }
                    if (!string.IsNullOrEmpty(shopCode))
                    {
                        shopCode += "," + shopdto.ShopCode;
                    }
                    else
                    {
                        shopCode = shopdto.ShopCode;
                    }
                }
                txtShop.Text = shopName;
                tbnShop.Text = shopCode;
            }
        }