nHydrate.Generator.Forms.TableCodeFacadeUpdateForm.TableCodeFacadeUpdateForm C# (CSharp) Method

TableCodeFacadeUpdateForm() public method

public TableCodeFacadeUpdateForm ( TableCollection tableCollection, FieldSettingConstants fieldSetting ) : System
tableCollection TableCollection
fieldSetting FieldSettingConstants
return System
		public TableCodeFacadeUpdateForm(TableCollection tableCollection, FieldSettingConstants fieldSetting)
			: this()
		{
			_tableCollection = tableCollection;
			_fieldSetting = fieldSetting;

			if (_fieldSetting == FieldSettingConstants.Name)
			{
				this.Text = "Update Entity";
			}
			else if (_fieldSetting == FieldSettingConstants.CodeFacade)
			{
				this.Text = "Update CodeFacade";
				cmdRemoveAll.Visible = true;
			}

			try
			{
				var cacheFile = new ModelCacheFile(((ModelRoot)tableCollection.Root).GeneratorProject);
				if (!string.IsNullOrEmpty(cacheFile.TableFacadeSettings))
				{
					var document = new XmlDocument();
					document.LoadXml(cacheFile.TableFacadeSettings);
					var containerNode = document.DocumentElement.ChildNodes[0];
					optPrefix.Checked = XmlHelper.GetAttributeValue(containerNode, "prefixChecked", optPrefix.Checked);
					txtPrefix.Text = XmlHelper.GetAttributeValue(containerNode, "prefix", txtPrefix.Text);
					chkReplaceText.Checked = XmlHelper.GetAttributeValue(containerNode, "replaceText", chkReplaceText.Checked);
					txtReplaceSource.Text = XmlHelper.GetAttributeValue(containerNode, "replaceSource", txtReplaceSource.Text);
					txtReplaceTarget.Text = XmlHelper.GetAttributeValue(containerNode, "replaceTarget", txtReplaceTarget.Text);
					optUpcase.Checked = XmlHelper.GetAttributeValue(containerNode, "upcase", optUpcase.Checked);
					optUnderscore.Checked = XmlHelper.GetAttributeValue(containerNode, "underscore", optUnderscore.Checked);
					chkSkip2Caps.Checked = XmlHelper.GetAttributeValue(containerNode, "TwoCaps", chkSkip2Caps.Checked);
				}
			}
			catch (Exception ex)
			{
				throw;
			}

			this.UpdateForm();
		}

Same methods

TableCodeFacadeUpdateForm::TableCodeFacadeUpdateForm ( ) : System