コード例 #1
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns>新增记录编号</returns>
 /// <remarks>2013-08-21  朱成果 创建</remarks>
 public override int Insert(SpCombo entity)
 {
     entity.SysNo = Context.Insert("SpCombo", entity)
                    .AutoMap(o => o.SysNo)
                    .ExecuteReturnLastId <int>("SysNo");
     return(entity.SysNo);
 }
コード例 #2
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns></returns>
 /// <remarks>2013-08-21  朱成果 创建</remarks>
 public override void Update(SpCombo entity)
 {
     if (entity.AuditDate == DateTime.MinValue)
     {
         entity.AuditDate = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue;
     }
     Context.Update("SpCombo", entity)
     .AutoMap(o => o.SysNo)
     .Where("SysNo", entity.SysNo)
     .Execute();
 }
コード例 #3
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="entity"数据表实体</param>
 /// <returns>数据表实体(带编号)</returns>
 /// <remarks>2016-1-15 王耀发 创建</remarks>
 public override SpCombo InsertEntity(SpCombo entity)
 {
     if (entity.AuditDate == DateTime.MinValue)
     {
         entity.AuditDate = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue;
     }
     entity.SysNo = Context.Insert("SpCombo", entity)
                    .AutoMap(o => o.SysNo)
                    .ExecuteReturnLastId <int>("SysNo");
     return(entity);
 }
コード例 #4
0
        /// <summary>
        /// 审核该套餐
        /// </summary>
        /// <param name="model"></param>
        /// <param name="spComboItemList"></param>
        /// <returns></returns>
        /// <remarks>2016-1-15 王耀发 创建</remarks>
        public Result Audit(SpCombo model, IList <SpComboItem> spComboItemList, SyUser user)
        {
            var res = new Result();

            if (model.SysNo > 0)
            {
                #region 修改

                var upModel = ISpComboDao.Instance.GetEntity(model.SysNo);
                upModel.PromotionSysNo = model.PromotionSysNo;
                upModel.Title          = model.Title;
                upModel.StartTime      = model.StartTime;
                upModel.EndTime        = model.EndTime;
                upModel.ComboQuantity  = model.ComboQuantity;
                upModel.SaleQuantity   = model.SaleQuantity;
                upModel.Status         = model.Status;
                upModel.SysNo          = model.SysNo;
                upModel.AuditorSysNo   = user.SysNo;
                upModel.AuditDate      = DateTime.Now;
                upModel.Status         = (int)PromotionStatus.组合套餐状态.已审核;
                upModel.LastUpdateBy   = user.SysNo;
                upModel.LastUpdateDate = DateTime.Now;
                ISpComboDao.Instance.Update(upModel); //修改
                if (model.SysNo > 0)                  //添加子表
                {
                    ISpComboItemDao.Instance.Delete(model.SysNo);
                    if (spComboItemList != null)
                    {
                        foreach (var item in spComboItemList)
                        {
                            var m = new SpComboItem
                            {
                                ComboSysNo     = model.SysNo,
                                ProductSysNo   = item.ProductSysNo,
                                ProductName    = item.ProductName,
                                DiscountAmount = item.DiscountAmount,
                                IsMaster       = item.IsMaster
                            };
                            ISpComboItemDao.Instance.Insert(m);
                        }
                    }
                    res.Status = true;
                }
                #endregion
            }
            return(res);
        }
コード例 #5
0
ファイル: FrmImportData.cs プロジェクト: KqSMea8/HS.Admin
        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);
        }
