protected void DB_Click(object sender, EventArgs e) { TableOperation retrieveOp = TableOperation.Retrieve <ContactEntity>(ECTTB.Text, ECNTB.Text); TableResult retrievedresult = table.Execute(retrieveOp); ContactEntity updaterecord = (ContactEntity)retrievedresult.Result; table.Execute(TableOperation.Delete(updaterecord)); Response.Redirect("Default.aspx"); }
protected void Update_Click(object sender, EventArgs e) { TableOperation retrieveOp = TableOperation.Retrieve <ContactEntity>("Family", "999999999"); TableResult retrievedresult = table.Execute(retrieveOp); ContactEntity updaterecord = (ContactEntity)retrievedresult.Result; updaterecord.FirstName = "Mani D"; table.Execute(TableOperation.InsertOrReplace(updaterecord)); Response.Redirect("Default.aspx"); }
protected void Submit_Click(object sender, EventArgs e) { String fn = FNTB.Text; String ln = LNTB.Text; String cn = CNTB.Text; String ct = CTDL.SelectedValue; ContactEntity ce = new ContactEntity(fn, ln, cn, ct); TableOperation insertOperation = TableOperation.Insert(ce); table.Execute(insertOperation); }
protected void RB_Click(object sender, EventArgs e) { TableOperation retrieveOp = TableOperation.Retrieve <ContactEntity>(ECTTB.Text, ECNTB.Text); TableResult retrievedresult = table.Execute(retrieveOp); ContactEntity updaterecord = (ContactEntity)retrievedresult.Result; updaterecord.FirstName = EFNTB.Text; updaterecord.LastName = ELNTB.Text; table.Execute(TableOperation.InsertOrReplace(updaterecord)); Response.Redirect("Default.aspx"); }