public void VerifyElementContent()
 {
     IdLabel.VerifyTextIsInThisElement("Id");
     IdContent.VerifyContentOfThisElementIsIntegerType();
     IdText.VerifyTextIsInThisElement("This uniquely identifies this sales channel from other sales channels");
     NameLabel.VerifyTextIsInThisElement("Name");
     NameContent.VerifyContentNotEmpty();
     NameSubText.VerifyTextIsInThisElement("This text is not displayed on the site and is for internal use only");
     Console.WriteLine("Verified Header elements have expected values on " + GetType().Name);
 }
예제 #2
0
 private void LimparComponentes()
 {
     IdText.Text         = String.Empty;
     DescricaoTxt.Text   = String.Empty;
     TipoTxt.Text        = String.Empty;
     MarcaTxt.Text       = String.Empty;
     FinalidadeTxt.Text  = String.Empty;
     CorTxt.Text         = String.Empty;
     TamanhoTxt.Text     = String.Empty;
     PrecoTxt.Text       = String.Empty;
     NomeFornecedor.Text = String.Empty;
     IdText.Focus();
 }
        void ReleaseDesignerOutlets()
        {
            if (BuscarButton != null)
            {
                BuscarButton.Dispose();
                BuscarButton = null;
            }

            if (CategoryText != null)
            {
                CategoryText.Dispose();
                CategoryText = null;
            }

            if (CountText != null)
            {
                CountText.Dispose();
                CountText = null;
            }

            if (IdText != null)
            {
                IdText.Dispose();
                IdText = null;
            }

            if (NameText != null)
            {
                NameText.Dispose();
                NameText = null;
            }

            if (PriceText != null)
            {
                PriceText.Dispose();
                PriceText = null;
            }

            if (StatusLabel != null)
            {
                StatusLabel.Dispose();
                StatusLabel = null;
            }

            if (ValidarButton != null)
            {
                ValidarButton.Dispose();
                ValidarButton = null;
            }
        }
예제 #4
0
        public IEnumerable <IdText> GetDefectCategory()
        {
            List <IdText> result = new List <IdText>();

            foreach (Domain.Defects.DefectType Type in Enum.GetValues(typeof(Domain.Defects.DefectType)))
            {
                var type = new IdText
                {
                    Id   = ((int)Type).ToString(),
                    Text = Type.GetDescription(),
                };
                result.Add(type);
            }
            return(result);
        }
예제 #5
0
        public IEnumerable <IdText> GetLayer(int category)
        {
            List <IdText> result = new List <IdText>();
            List <DefectTypeLayerSeverity> relations = _defectService.GetAllRelations().Where(x => (int)x.Type == category).ToList();

            foreach (DefectTypeLayerSeverity defectTypeLayerSeverity in relations)
            {
                var layer = new IdText
                {
                    Id   = ((int)defectTypeLayerSeverity.Layer).ToString(),
                    Text = defectTypeLayerSeverity.Layer.GetDescription(),
                };
                result.Add(layer);
            }
            return(result);
        }
예제 #6
0
        public JsonResult GetUserType()
        {
            var list = new List <IdText>
            {
                new IdText {
                    Id = "0", Text = "请选择", selected = true
                }
            };
            var role = _roleService.GetRoleList();

            foreach (var item in role)
            {
                var litem = new IdText {
                    Text = item.RoleName, Id = item.Id
                };
                list.Add(litem);
            }
            return(Json(list));
        }
예제 #7
0
 /// <summary>
 /// 获取员工列表
 /// </summary>
 /// <returns></returns>
 public async Task <JsonResult> GetStaffList()
 {
     return(await Task.Run(() =>
     {
         var staffService = ObjectContainer.Resolve <IStaffService>();
         var list = new List <IdText>
         {
             new IdText {
                 Id = "0", Text = "请选择", selected = true
             }
         };
         var rlt = staffService.GetStaff(LoginInfo.Role, LoginInfo.Org.Id);
         foreach (var item in rlt)
         {
             var litem = new IdText {
                 Text = item.Name, Id = item.Id
             };
             list.Add(litem);
         }
         return Json(list);
     }));
 }