コード例 #1
0
ファイル: MRole.cs プロジェクト: pawit1357/ALS.ALSI.Web
 //GET MENU_ROLE MAX ID
 public int GetMax()
 {
     using (ALSIEntities ctx = new ALSIEntities())
     {
         m_role mRole = (from c in ctx.m_role select c).OrderByDescending(x => x.ID).FirstOrDefault();
         if (mRole != null)
         {
             return((int)mRole.ID + 1);
         }
         return(-1);
     }
 }
コード例 #2
0
ファイル: MRole.cs プロジェクト: pawit1357/ALS.ALSI.Web
        public void Update()
        {
            m_role existing = _repository.Find(x => x.ID == this.ID).FirstOrDefault();

            _repository.Edit(existing, this);
        }