public async Task <ActionResult> Create([Bind(Include = "ClientCommandLogId,LogType,LogText,ClientCommandId")] ClientCommandLog clientcommandlog)
        {
            if (ModelState.IsValid)
            {
                db.ClientCommandLogs.Add(clientcommandlog);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index", new{ clientCommandId = clientcommandlog.ClientCommandId }));
            }

            return(View(clientcommandlog));
        }
        // GET: /CllientCommandLog/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClientCommandLog clientcommandlog = await db.ClientCommandLogs.FindAsync(id);

            if (clientcommandlog == null)
            {
                return(HttpNotFound());
            }
            return(View(clientcommandlog));
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            ClientCommandLog clientcommandlog = await db.ClientCommandLogs.FindAsync(id);

            db.ClientCommandLogs.Remove(clientcommandlog);
            await db.SaveChangesAsync();

            if (Session["clientCommandId"] == null)
            {
                return(RedirectToAction("Logs"));
            }

            return(RedirectToAction("Index", new { clientCommandId = Session["clientCommandId"] }));
        }
        // GET: /CllientCommandLog/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClientCommandLog clientcommandlog = await db.ClientCommandLogs.FindAsync(id);

            if (clientcommandlog == null)
            {
                return(HttpNotFound());
            }
            var serializedString   = JsonConvert.SerializeObject(clientcommandlog);
            var outputLogViewModel = JsonConvert.DeserializeObject <OutputLogViewModel>(serializedString);

            //outputLogViewModel.ddlLogType = new SelectList(_scheduleMonitorModel.getAllLogTypes(), "LogType", "LogType", "Output Log");

            return(View(outputLogViewModel));
        }