コード例 #1
0
        private void ClearAll()
        {
            try
            {
                if (MandatoryFields.IsNotNullOrEmpty())
                {
                    InitializeMandatoryFields(MandatoryFields);
                    InitializeMandatoryFields(OldMandatoryFields);
                }

                if (ActiveEntity.IsNotNullOrEmpty())
                {
                    ActiveEntity.Code         = string.Empty;
                    ActiveEntity.Description  = string.Empty;
                    ActiveEntity.Prefix       = string.Empty;
                    ActiveEntity.BeginningNo  = null;
                    ActiveEntity.EndingNo     = null;
                    ActiveEntity.Suffix       = string.Empty;
                    ActiveEntity.CurrentValue = string.Empty;
                    ActiveEntity.IsObsolete   = false;
                    ActiveEntity.DELETE_FLAG  = false;
                }

                if (ActionMode != OperationMode.AddNew)
                {
                    IsObsoleteVisible = Visibility.Visible;
                }
                CustomDropDownDataSource = bll.GetEntitiesByID().ToDataTable <PartNumberConfig>().DefaultView;

                SelectedRow = null;
                ChangeRights();
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }
コード例 #2
0
        public IEnumerable <string> GetElementsNameWithoutInformativeLabel()
        {
            var uniqueMandatoryFieldsName = MandatoryFields.GroupBy(x => x.GetProperty("name")).Select(x => x.Key);

            return(uniqueMandatoryFieldsName.Except(GetFormErrorLabels().Select(label => label.GetProperty("htmlFor"))));
        }
コード例 #3
0
 public IEnumerable <(string name, string color)> GetMandatoryFieldsBorderColor()
 {
     //skipping radio buttons which doesn't have border
     return(MandatoryFields.Where(field => field.GetProperty("type") != "radio").Select(field => (name: field.GetProperty("name"), color: field.GetCssValue("border-color"))));
 }