コード例 #1
0
 /// <summary>
 /// 根据ID取得主机信息
 /// </summary>
 /// <param name="hostid">主机ID</param>
 /// <returns></returns>
 public SC_HOST gethost(int hostid)
 {
     try
     {
         DSCfunction dsc = new DSCfunction();
         return(dsc.SELECT_HOST_ID(hostid));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #2
0
ファイル: ExcFunc.cs プロジェクト: tabtu/119CRT
        /// <summary>
        /// 更新建筑数据
        /// </summary>
        /// <param name="info">建筑数据</param>
        /// <param name="userid">操作ID</param>
        /// <returns></returns>
        public int EditLandata(LanData info, int userid)
        {
            try
            {
                DLanData dld = new DLanData();
                if (info.PASSWD != "")
                {
                    info.PASSWD = md5.Md5Encode(info.PASSWD);
                }
                else
                {
                    info.PASSWD = dld.SELECT_BY_ID(info.ID).PASSWD;
                }
                info.Isused = true;
                int result = dld.UPDATE(info);


                DSCfunction dsc = new DSCfunction();
                SC_HOST     sch = dsc.SELECT_HOST_ID(info.ID);
                sch.HOST_CODE = info.HOST_CODE;
                sch.PASSWD    = info.PASSWD;
                sch.ACTIVE    = info.ACTIVE;
                dsc.UPDATE_HOST(sch);

                Log log = new Log();
                log.Tablename   = "LanData";
                log.Tableid     = result;
                log.Mid         = userid;
                log.Datetime    = DateTime.Now;
                log.Discription = "Update";
                DLog dl = new DLog();
                dl.INSERT(log);

                return(result);
            }
            catch
            {
                return(0);
            }
        }