Beispiel #1
0
        public ActionResult DeleteConfirmed(
            Int32?BackupLogID
            )
        {
            BackupLog BackupLog = new BackupLog();

            BackupLog.BackupLogID = System.Convert.ToInt32(BackupLogID);
            BackupLog             = BackupLogData.Select_Record(BackupLog);

            bool bSucess = false;

            bSucess = BackupLogData.Delete(BackupLog);
            if (bSucess == true)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError("", "Can Not Delete");
            }
            return(null);
        }
Beispiel #2
0
        // GET: /BackupLog/Delete/<id>
        public ActionResult Delete(
            Int32?BackupLogID
            )
        {
            if (
                BackupLogID == null
                )
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }


            BackupLog BackupLog = new BackupLog();

            BackupLog.BackupLogID = System.Convert.ToInt32(BackupLogID);
            BackupLog             = BackupLogData.Select_Record(BackupLog);

            if (BackupLog == null)
            {
                return(HttpNotFound());
            }
            return(View(BackupLog));
        }
Beispiel #3
0
        public ActionResult Edit(BackupLog BackupLog)
        {
            BackupLog oBackupLog = new BackupLog();

            oBackupLog.BackupLogID = System.Convert.ToInt32(BackupLog.BackupLogID);
            oBackupLog             = BackupLogData.Select_Record(BackupLog);

            if (ModelState.IsValid)
            {
                bool bSucess = false;
                bSucess = BackupLogData.Update(oBackupLog, BackupLog);
                if (bSucess == true)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    ModelState.AddModelError("", "Can Not Update");
                }
            }

            return(View(BackupLog));
        }