Esempio n. 1
0
        public Model.VO.PackageVO GetPackageByID(int id)
        {
            PackageData packageData = new PackageData();
            PackageVO packageVO = new PackageVO();
            PackagePO packagePO = packageData.GetPackageByID(id);
            packageVO = Mapper.Map<PackagePO, PackageVO>(packagePO);

            return packageVO;
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public PackageVO GetPackageByID(int id)
 {
     PackageVO package = new PackageVO()
     {
         PackageID = 1,
         PackageName = "车身美容套餐",
         TotalPrice = 345
     };
     return package;
 }
Esempio n. 4
0
 public void AddPackage(PackageVO package)
 {
     throw new NotImplementedException();
 }
Esempio n. 5
0
        public List<PackageVO> GetAllPackages()
        {
            List<PackageVO> result = new List<PackageVO>();

            #region Mock
            PackageVO item1 = new PackageVO()
            {
                PackageID = 1,
                PackageName = "车身美容套餐",
                TotalPrice = 345
            };

            PackageVO item2 = new PackageVO()
            {
                PackageID = 2,
                PackageName = "内部美容套餐",
                TotalPrice = 321
            };

            PackageVO item3 = new PackageVO()
            {
                PackageID = 3,
                PackageName = "漆面处理套餐",
                TotalPrice = 453
            };

            PackageVO item4 = new PackageVO()
            {
                PackageID = 4,
                PackageName = "汽车防护套餐",
                TotalPrice = 231
            };

            PackageVO item5 = new PackageVO()
            {
                PackageID = 5,
                PackageName = "杀菌消毒套餐",
                TotalPrice = 231
            };

            result.Add(item1);
            result.Add(item2);
            result.Add(item3);
            result.Add(item4);
            result.Add(item5);
            #endregion

            return result;
        }
Esempio n. 6
0
 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;
 }