Exemplo n.º 1
0
        public static bool ModifySaler(SalerEntity entity)
        {
            int result = 0;

            if (entity != null)
            {
                SalerRepository mr = new SalerRepository();

                SalerInfo info = TranslateSalerEntity(entity);


                if (entity.SID > 0)
                {
                    result = mr.ModifySaler(info);
                }
                else
                {
                    info.CreateDate = DateTime.Now;
                    result          = mr.CreateSaler(info);
                }

                List <SalerInfo> miList = mr.GetSalerAll();//刷新缓存
                Cache.Add("SalerALL", miList);
            }
            return(result > 0);
        }