コード例 #1
0
 public int AddVerificationNotesToRejectedProduct(ProductVerificationModel verificationModel)
 {
     try
     {
         CommandObj.CommandText = "UDSP_AddVerificationNotesToRejectedProduct";
         CommandObj.CommandType = CommandType.StoredProcedure;
         CommandObj.Parameters.AddWithValue("@Notes", verificationModel.Notes);
         CommandObj.Parameters.AddWithValue("@RejectionId", verificationModel.RejectionId);
         CommandObj.Parameters.AddWithValue("@VerifiedByUserId", verificationModel.VerifiedByUserId);
         CommandObj.Parameters.AddWithValue("@PassOrFailedStatus", verificationModel.QcPassorFailedStatus);
         CommandObj.Parameters.Add("@RowAffected", SqlDbType.Int);
         CommandObj.Parameters["@RowAffected"].Direction = ParameterDirection.Output;
         ConnectionObj.Open();
         CommandObj.ExecuteNonQuery();
         var rowAffected = Convert.ToInt32(CommandObj.Parameters["@RowAffected"].Value);
         return(rowAffected);
     }
     catch (Exception exception)
     {
         throw new Exception("Could not add verification notes to rejected product", exception);
     }
     finally
     {
         CommandObj.Dispose();
         CommandObj.Parameters.Clear();
         ConnectionObj.Close();
     }
 }
コード例 #2
0
        public JsonResult AddVerificationNotes(long rejectionId, string notes, int passfailedStatus)
        {
            var user = (ViewUser)Session["user"];
            var verificationModel = new ProductVerificationModel
            {
                Notes = notes,
                QcPassorFailedStatus = passfailedStatus,
                RejectionId          = rejectionId,
                VerifiedByUserId     = user.UserId
            };
            SuccessErrorModel model = new SuccessErrorModel();
            bool result             = _iProductionQcManager.AddVerificationNotesToRejectedProduct(verificationModel);

            model.Message = result ? "Added Successfully" : "Failed to Add qc notes";
            return(Json(model, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public bool AddVerificationNotesToRejectedProduct(ProductVerificationModel verificationModel)
        {
            int rowAffected = _iProductionQcGateway.AddVerificationNotesToRejectedProduct(verificationModel);

            return(rowAffected > 0);
        }