private BLayer.Product InitalizeObject() { BLayer.Product obj = new BLayer.Product(); obj.ProductId = txtProductId.Text; obj.ProductName = txtProductName.Text; obj.MinQuantity = Convert.ToInt16(txtMinQty.Text); obj.ManufId = ddlProdManfacturer.SelectedValue; return(obj); }
protected void BtnDelete_Click(object sender, EventArgs e) { clsProduct Dal = new clsProduct(); BLayer.Product obj = InitalizeObject(); Dal.DeleteProduct(obj); LoadGrid(); ClearAll(); }