public bool UpdateSupplier() { string SupplierID = View.SupID; string SupplierName = View.SupName; string SupplierOrigin = View.Origin; bool SupplierStatus = true; Supplier sup = new Supplier(SupplierID, SupplierName, SupplierOrigin, SupplierStatus); return(SupplierModel.UpdateSupplier(sup)); }
protected void btnSubmit_Click(object sender, EventArgs e) { SupplierModel supplierModel = new SupplierModel(); Supplier supplier = new Supplier { Id = ID, ProductName = ddlProductId.SelectedValue, Email = txtEmail.Text, PhoneNumber = txtPhoneNumber.Text, Name = txtName.Text, }; lblResult.Text = supplierModel.UpdateSupplier(ID, supplier); }