public void InsertData_Test() { StoreBusinessLayer.StoreBusinessLayer oStoreBusinessLayer = new StoreBusinessLayer.StoreBusinessLayer(); StoreInventoryBL oStoreInventoryBL = new StoreInventoryBL(); //Data Values oStoreInventoryBL.ContentName = "Test Data"; oStoreInventoryBL.ContentQuantity = 10; int rowCount = oStoreBusinessLayer.InsertDataDL(oStoreInventoryBL); Assert.GreaterOrEqual(rowCount, 1); }
/// <summary> /// Insert Data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void buttonInsertData_Click(object sender, EventArgs e) { string contentName = textBoxContentName.Text; int contentQuantity = Convert.ToInt32(textBoxContentQuantity.Text); StoreBusinessLayer.StoreBusinessLayer oStoreBusinessLayer = new StoreBusinessLayer.StoreBusinessLayer(); StoreInventoryBL oStoreInventoryBL = new StoreInventoryBL(); oStoreInventoryBL.ContentName = contentName; oStoreInventoryBL.ContentQuantity = contentQuantity; int rowCount = oStoreBusinessLayer.InsertDataDL(oStoreInventoryBL); if (rowCount >= 1) { ReadData(); } }