예제 #1
0
        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");
        }
예제 #2
0
        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");
        }
예제 #3
0
        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);
        }
예제 #4
0
        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");
        }