예제 #1
0
파일: YdModuleDAL.cs 프로젝트: ZQuanLi/Test
        /// <summary>
        /// 映射采集码对应的TagName
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        public int SetMapFunType(MapVModel tag)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Clear();
            strSql.Append("insert into v1_map(Ledger,Module_id,Fun_id,TagName,DataValue,Status,Disabled,Update_by,Update_dt)");
            strSql.Append("values(@Ledger,@Module_id,@Fun_id,@TagName,'',0,@Disabled,@SysUid,now())");
            strSql.Append("ON DUPLICATE KEY UPDATE TagName=@TagName,Disabled=@Disabled,Update_by=@SysUid,Update_dt=now();");
            return(SQLHelper.Execute(strSql.ToString(), new { Ledger = this.Ledger, Module_id = tag.Module_id, Fun_id = tag.Fun_id, TagName = tag.TagName, Disabled = tag.Disabled, SysUid = this.SysUid }));
        }
예제 #2
0
        /// <summary>
        /// 映射采集码对应的TagName
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        public APIResult SetMapFunType(MapVModel tag)
        {
            APIResult rst = new APIResult();

            try
            {
                int cnt = bll.SetMapFunType(tag);
                rst.Code = 0;
                rst.Msg  = "";
                rst.Data = this.GetMapFunTypeList(tag.Module_id, tag.Fun_id);
            }
            catch (Exception ex)
            {
                rst.Code = -1;
                rst.Msg  = ex.Message;
                FileLog.WriteLog("映射采集码对应的TagName信息错误(SetMapFunType):" + ex.Message + ex.StackTrace);
            }
            return(rst);
        }
예제 #3
0
파일: YdModuleBLL.cs 프로젝트: ZQuanLi/Test
 /// <summary>
 /// 映射采集码对应的TagName
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 public int SetMapFunType(MapVModel tag)
 {
     return(dal.SetMapFunType(tag));
 }
예제 #4
0
 public APIResult SetMapFunType(MapVModel tag)
 {
     return(baseInfoHelper.SetMapFunType(tag));
 }