public HttpResponseMessage GetBatchByProduct(int productId, int companyId, int branchId)
        {
            var purchase = _batchService.GetBatchByProduct(@"SELECT pd.BatchID,b.BatchName 
                                                            FROM PurchaseDetails pd 
                                                            INNER JOIN Batch  b ON pd.BatchId = b.BatchId 
                                                            Where pd.ProductId={0} 
                                                            AND b.CompanyId={1} 
                                                            AND b.BranchId ={2} 
                                                            AND  b.status=1  ", productId, companyId, branchId).ToList();

            return(Request.CreateResponse(HttpStatusCode.OK, purchase));
        }