Exemple #1
0
        /// <summary>
        /// 新增(纱线从表)
        /// </summary>
        /// <param name="p_BE">要新增的实体</param>
        /// <param name="sqlTrans">事务类</param>
        public void RAddYarn(BaseEntity p_BE, BaseEntity[] p_BE2, IDBTransAccess sqlTrans)
        {
            try
            {
                this.CheckCorrect(p_BE);

                Item entity = (Item)p_BE;
                this.RAdd(p_BE, sqlTrans);

                for (int i = 0; i < p_BE2.Length; i++)
                {
                    ItemDtsRule rule          = new ItemDtsRule();
                    ItemDts     entityItemDts = (ItemDts)p_BE2[i];
                    entityItemDts.MainID = entity.ID;
                    entityItemDts.Seq    = i + 1;
                    rule.RAdd(entityItemDts, sqlTrans);
                }

                ;
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }
Exemple #2
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="p_BE">要新增的实体</param>
        /// <param name="p_BE3">原料</param>
        /// <param name="p_BE4">颜色</param>
        /// <param name="p_BE5">类别</param>
        /// <param name="p_BE6">物理指标</param>
        /// <param name="p_BE7">替代白坯</param>
        /// <param name="p_BE8">工厂编码及报价</param>
        /// <param name="sqlTrans">事务类</param>
        public void RUpdate(BaseEntity p_BE, BaseEntity[] p_BE3, BaseEntity[] p_BE4, BaseEntity[] p_BE5, BaseEntity[] p_BE6, BaseEntity[] p_BE7, BaseEntity[] p_BE8, IDBTransAccess sqlTrans)
        {
            try
            {
                this.CheckCorrect(p_BE);
                Item entity = (Item)p_BE;

                this.RUpdate(entity, sqlTrans);

                ItemDtsRule rule1 = new ItemDtsRule();
                rule1.RSave(entity, p_BE3, sqlTrans);



                ItemColorDtsRule rule2 = new ItemColorDtsRule();
                rule2.RSave(entity, p_BE4, sqlTrans);


                ItemLBDtsRule rule3 = new ItemLBDtsRule();
                rule3.RSave(entity, p_BE5, sqlTrans);


                if (p_BE6 != null)
                {
                    ItemCheckStandardPhyRule rule4 = new ItemCheckStandardPhyRule();

                    rule4.RSave(entity, p_BE6, sqlTrans);
                }

                if (p_BE7 != null)
                {
                    ItemGreyFabReplaceRule rule4 = new ItemGreyFabReplaceRule();

                    rule4.RSave(entity, p_BE7, sqlTrans);
                }

                if (p_BE8 != null)
                {
                    ItemCodeFacDtsRule rule5 = new ItemCodeFacDtsRule();

                    rule5.RSave(entity, p_BE8, sqlTrans);
                }
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }
Exemple #3
0
        /// <summary>
        /// 修改(纱线从表)
        /// </summary>
        /// <param name="p_BE">要修改的实体</param>
        /// <param name="sqlTrans">事务类</param>
        public void RUpdateYarn(BaseEntity p_BE, BaseEntity[] p_BE2, IDBTransAccess sqlTrans)
        {
            try
            {
                this.CheckCorrect(p_BE);
                Item entity = (Item)p_BE;

                this.RUpdate(entity, sqlTrans);

                ItemDtsRule rule1 = new ItemDtsRule();
                rule1.RSave(entity, p_BE2, sqlTrans);
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }
Exemple #4
0
        /// <summary>
        /// 新增(传入事务处理)
        /// </summary>
        /// <param name="p_BE">要新增的实体</param>
        /// <param name="p_BE3">原料</param>
        /// <param name="p_BE4">颜色</param>
        /// <param name="p_BE5">类别</param>
        /// <param name="p_BE6">物理指标</param>
        /// <param name="p_BE7">替代白坯</param>
        /// <param name="p_BE8">工厂编码及报价</param>
        /// <param name="sqlTrans">事务类</param>
        public void RAdd(BaseEntity p_BE, BaseEntity[] p_BE3, BaseEntity[] p_BE4, BaseEntity[] p_BE5, BaseEntity[] p_BE6, BaseEntity[] p_BE7, BaseEntity[] p_BE8, IDBTransAccess sqlTrans)
        {
            try
            {
                this.CheckCorrect(p_BE);

                Item entity = (Item)p_BE;
                this.RAdd(p_BE, sqlTrans);

                for (int i = 0; i < p_BE3.Length; i++)
                {
                    ItemDtsRule rule          = new ItemDtsRule();
                    ItemDts     entityItemDts = (ItemDts)p_BE3[i];
                    entityItemDts.MainID = entity.ID;
                    entityItemDts.Seq    = i + 1;
                    rule.RAdd(entityItemDts, sqlTrans);
                }

                for (int i = 0; i < p_BE4.Length; i++)
                {
                    ItemColorDtsRule rule = new ItemColorDtsRule();
                    ItemColorDts     entityItemColorDts = (ItemColorDts)p_BE4[i];
                    entityItemColorDts.MainID = entity.ID;
                    entityItemColorDts.Seq    = i + 1;
                    rule.RAdd(entityItemColorDts, sqlTrans);
                }
                for (int i = 0; i < p_BE5.Length; i++)
                {
                    ItemLBDtsRule rule            = new ItemLBDtsRule();
                    ItemLBDts     entityItemLBDts = (ItemLBDts)p_BE5[i];
                    entityItemLBDts.MainID = entity.ID;
                    entityItemLBDts.Seq    = i + 1;
                    rule.RAdd(entityItemLBDts, sqlTrans);
                }
                if (p_BE6 != null)
                {
                    for (int i = 0; i < p_BE6.Length; i++)
                    {
                        ItemCheckStandardPhyRule rule          = new ItemCheckStandardPhyRule();
                        ItemCheckStandardPhy     entityItemcsp = (ItemCheckStandardPhy)p_BE6[i];
                        entityItemcsp.MainID = entity.ID;
                        entityItemcsp.Seq    = i + 1;
                        rule.RAdd(entityItemcsp, sqlTrans);
                    }
                }

                if (p_BE7 != null)
                {
                    for (int i = 0; i < p_BE7.Length; i++)
                    {
                        ItemGreyFabReplaceRule rule          = new ItemGreyFabReplaceRule();
                        ItemGreyFabReplace     entityItemgfr = (ItemGreyFabReplace)p_BE7[i];
                        entityItemgfr.MainID = entity.ID;
                        entityItemgfr.Seq    = i + 1;
                        rule.RAdd(entityItemgfr, sqlTrans);
                    }
                }

                if (p_BE8 != null)
                {
                    for (int i = 0; i < p_BE8.Length; i++)
                    {
                        ItemCodeFacDtsRule rule          = new ItemCodeFacDtsRule();
                        ItemCodeFacDts     entityItemfac = (ItemCodeFacDts)p_BE8[i];
                        entityItemfac.MainID = entity.ID;
                        entityItemfac.Seq    = i + 1;
                        rule.RAdd(entityItemfac, sqlTrans);
                    }
                }
                //FormNoControlRule rulefSt = new FormNoControlRule();
                //rulefSt.RAddSort((int)FormNoControlEnum.产品编码, sqlTrans);
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }