Ejemplo n.º 1
0
        /// <summary>
        /// 拷贝实体数据
        /// </summary>
        /// <returns></returns>
        public static bool CopyECTag(string ECID)
        {
            ECTagEntity et = ECTagDal.GetEntity(ECID);

            //NewID
            string newid = Guid.NewGuid().ToString();

            et.ECID   = newid;
            et.ECCode = "Copy_" + et.ECCode;
            if (ALLDal.CodeExist(et.ECCode, ""))
            {
                return(false);
            }

            et.ECName = "Copy_" + et.ECName;

            et.ECCreateTime = DateTime.Now.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
            et.ECModifyTime = et.ECCreateTime;

            ECTagDal.Insert(et);

            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 拷贝实体数据
        /// </summary>
        /// <returns></returns>
        public static bool CopyCurveTag(string CurveID)
        {
            CurveTagEntity et = CurveTagDal.GetEntity(CurveID);

            //NewID
            string newid = Guid.NewGuid().ToString();

            et.CurveID   = newid;
            et.CurveCode = et.CurveCode + "_copy";
            if (ALLDal.CodeExist(et.CurveCode, ""))
            {
                return(false);
            }

            et.CurveName = et.CurveName;

            et.CurveCreateTime = DateTime.Now.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
            et.CurveModifyTime = et.CurveCreateTime;

            CurveTagDal.Insert(et);

            return(true);
        }