コード例 #1
0
        protected void EditButtonClick(object sender, CommandEventArgs e)
        {
            tableDiv.Visible = true;

            //sally added
            //this.repeaterDiv.Visible = false;

            tblAddBtn.Visible = false;
            updateBtn.Visible = true;

            int          lkpId = int.Parse(e.CommandName);
            LookupCodeDa da    = new LookupCodeDa();
            DataSet      ds    = da.GetLookupCodesRecord(lkpId);
            DataRow      dr    = ds.Tables[0].Rows[0];

            lkpOrder.Value       = dr[LookupCode.LkpOrder].ToString();
            lkpCodeId.Value      = dr["LookupCodeId"].ToString();
            lkpFieldName.Value   = dr["LkpFieldName"].ToString();
            lkpValue.Value       = dr["LkpCode"].ToString();
            lkpDescription.Value = dr["LkpDescription"].ToString();
            lkpSuppress.Checked  = bool.Parse(dr["LkpSuppress"].ToString());
        }