示例#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();
            }
        }