protected void btnSave_Click(object sender, EventArgs e) { Customer c = new Customer { CustomerID = Request.QueryString["id"], CompanyName = txtCompanyName.Text, ContactName = txtContactName.Text, Country = ddlCountry.SelectedValue, }; var solution = cl.UpdateCustomer(c); NorthwindHub.EditCustomer(c); }
protected void btnSave_Click(object sender, EventArgs e) { if (IsValid) { Customer c = new Customer(); c.CustomerID = txtId.Text; c.CompanyName = txtCompanyName.Text; c.ContactName = txtContactName.Text; c.Country = ddlCountry.SelectedValue; var x = cl.InsertCustomer(txtId.Text, c); Response.Redirect("~/Admin_Edit.aspx?Id=" + txtId.Text); NorthwindHub.AddCustomer(c); } }