public void AddProduct() { CSMSService.CSMSWebservice CSMSService = new CSMSService.CSMSWebservice(); bool status = rbtStatus_.SelectedValue == "Available" ? true : false; CSMSService.ManagerAddProduct(txtProductName_.Text, int.Parse(DropDownList1.SelectedValue), float.Parse(txtImportPrice_.Text), float.Parse(txtUnitPrice_.Text), int.Parse(txtProductQuantity_.Text), status); }
public void AddProduct() { int productid = int.Parse(txtProductID.Text); int categoryid = int.Parse(ddlCategories.SelectedValue); float importpirce = float.Parse(txtProductImportPrice.Text); float unitprice = float.Parse(txtProductUnitPrice.Text); int quantity = int.Parse(txtProductQuantity.Text); bool status = false; if (rdoProductStatus.SelectedValue.Equals("True")) { status = true; } else { status = false; } CSMSService.CSMSWebservice CSMSService = new CSMSService.CSMSWebservice(); CSMSService.ManagerAddProduct(productid, txtProductName.Text, categoryid, importpirce, unitprice, quantity, status); }