public void TestMethod3() { PackageVO entity = new PackageVO(); entity.PackageName = "2015超级套餐"; entity.TotalPrice = 500.0M; entity.CreatedDate = DateTime.Now; entity.CreatorID = "001"; entity.LastModifiedDate = DateTime.Now; entity.LastModifierID = "002"; entity.LogicalStatus = 1; //VO to PO Mapper.CreateMap<PackageVO, PackagePO>(); PackageMgm pkgMgm = new PackageMgm(); pkgMgm.AddPackage(entity); }
private ReturnedData AddPkg(string pkgName,decimal pkgPrice) { ReturnedData data = new ReturnedData(); PackageMgm pkgMgm = new PackageMgm(); PackageVO pkg = new PackageVO(); pkg.PackageName = pkgName; pkg.TotalPrice = pkgPrice; pkg.CreatedDate = DateTime.Now; pkg.CreatorID = Emp.UserName; pkg.LastModifiedDate = DateTime.Now; pkg.LastModifierID = Emp.UserName; try { data.Data = pkgMgm.AddPackage(pkg); data.Success = true; data.Message = "套餐基本信息添加成功"; LogHandler.Info("用户:" + Emp.UserName + "于 "+pkg.CreatedDate.ToString()+" 添加套餐基本信息,项目名:" + pkgName); } catch (Exception ex) { data.Success = false; data.Message = "套餐基本信息添加失败"; data.Error = ex.ToString(); LogHandler.Error("套餐基本信息添加错误:" + ex.Message.ToString()); } return data; }