private tbldocDefTemplate Pack() { tbldocDefTemplate thing = new tbldocDefTemplate(TheThing.classDatabaseConnectionString); thing.Initialize(); thing.DocDefTemplateID = GetAsInteger(txtDocDefTemplateID.Text); thing.DocDefTypeId = GetAsInteger(txtDocDefTypeId.Text); thing.DocDefTypeSubId = GetAsInteger(txtDocDefTypeSubId.Text); thing.DocDefTemplateParID = GetAsInteger(txtDocDefTemplateParID.Text); thing.DocDefSecId = GetAsInteger(txtDocDefSecId.Text); thing.TType = txtTType.Text + ""; thing.TLabel = txtTLabel.Text + ""; thing.TLabelPosition = txtTLabelPosition.Text + ""; thing.TLabelFontWeight = txtTLabelFontWeight.Text + ""; thing.TableName = txtTableName.Text + ""; thing.TableColumnName = txtTableColumnName.Text + ""; thing.ValidationType = txtValidationType.Text + ""; thing.CustomParameters = txtCustomParameters.Text + ""; thing.TOrder = GetAsInteger(txtTOrder.Text); thing.LookupTypeId = GetAsInteger(txtLookupTypeId.Text); thing.Indent = GetAsInteger(txtIndent.Text); thing.TemplateCode = txtTemplateCode.Text + ""; thing.COPY = txtCOPY.Text + ""; return(thing); }
public tblDocDefTemplateUI(tbldocDefTemplate thing) { InitializeComponent(); TheThing = thing; Unpack(TheThing); }
private void Unpack(tbldocDefTemplate thing) { txtDocDefTemplateID.Text = thing.DocDefTemplateID.ToString() + ""; txtDocDefTypeId.Text = thing.DocDefTypeId.ToString() + ""; txtDocDefTypeSubId.Text = thing.DocDefTypeSubId.ToString() + ""; txtDocDefTemplateParID.Text = thing.DocDefTemplateParID.ToString() + ""; txtDocDefSecId.Text = thing.DocDefSecId.ToString() + ""; txtTType.Text = thing.TType + ""; txtTLabel.Text = thing.TLabel + ""; txtTLabelPosition.Text = thing.TLabelPosition + ""; txtTLabelFontWeight.Text = thing.TLabelFontWeight + ""; txtTableName.Text = thing.TableName + ""; txtTableColumnName.Text = thing.TableColumnName + ""; txtValidationType.Text = thing.ValidationType + ""; txtCustomParameters.Text = thing.CustomParameters + ""; txtTOrder.Text = thing.TOrder.ToString() + ""; txtLookupTypeId.Text = thing.LookupTypeId.ToString() + ""; txtIndent.Text = thing.Indent.ToString() + ""; txtTemplateCode.Text = thing.TemplateCode + ""; txtCOPY.Text = thing.COPY + ""; RefreshLOOKUPValues(); }
private void btnSave_Click(object sender, EventArgs e) { TheThing = Pack(); TheThing.Add(); this.Close(); }