コード例 #1
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);
        }