コード例 #6
0
        /// <summary>
        /// 保存组合套餐信息
        /// </summary>
        /// <param name="model">组合套餐实体</param>
        /// <param name="gsGroupShoppingItemList">组合套餐商品列表</param>
        /// <returns>操作是否成功</returns>
        /// <remarks>2016-1-15 王耀发 创建</remarks>
        public Result Save(SpCombo model, IList <SpComboItem> spComboItemList, SyUser user)
        {
            var res = new Result();

            if (model.SysNo > 0)
            {
                #region 修改

                var upModel = ISpComboDao.Instance.GetEntity(model.SysNo);
                upModel.PromotionSysNo = model.PromotionSysNo;
                upModel.Title          = model.Title;
                upModel.WarehouseSysNo = model.WarehouseSysNo;
                upModel.DealerSysNo    = model.DealerSysNo;
                upModel.StartTime      = model.StartTime;
                upModel.EndTime        = model.EndTime;
                upModel.ComboQuantity  = model.ComboQuantity;
                upModel.SaleQuantity   = model.SaleQuantity;
                upModel.Status         = model.Status;
                upModel.SysNo          = model.SysNo;
                upModel.AuditorSysNo   = model.AuditorSysNo;
                upModel.AuditDate      = model.AuditDate;
                upModel.LastUpdateBy   = user.SysNo;
                upModel.LastUpdateDate = DateTime.Now;
                ISpComboDao.Instance.Update(upModel); //修改
                if (model.SysNo > 0)                  //添加子表
                {
                    ISpComboItemDao.Instance.Delete(model.SysNo);
                    if (spComboItemList != null)
                    {
                        foreach (var item in spComboItemList)
                        {
                            var m = new SpComboItem
                            {
                                ComboSysNo     = model.SysNo,
                                ProductSysNo   = item.ProductSysNo,
                                ProductName    = item.ProductName,
                                DiscountAmount = item.DiscountAmount,
                                IsMaster       = item.IsMaster
                            };
                            ISpComboItemDao.Instance.Insert(m);
                        }
                    }
                    res.Status = true;
                }
                #endregion
            }
            else //新增
            {
                if (ISpComboItemDao.Instance.IsRepeatSpCombo(model.DealerSysNo, model.WarehouseSysNo, model.Title) > 0)
                {
                    res.Status  = false;
                    res.Message = "此组合套餐名称不能重复,请修改!";
                }
                else
                {
                    #region 新增
                    model.LastUpdateBy   = user.SysNo;
                    model.LastUpdateDate = DateTime.Now;
                    model.CreatedBy      = user.SysNo;
                    model.CreatedDate    = DateTime.Now;
                    model.Status         = (int)PromotionStatus.组合套餐状态.待审核;
                    model = ISpComboDao.Instance.InsertEntity(model);
                    if (model.SysNo > 0) //添加菜单权限
                    {
                        if (spComboItemList != null)
                        {
                            foreach (var item in spComboItemList)
                            {
                                var m = new SpComboItem
                                {
                                    ComboSysNo     = model.SysNo,
                                    ProductSysNo   = item.ProductSysNo,
                                    ProductName    = item.ProductName,
                                    DiscountAmount = item.DiscountAmount,
                                    IsMaster       = item.IsMaster
                                };
                                ISpComboItemDao.Instance.Insert(m);
                            }
                        }
                        res.Status = true;
                    }
                    #endregion
                }
            }
            return(res);
        }
コード例 #7
0
        /// <summary>
        /// 添加三期基础任务对象
        /// </summary>
        /// <param name="listObject"></param>
        private void AddBaseTaskObject3ToList(List <BaseTask> listObject)
        {
            BaseTask bsDP                    = new BsDeliveryPayment();
            BaseTask bsPT                    = new BsPaymentType();
            BaseTask bsCode                  = new BsCode();
            BaseTask bsOrganization          = new BsOrganization();
            BaseTask bsOrganizationWarehouse = new BsOrganizationWarehouse();

            BaseTask dsMallType    = new DsMallType();
            BaseTask dsDealerLevel = new DsDealerLevel();

            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 lgDT = new LgDeliveryType();
            BaseTask lgPT = new LgPickupType();
            BaseTask lgDeliveryPrintTemplate = new LgDeliveryPrintTemplate();

            BaseTask pdProductStatistics = new PdProductStatistics();

            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 syMyMenu        = new SyMyMenu();
            BaseTask syTaskConfig    = new SyTaskConfig();

            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 whwdy = new WHwarehouseDeliveryType();
            BaseTask whWPT = new WhWarehousePickupType();

            listObject.Add(bsDP);
            listObject.Add(bsPT);
            listObject.Add(bsCode);
            listObject.Add(bsOrganization);
            listObject.Add(bsOrganizationWarehouse);

            listObject.Add(dsMallType);
            listObject.Add(dsDealerLevel);

            listObject.Add(feSearchKeyword);
            listObject.Add(feadvertgroup);
            listObject.Add(feadvertitem);
            listObject.Add(feproductgroup);
            listObject.Add(feproductitem);

            listObject.Add(fnIT);

            listObject.Add(lgDT);
            listObject.Add(lgPT);
            listObject.Add(lgDeliveryPrintTemplate);

            listObject.Add(pdProductStatistics);

            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(SyUG);
            listObject.Add(syMenu);
            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(whwdy);
            listObject.Add(whWPT);
        }
コード例 #8
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns></returns>
 /// <remarks>2013-08-21  朱成果 创建</remarks>
 public abstract void Update(SpCombo entity);
コード例 #9
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="entity"数据表实体</param>
 /// <returns>数据表实体(带编号)</returns>
 /// <remarks>2016-1-15 王耀发 创建</remarks>
 public abstract SpCombo InsertEntity(SpCombo entity);
コード例 #10
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns>新增记录编号</returns>
 /// <remarks>2013-08-21  朱成果 创建</remarks>
 public abstract int Insert(SpCombo entity);