Пример #1
0
        public OpResult StoreSupplierQualifiedCertificateTest(
            [PexAssumeUnderTest] SupplierQualifiedCertificateCrud target,
            SupplierQualifiedCertificateModel model
            )
        {
            OpResult result = target.StoreSupplierQualifiedCertificate(model);

            return(result);
            // TODO: 将断言添加到 方法 SupplierQualifiedCertificateCrudTest.StoreSupplierQualifiedCertificateTest(SupplierQualifiedCertificateCrud, SupplierQualifiedCertificateModel)
        }
 /// <summary>
 /// 保存供应商证书信息
 /// </summary>
 /// <param name="model">实体</param>
 /// <param name="rootPath">根路经</param>
 /// <returns></returns>
 public OpResult SaveSupplierCertificateData(SupplierQualifiedCertificateModel model, string siteRootPath)
 {
     try
     {
         if (model != null && model.OpSign == OpMode.DeleteFile)//如果删除文件则启文件相应的删除处理
         {
             return(SupplierCrudFactory.SupplierQualifiedCertificateCrud.DeleteSupplierQualifiedCertificateFile(model, siteRootPath));
         }
         ///
         return(SupplierCrudFactory.SupplierQualifiedCertificateCrud.UpdateQualifiedCertificateFile(model, siteRootPath));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
        private SupplierQualifiedCertificateModel CreateSupplierCertificateModel(InPutSupplieCertificateInfoModel model)
        {
            SupplierQualifiedCertificateModel m = new SupplierQualifiedCertificateModel()
            {
                SupplierId          = model.SupplierId,
                EligibleCertificate = model.EligibleCertificate,
                CertificateFileName = model.CertificateFileName,
                FilePath            = model.FilePath,
                DateOfCertificate   = model.DateOfCertificate.ToDate(),
                IsEfficacy          = "是",
                OpSign   = model.OpSign,
                OpPerson = model.OpPerson,
            };

            return(m);
        }
Пример #4
0
        public JsonResult DelPurSupplierCertificateFile(SupplierQualifiedCertificateModel entity)
        {
            var datas = PurchaseService.PurSupplierManager.CertificateManager.SaveSupplierCertificateData(entity, this.SiteRootPath);

            return(Json(datas));
        }