示例#1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            HRPersonnel hRPersonnel = await db.HRPersonnel.FindAsync(id);

            db.HRPersonnel.Remove(hRPersonnel);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
示例#2
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,JobTitle,shortDes,Department,Position,RequiredSkills,ApplyTill,LongDes")] HRPersonnel hRPersonnel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(hRPersonnel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(hRPersonnel));
        }
示例#3
0
        // GET: HRPersonnels/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HRPersonnel hRPersonnel = await db.HRPersonnel.FindAsync(id);

            if (hRPersonnel == null)
            {
                return(HttpNotFound());
            }
            return(View(hRPersonnel));
        }