public void loadIdentification(int id) { adminTableAdapters.GetIdentificationsTableAdapter identification = new adminTableAdapters.GetIdentificationsTableAdapter(); admin.GetIdentificationsDataTable tblID = identification.GetIdentificationDetails(id); if (tblID.Rows.Count > 0) { txtDescription.Value = tblID[0].datDescription.ToString(); this.editskip.Value = "2"; } }
protected void btnSave_Click(object sender, EventArgs e) { adminTableAdapters.GetIdentificationsTableAdapter identification = new adminTableAdapters.GetIdentificationsTableAdapter(); if (!(type == "update")) { identification.InsertIdentification(txtDescription.Value.Trim()); } else if (type == "update") { identification.UpdateIdentification(txtDescription.Value.Trim(), id); } Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "iedit")); }