public List <PkgItemVO> GetItemsByPkgID(int pkgID) { List <PkgItemVO> result = new List <PkgItemVO>(); #region Mock PkgItemVO item1 = new PkgItemVO() { PackageItemID = 1, ConsumeCount = 12, ItemName = "整车外部彻底清洁" }; PkgItemVO item2 = new PkgItemVO() { PackageItemID = 2, ConsumeCount = 56, ItemName = "整车的除锈、防锈、防腐蚀处理" }; PkgItemVO item3 = new PkgItemVO() { PackageItemID = 3, ConsumeCount = 89, ItemName = "玻璃彻底保养护理" }; PkgItemVO item4 = new PkgItemVO() { PackageItemID = 4, ConsumeCount = 45, ItemName = "发动机系统的美容护理" }; PkgItemVO item5 = new PkgItemVO() { PackageItemID = 5, ConsumeCount = 23, ItemName = "漆面美容护理" }; PkgItemVO item6 = new PkgItemVO() { PackageItemID = 6, ConsumeCount = 85, ItemName = "保险杠、车裙、挡泥板、车灯、底盘等保养护理" }; result.Add(item1); result.Add(item2); result.Add(item3); result.Add(item4); result.Add(item5); result.Add(item6); #endregion return(result); }
public void TestMethod5() { List <PkgItemVO> entityList = new List <PkgItemVO>(); PkgItemVO entity = new PkgItemVO(); entity.ItemID = 1; entity.ItemName = "clean car"; entity.PackageID = 1; entity.PackageName = "2015超级套餐"; entity.ConsumeCount = 10; entity.CreatedDate = DateTime.Now; entity.CreatorID = "001"; entity.LastModifiedDate = DateTime.Now; entity.LastModifierID = "002"; entity.LogicalStatus = 1; PkgItemVO entity1 = new PkgItemVO(); entity1.ItemID = 2; entity1.ItemName = "peng qi"; entity1.PackageID = 1; entity1.PackageName = "2015超级套餐"; entity1.ConsumeCount = 20; entity1.CreatedDate = DateTime.Now; entity1.CreatorID = "001"; entity1.LastModifiedDate = DateTime.Now; entity1.LastModifierID = "002"; entity1.LogicalStatus = 1; entityList.Add(entity); entityList.Add(entity1); //VO to PO Mapper.CreateMap <PkgItemVO, PackageItemMappingPO>(); PkgItemsMgm pkgItemsMgm = new PkgItemsMgm(); pkgItemsMgm.AddPkgItems(entityList); }
public JsonResult AddPkgItem() { ReturnedData data = new ReturnedData(); try { int pkItemId = NullHelper.Convert <int>(Request["pkItemId"], 0); int pkgid = NullHelper.Convert <int>(Request["pkgId"], 0); int conNum = NullHelper.Convert <int>(Request["conNum"], 0); string pkgName = NullHelper.Convert <string>(Request["pkgName"], ""); string itemName = NullHelper.Convert <string>(Request["itemName"], ""); PkgItemsMgm pkgItMgm = new PkgItemsMgm(); PkgItemVO pkgItem = new PkgItemVO(); pkgItem.ItemID = pkItemId; pkgItem.PackageID = pkgid; pkgItem.ConsumeCount = conNum; pkgItem.CreatedDate = DateTime.Now; pkgItem.CreatorID = Emp.UserName; pkgItem.LastModifiedDate = DateTime.Now; pkgItem.LastModifierID = Emp.UserName; pkgItem.ItemName = itemName; pkgItMgm.AddPkgItem(pkgItem); data.Success = true; data.Message = "套餐消费项目添加成功"; LogHandler.Info("用户:" + Emp.UserName + "于 " + DateTime.Now.ToString() + " 为套餐:" + pkgName + " 添加消费项目:" + itemName); } catch (Exception ex) { data.Success = false; data.Message = "套餐消费项目添加失败"; data.Error = ex.ToString(); LogHandler.Error(ex.Message.ToString()); } return(Json(data, JsonRequestBehavior.AllowGet)); }
public void EditPkgItem(PkgItemVO pkgItem) { throw new NotImplementedException(); }