Exemplo 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;
            }
            ProjectCode_Golbal = CommonHandler.GetComboBoxSelectedValue(cboProjects).ToString();
            ShopCode_Golbal    = btnShopCode.Text;

            //卖场改变的时候对应的试卷类型也进行改变

            //List<ShopSubjectExamTypeDto> list = new List<ShopSubjectExamTypeDto>();
            ShopSubjectExamTypeDto shop = new ShopSubjectExamTypeDto();
            DataSet ds = service.SearchShopExamTypeByProjectCodeAndShopCode(ProjectCode_Golbal, ShopCode_Golbal);

            if (ds.Tables[0].Rows.Count > 0)
            {
                shop.ExamTypeCode = ds.Tables[0].Rows[0]["SubjectTypeCodeExam"] == null ? "" : ds.Tables[0].Rows[0]["SubjectTypeCodeExam"].ToString();
            }
            else
            {
                shop.ExamTypeCode = "";
            }
            CommonHandler.SetComboBoxSelectedValue(cboExamType, shop.ExamTypeCode);
        }
        private void btnShop_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Shop_Popup shop = new Shop_Popup("", "", true);

            shop.ShowDialog();

            string         shopName = string.Empty;
            string         shopCode = string.Empty;
            List <ShopDto> 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;
            }
        }
        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;
            }
        }