Beispiel #1
0
        public IEnumerable <PurchaseOrderMDEntity> get(GetPurchaseOrderByID obj)
        {
            SqlCommand cmd = new SqlCommand("BOM_spFetchBOMDetails");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@p_PurchaseID", obj.PurchaseID);
            cmd.Parameters.AddWithValue("@p_MaterialType", obj.materialType);
            var locMas = _unitOfWork.DbLayer.GetEntityList <PurchaseOrderMDEntity>(cmd);

            return(locMas);
        }
 public HttpResponseMessage GetPurchaseOrderByID(GetPurchaseOrderByID obj)
 {
     try
     {
         var Department = _PurchaseOrderMasterservice.get(obj);
         return(Request.CreateResponse(HttpStatusCode.OK, Department));
     }
     catch (Exception ex)
     {
         throw new ApiDataException(1000, "Department Not Found", HttpStatusCode.NotFound);
     }
 }