private void loadCustomerDetails(int custId) { Customer objcust = DBManagement.getCustomerByID(custId); lblAddress1.Text = objcust.Address; lblAddress2.Text = objcust.City + ", " + objcust.State + " " + objcust.ZipCode; lblPhone.Text = objcust.Phone; lblEmail.Text = objcust.Email; }
protected void btnAddCList_Click(object sender, EventArgs e) { int custId = Convert.ToInt32(ddlCustomerList.SelectedValue); Customer objcust = DBManagement.getCustomerByID(custId); CustomerList objCustList = (CustomerList)Session["CustomerList"]; objCustList.AddItem(objcust); Session["CustomerList"] = objCustList; }