Esempio n. 1
0
        public ActionResult DeleteConfirmed(HR_KADAR_ELAUN_LEBIHMASA elaunLebihMasa)
        {
            elaunLebihMasa = db.HR_KADAR_ELAUN_LEBIHMASA.SingleOrDefault(s => s.HR_JENIS_HARI == elaunLebihMasa.HR_JENIS_HARI && s.HR_JENIS_WAKTU == elaunLebihMasa.HR_JENIS_WAKTU);

            db.HR_KADAR_ELAUN_LEBIHMASA.Remove(elaunLebihMasa);
            db.SaveChanges();
            return(RedirectToAction("SenaraiLebihMasa"));
        }
Esempio n. 2
0
 public ActionResult EditElaunLebihMasa([Bind(Include = "HR_JENIS_HARI,HR_JENIS_WAKTU,HR_KADAR_SEJAM,HR_AKTIF_IND")] HR_KADAR_ELAUN_LEBIHMASA elaunLebihMasa)
 {
     if (ModelState.IsValid)
     {
         db.Entry(elaunLebihMasa).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("SenaraiLebihMasa"));
     }
     ViewBag.HR_JENIS_HARI  = new SelectList(db2.GE_PARAMTABLE.Where(s => s.GROUPID == 119), "STRING_PARAM", "SHORT_DESCRIPTION");
     ViewBag.HR_JENIS_WAKTU = new SelectList(db2.GE_PARAMTABLE.Where(s => s.GROUPID == 120), "STRING_PARAM", "SHORT_DESCRIPTION");
     return(View(elaunLebihMasa));
 }
Esempio n. 3
0
        public ActionResult TambahElaunLebihMasa([Bind(Include = "HR_JENIS_HARI,HR_JENIS_WAKTU,HR_KADAR_SEJAM,HR_AKTIF_IND")] HR_KADAR_ELAUN_LEBIHMASA elaunLebihMasa)
        {
            if (ModelState.IsValid)
            {
                List <HR_KADAR_ELAUN_LEBIHMASA> selectElaun = db.HR_KADAR_ELAUN_LEBIHMASA.Where(s => s.HR_JENIS_HARI == elaunLebihMasa.HR_JENIS_HARI && s.HR_JENIS_WAKTU == elaunLebihMasa.HR_JENIS_WAKTU).ToList();
                if (selectElaun.Count() <= 0)
                {
                    db.HR_KADAR_ELAUN_LEBIHMASA.Add(elaunLebihMasa);
                    db.SaveChanges();
                }
                return(RedirectToAction("SenaraiLebihMasa"));
            }

            return(View(elaunLebihMasa));
        }
Esempio n. 4
0
        public ActionResult EditElaunLebihMasa(string hari, string waktu)
        {
            if (hari == null || waktu == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            HR_KADAR_ELAUN_LEBIHMASA elaunLebihMasa = db.HR_KADAR_ELAUN_LEBIHMASA.SingleOrDefault(s => s.HR_JENIS_HARI == hari && s.HR_JENIS_WAKTU == waktu);


            if (elaunLebihMasa == null)
            {
                return(HttpNotFound());
            }
            ViewBag.HR_JENIS_HARI  = new SelectList(db2.GE_PARAMTABLE.Where(s => s.GROUPID == 119), "STRING_PARAM", "SHORT_DESCRIPTION");
            ViewBag.HR_JENIS_WAKTU = new SelectList(db2.GE_PARAMTABLE.Where(s => s.GROUPID == 120), "STRING_PARAM", "SHORT_DESCRIPTION");
            return(PartialView("_EditElaunLebihMasa", elaunLebihMasa));
        }