public int GetAvailableQty(string itemno) { var ta = new DsInventoryTableAdapters.STOCKMASTERTableAdapter {Connection = {ConnectionString = _constr}}; return ta.GetSaleStockByItemNo(itemno, Utils.Company) ?? 0; }