예제 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            TicketGrid ticketGrid = await db.TicketGrids.FindAsync(id);

            db.TicketGrids.Remove(ticketGrid);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public void WhenIOpenTheNewestTicket()
        {
            GeneralPage.SwitchToFrame(TicketGrid.ID.mainGridFrame);
            string old = GeneralPage.GetCurrentWindow();

            TicketGrid.DoubleClickTicketInGrid(1);
            log.Info("Double clicked the top most ticket");
            GeneralPage.SwitchToNewWindow(old);
            log.Info("Switched to ticket window.");
        }
예제 #3
0
        public async Task <ActionResult> Edit([Bind(Include = "TicketId,TicketName,Author,CreationDate,Title,Priority,ID,Version,Expr1,ModifiedBy,ModificationDate,Status,AssignedTo,Comment")] TicketGrid ticketGrid)
        {
            if (ModelState.IsValid)
            {
                db.Entry(ticketGrid).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(ticketGrid));
        }
예제 #4
0
        // GET: TicketGrids/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TicketGrid ticketGrid = await db.TicketGrids.FindAsync(id);

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