/// <summary> /// 根据属性组ID更新属性组信息 /// </summary> /// <param name="model">属性组实体信息,不包括状态,排序</param> /// <returns>成功返回true,失败返回false</returns> /// <remarks>2013-06-27 唐永勤 创建</remarks> public override bool Update(PdAttributeGroup model) { int effect = Context.Update <PdAttributeGroup>("PdAttributeGroup", model) .AutoMap(x => x.SysNo, x => x.DisplayOrder, x => x.Status) .Where("sysno", model.SysNo) .Execute(); return(effect > 0); }
/// <summary> /// 添加属性组 /// </summary> /// <param name="model">属性组实体信息</param> /// <returns>返回新建记录的sysno</returns> /// <remarks>2013-06-27 唐永勤 创建</remarks> public override int Create(PdAttributeGroup model) { int sysno = 0; sysno = Context.Insert <PdAttributeGroup>("PdAttributeGroup", model) .AutoMap(x => x.SysNo) .ExecuteReturnLastId <int>("Sysno"); return(sysno); }
/// <summary> /// 获取指定编号的属性组信息 /// </summary> /// <param name="sysNo">属性组编号</param> /// <returns>属性组实体信息</returns> /// <remarks>2013-06-27 唐永勤 创建</remarks> public override PdAttributeGroup GetEntity(int sysNo) { PdAttributeGroup entity = Context.Select <PdAttributeGroup>("*") .From("PdAttributeGroup") .Where("sysno = @sysno") .Parameter("sysno", sysNo) .QuerySingle(); return(entity); }
/// <summary> /// 保存属性组信息 /// </summary> /// <param name="model">属性组实体信息</param> /// <param name="listAttributeSysNo">属性组包含属性列表</param> /// <returns>保存的结果信息</returns> /// <remarks>2013-07-03 唐永勤 创建</remarks> public Result SavePdAttributeGroup(PdAttributeGroup model, IList <int> listAttributeSysNo) { Result result = new Result(); if (model == null || string.IsNullOrEmpty(model.Name)) { result.StatusCode = -1; } else { //数据重复性检测 bool isExists = IPdAttributeGroupDao.Instance.IsExists(model.Name, model.BackEndName, model.SysNo); if (isExists) { result.StatusCode = -2; result.Message = "属性组名称和后台显示名称已存在"; return(result); } //数据操作 if (model.SysNo > 0) { result.StatusCode = (IPdAttributeGroupDao.Instance.Update(model) == true ? 1 : 0); } else { model.Status = 0;//初始化 model.SysNo = IPdAttributeGroupDao.Instance.Create(model); if (model.SysNo > 0) { result.StatusCode = 1; } } if (result.StatusCode == 1) { if (SetAttributes(model.SysNo, listAttributeSysNo) == false) { result.StatusCode = -3; result.Message = "属性组属性项保存失败"; } else { result.Status = true; } } } return(result); }
/// <summary> /// 判断重复数据--属性组 /// </summary> /// <param name="name">属性组名称</param> /// <param name="backName">后台显示名称</param> /// <param name="sysNo">属性组编号</param> /// <returns>存在返回true,不存在返回flase</returns> /// <remarks>2013-07-03 唐永勤 创建</remarks> public override bool IsExists(string name, string backName, int sysNo) { bool result = false; PdAttributeGroup entity = Context.Select <PdAttributeGroup>("*") .From("PdAttributeGroup") .Where("name= @name and BackEndName=@backName and sysno !=@sysno") .Parameter("name", name) .Parameter("backName", backName) .Parameter("sysno", sysNo) .QuerySingle(); if (entity != null && entity.SysNo > 0) { result = true; } return(result); }
private void AddBaseTaskObjectToList(List <BaseTask> listObject) { BaseTask bsAT = new BsArea(); BaseTask bsDP = new BsDeliveryPayment(); BaseTask bsPT = new BsPaymentType(); BaseTask bsCode = new BsCode(); BaseTask bsOrganization = new BsOrganization(); BaseTask bsOrganizationWarehouse = new BsOrganizationWarehouse(); BaseTask crCustomer = new CrCustomer(); BaseTask crCL = new CrCustomerLevel(); BaseTask crCQ = new CrCustomerQuestion(); BaseTask crRA = new CrReceiveAddress(); BaseTask dsMallType = new DsMallType(); BaseTask dsDealerLevel = new DsDealerLevel(); BaseTask feArticle = new FeArticle(); BaseTask feAC = new FeArticleCategory(); BaseTask feCS = new FeCommentSupport(); BaseTask fepc = new FeProductComment(); BaseTask fePCI = new FeProductCommentImage(); BaseTask fePCR = new FeProductCommentReply(); BaseTask feSearchKeyword = new FeSearchKeyword(); BaseTask feadvertgroup = new FeAdvertGroup(); BaseTask feadvertitem = new FeAdvertItem(); BaseTask feproductgroup = new FeProductGroup(); BaseTask feproductitem = new FeProductItem(); BaseTask fnIT = new FnInvoiceType(); BaseTask fninvoice = new FnInvoice(); BaseTask fnpv = new FnReceiptVoucher(); BaseTask fnReceiptVoucherItem = new FnReceiptVoucherItem(); BaseTask fnop = new FnOnlinePayment(); BaseTask fnPaymentVoucher = new FnPaymentVoucher(); BaseTask fnPaymentVoucherItem = new FnPaymentVoucherItem(); BaseTask lgDelivery = new LgDelivery(); BaseTask lgDI = new LgDeliveryItem(); BaseTask lgDS = new LgDeliveryScope(); BaseTask lgDT = new LgDeliveryType(); BaseTask lgDUC = new LgDeliveryUserCredit(); BaseTask lgPT = new LgPickupType(); BaseTask lgsettlement = new LgSettlement(); BaseTask lgSI = new LgSettlementItem(); BaseTask lgDeliveryPrintTemplate = new LgDeliveryPrintTemplate(); BaseTask pdAttribute = new PdAttribute(); BaseTask pdAG = new PdAttributeGroup(); BaseTask pdAGA = new PdAttributeGroupAssociation(); BaseTask pdAO = new PdAttributeOption(); BaseTask pdBrand = new PdBrand(); BaseTask pdCGA = new PdCatAttributeGroupAso(); BaseTask pdCategory = new PdCategory(); BaseTask pdCA = new PdCategoryAssociation(); BaseTask pdPrice = new PdPrice(); BaseTask pdProduct = new PdProduct(); BaseTask pdPA = new PdProductAssociation(); BaseTask pdProductAttribute = new PdProductAttribute(); BaseTask pdPI = new PdProductImage(); BaseTask pdTemplate = new PdTemplate(); BaseTask pdProductStatistics = new PdProductStatistics(); BaseTask soOrder = new SoOrder(); BaseTask soOrderItem = new SoOrderItem(); BaseTask soRA = new SoReceiveAddress(); BaseTask SyUG = new SyUserGroup(); BaseTask syGU = new SyGroupUser(); BaseTask syMenu = new SyMenu(); BaseTask syMenuPrivilege = new SyMenuPrivilege(); BaseTask syPrivilege = new SyPrivilege(); BaseTask syRole = new SyRole(); BaseTask syRoleMenu = new SyRoleMenu(); BaseTask syRolePrivilege = new SyRolePrivilege(); BaseTask syPermission = new SyPermission(); BaseTask syUser = new SyUser(); BaseTask syUW = new SyUserWarehouse(); BaseTask syMyMenu = new SyMyMenu(); BaseTask spcombo = new SpCombo(); BaseTask spComboItem = new SpComboItem(); BaseTask spcopon = new spcoupon(); BaseTask sqpromotion = new SPpromotion(); BaseTask spromotiongift = new SPpromotiongift(); BaseTask sppromotionoverlay = new SPpromotionoverlay(); BaseTask sppromotionrule = new SPpromotionrule(); BaseTask sppromotionrulecondition = new SPpromotionrulecondition(); BaseTask sppromotionrulekeyvalue = new SPpromotionrulekeyvalue(); BaseTask syTaskConfig = new SyTaskConfig(); BaseTask whStockOut = new WhStockOut(); BaseTask whStockOutItem = new WhstockOutItem(); BaseTask whwarehouse = new WhWarehouse(); BaseTask whwa = new WHwarehousearea(); BaseTask whwdy = new WHwarehouseDeliveryType(); BaseTask whWPT = new WhWarehousePickupType(); BaseTask whstockin = new WhStockIn(); BaseTask whstockinItem = new WHStockinItem(); BaseTask rcReturn = new RCReturn(); BaseTask rcReturnItem = new RcReturnItem(); listObject.Add(bsAT); listObject.Add(bsDP); listObject.Add(bsPT); listObject.Add(bsCode); listObject.Add(bsOrganization); listObject.Add(bsOrganizationWarehouse); listObject.Add(crCustomer); listObject.Add(crCL); listObject.Add(crCQ); listObject.Add(crRA); listObject.Add(dsMallType); listObject.Add(dsDealerLevel); listObject.Add(feArticle); listObject.Add(feAC); listObject.Add(feCS); listObject.Add(fePCI); listObject.Add(fePCR); listObject.Add(fepc); listObject.Add(feSearchKeyword); listObject.Add(feadvertgroup); listObject.Add(feadvertitem); listObject.Add(feproductgroup); listObject.Add(feproductitem); listObject.Add(fnIT); listObject.Add(fnpv); listObject.Add(fnReceiptVoucherItem); listObject.Add(fnop); listObject.Add(fninvoice); listObject.Add(fnPaymentVoucher); listObject.Add(fnPaymentVoucherItem); listObject.Add(lgDelivery); listObject.Add(lgDI); listObject.Add(lgDS); listObject.Add(lgDT); listObject.Add(lgPT); listObject.Add(lgsettlement); listObject.Add(lgSI); listObject.Add(lgDeliveryPrintTemplate); listObject.Add(pdAttribute); listObject.Add(pdAG); listObject.Add(pdAGA); listObject.Add(pdAO); listObject.Add(pdBrand); listObject.Add(pdCGA); listObject.Add(pdCategory); listObject.Add(pdCA); listObject.Add(pdPrice); listObject.Add(pdProduct); listObject.Add(pdPA); listObject.Add(pdProductAttribute); listObject.Add(pdTemplate); listObject.Add(pdProductStatistics); listObject.Add(soOrder); listObject.Add(soOrderItem); listObject.Add(spcombo); listObject.Add(spComboItem); listObject.Add(spcopon); listObject.Add(sqpromotion); listObject.Add(spromotiongift); //listObject.Add(sppromotionoverlay); listObject.Add(sppromotionrule); listObject.Add(sppromotionrulecondition); listObject.Add(sppromotionrulekeyvalue); listObject.Add(syGU); listObject.Add(syUW); listObject.Add(SyUG); listObject.Add(syMenu); listObject.Add(syUser); listObject.Add(syPermission); listObject.Add(syMenuPrivilege); listObject.Add(syPrivilege); listObject.Add(syRole); listObject.Add(syRoleMenu); listObject.Add(syRolePrivilege); listObject.Add(syMyMenu); listObject.Add(syTaskConfig); listObject.Add(whStockOut); listObject.Add(whStockOutItem); listObject.Add(whwarehouse); listObject.Add(whwa); listObject.Add(whwdy); listObject.Add(whWPT); listObject.Add(whstockin); listObject.Add(whstockinItem); listObject.Add(rcReturn); listObject.Add(rcReturnItem); listObject.Add(lgDUC); listObject.Add(pdPI); listObject.Add(soRA); }
/// <summary> /// 根据属性组编号更新属性组信息 /// </summary> /// <param name="model">属性组实体信息</param> /// <returns>成功返回true,失败返回false</returns> /// <remarks>2013-06-27 唐永勤 创建</remarks> public abstract bool Update(PdAttributeGroup model);
/// <summary> /// 添加属性组 /// </summary> /// <param name="model">属性组实体信息</param> /// <returns>返回新建记录的编号</returns> /// <remarks>2013-06-27 唐永勤 创建</remarks> public abstract int Create(PdAttributeGroup model);
/// <summary> /// 二期基础数据 /// </summary> /// <param name="listObject"></param> private void AddBaseTaskObject2ToList1(List <BaseTask> listObject) { BaseTask bsAT = new BsArea(); BaseTask crCustomer = new CrCustomer(); BaseTask crCL = new CrCustomerLevel(); BaseTask crCQ = new CrCustomerQuestion(); BaseTask crRA = new CrReceiveAddress(); BaseTask feArticle = new FeArticle(); BaseTask feAC = new FeArticleCategory(); BaseTask feCS = new FeCommentSupport(); BaseTask fepc = new FeProductComment(); BaseTask fePCI = new FeProductCommentImage(); BaseTask fePCR = new FeProductCommentReply(); BaseTask lgDS = new LgDeliveryScope(); BaseTask lgDUC = new LgDeliveryUserCredit(); BaseTask pdAttribute = new PdAttribute(); BaseTask pdAG = new PdAttributeGroup(); BaseTask pdAGA = new PdAttributeGroupAssociation(); BaseTask pdAO = new PdAttributeOption(); BaseTask pdBrand = new PdBrand(); BaseTask pdCGA = new PdCatAttributeGroupAso(); BaseTask pdCategory = new PdCategory(); BaseTask pdCA = new PdCategoryAssociation(); BaseTask pdPrice = new PdPrice(); BaseTask pdProduct = new PdProduct(); BaseTask pdPA = new PdProductAssociation(); BaseTask pdProductAttribute = new PdProductAttribute(); //BaseTask pdPI = new PdProductImage(); BaseTask pdTemplate = new PdTemplate(); BaseTask soRA = new SoReceiveAddress(); BaseTask syUser = new SyUser(); BaseTask syUW = new SyUserWarehouse(); BaseTask whwarehouse = new WhWarehouse(); BaseTask whwa = new WHwarehousearea(); listObject.Add(bsAT); listObject.Add(crCustomer); listObject.Add(crCL); listObject.Add(crCQ); listObject.Add(crRA); listObject.Add(feArticle); listObject.Add(feAC); listObject.Add(feCS); listObject.Add(fepc); listObject.Add(fePCI); listObject.Add(fePCR); listObject.Add(lgDS); listObject.Add(lgDUC); listObject.Add(pdAttribute); listObject.Add(pdAG); listObject.Add(pdAGA); listObject.Add(pdAO); listObject.Add(pdBrand); listObject.Add(pdCGA); listObject.Add(pdCategory); listObject.Add(pdCA); listObject.Add(pdPrice); listObject.Add(pdProduct); listObject.Add(pdPA); listObject.Add(pdProductAttribute); listObject.Add(pdTemplate); //listObject.Add(pdPI); listObject.Add(soRA); listObject.Add(syUW); listObject.Add(syUser); listObject.Add(whwarehouse); listObject.Add(whwa); }