Exemplo n.º 1
0
        public frmTblLookupUI(tblLookup thing)
        {
            InitializeComponent();

            TheThing = thing;

            Unpack(TheThing);
        }
Exemplo n.º 2
0
 private void Unpack(tblLookup thing)
 {
     txtLookupId.Text         = thing.LookupId.ToString() + "";
     txtLookupType.Text       = thing.LookupType + "";
     txtLongDesc.Text         = thing.LongDesc + "";
     txtShortDesc.Text        = thing.ShortDesc + "";
     txtActive.Text           = thing.Active + "";
     txtSortOrder.Text        = thing.SortOrder.ToString() + "";
     txtCoverageType.Text     = thing.CoverageType + "";
     txtLookupTypeId.Text     = thing.LookupTypeId.ToString() + "";
     txtLookupTypeId_Sub.Text = thing.LookupTypeId_Sub.ToString() + "";
     txtParm.Text             = thing.Parm + "";
 }
Exemplo n.º 3
0
        public frmTblLookupUI(tblLookup thing, bool foradd)
        {
            InitializeComponent();

            TheThing = thing;

            Unpack(TheThing);

            if (foradd)
            {
                txtLookupType.ReadOnly = true;
                txtSortOrder.ReadOnly  = true;
            }
        }
Exemplo n.º 4
0
        private tblLookup Pack()
        {
            tblLookup thing = new tblLookup(TheThing.classDatabaseConnectionString);

            thing.LookupId         = GetAsInteger(txtLookupId.Text);
            thing.LookupType       = txtLookupType.Text + "";
            thing.LongDesc         = txtLongDesc.Text + "";
            thing.ShortDesc        = txtShortDesc.Text + "";
            thing.Active           = txtActive.Text + "";
            thing.SortOrder        = GetAsInteger(txtSortOrder.Text);
            thing.CoverageType     = txtCoverageType.Text + "";
            thing.LookupTypeId     = GetAsInteger(txtLookupTypeId.Text);
            thing.LookupTypeId_Sub = GetAsInteger(txtLookupTypeId_Sub.Text);
            thing.Parm             = txtParm.Text + "";

            return(thing);
        }
Exemplo n.º 5
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     TheThing = Pack();
     TheThing.Add();
     this.Close();
 }