Exemplo n.º 1
0
 public bool Put([FromBody] UpdateQCEntity UpdateQCEntity)
 {
     try
     {
         if (UpdateQCEntity.QCID > 0)
         {
             return(_QualityCheckService.Update(UpdateQCEntity.QCID, UpdateQCEntity));
         }
     }
     catch (Exception ex)
     {
         throw new ApiDataException(1000, "Product not found", HttpStatusCode.NotFound);
     }
     return(false);
 }
Exemplo n.º 2
0
        public bool Update(int QCID, UpdateQCEntity obj)
        {
            bool       res = false;
            SqlCommand cmd = new SqlCommand("QC_spSaveQCDetails");

            //SqlCommand cmd = new SqlCommand("PO_spSavePurchaseOrder");
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@p_QCID", obj.QCID);
            cmd.Parameters.AddWithValue("@p_QCCode", obj.QCCode);
            cmd.Parameters.AddWithValue("@p_QCName", obj.QCName);
            cmd.Parameters.AddWithValue("@p_PrdID", obj.PrdID);
            cmd.Parameters.AddWithValue("@p_ActionBy", obj.ActionBy);
            cmd.Parameters.AddWithValue("@p_IsActive", obj.IsActive);
            cmd.Parameters.AddWithValue("@p_QCDetails", obj.QCDetails);
            var locMas = _unitOfWork.DbLayer.ExecuteNonQuery(cmd);

            if (locMas != Int32.MaxValue)
            {
                res = true;
            }
            return(res);
        }