public IHttpActionResult Post(CheckBook checkBook) { this.cbrepo.Insert(checkBook); string uri = Url.Link("GetCheckBookByName", new { id = checkBook.Check_User_name }); return(Created("GetCheckBookByName", checkBook)); }
public ActionResult CheckBookcon(CheckBook u) { CheckBookRepository crepo = new CheckBookRepository(); crepo.Insert(u); ViewData["Message"] = "Requeted Successfull"; return(View("Empty")); }
public int Update(CheckBook CheckBook) { CheckBook CheckBookToUpdate = context.CheckBooks.SingleOrDefault(d => d.Check_User_name == CheckBook.Check_User_name); CheckBookToUpdate.Check_status = CheckBook.Check_status; CheckBookToUpdate.Check_fixed_Date = CheckBook.Check_fixed_Date; return(context.SaveChanges()); }
public ActionResult CheckBook(CheckBook e) { e.Check_status = "Accepted"; e.Check_fixed_Date = (DateTime.Today.AddDays(10)).ToString(); CheckBookRepository erepo = new CheckBookRepository(); erepo.Update(e); ViewData["Message"] = "CheckBook Request Approve"; return(View("Empty")); }
public int Insert(CheckBook checkBook) { CheckBook li = new CheckBook(); li.Check_User_name = checkBook.Check_User_name; li.Check_apply_Date = checkBook.Check_apply_Date; li.Check_status = checkBook.Check_status; li.Check_fixed_Date = checkBook.Check_fixed_Date; context.CheckBooks.Add(checkBook); return(context.SaveChanges()); }
public static void DropGold(Mobile from, Gold gold, Container goldBag) { /* Check to see if player has a CheckBook */ Item item = from.Backpack.FindItemByType(typeof(CheckBook)); CheckBook checkBook = item as CheckBook; GoldToLedger.Deposit(from, gold); // if (checkBook == null) // { // if (!goldBag.TryDropItem(from, gold, false)) // Attempt to stack it // goldBag.DropItem(gold); // } // else // { // checkBook.Token += gold.Amount; // gold.Delete(); // } from.PlaySound(0x2E6); // drop gold sound }
public CheckBookGump(PlayerMobile from, Item item) : base(0, 0) { m_From = from; if (!(item is CheckBook)) { return; } CheckBook book = item as CheckBook; m_Book = book; m_From.CloseGump(typeof(CheckBookGump)); // this.Closable=true; // this.Disposable=true; // this.Dragable=true; // this.Resizable=false; // this.AddPage(0); // this.AddImageTiled(53, 94, 511, 247, 3504); // this.AddImage(560, 338, 3508); // this.AddImage(31, 73, 3500); // this.AddImage(31, 338, 3506); // this.AddImageTiled(56, 73, 507, 24, 3501); // this.AddImageTiled(57, 338, 504, 24, 3507); // this.AddImageTiled(31, 98, 25, 245, 3503); // this.AddImageTiled(560, 95, 25, 245, 3505); // this.AddLabel(259, 89, 0, @"Bank of HyperCube"); // this.AddImage(537, 176, 3502); // this.AddImage(537, 218, 3508); // this.AddImage(381, 218, 3506); // this.AddImage(381, 176, 3500); // this.AddImageTiled(406, 176, 135, 24, 3501); // this.AddImageTiled(406, 218, 132, 24, 3507); // this.AddImageTiled(381, 200, 25, 20, 3503); // this.AddImageTiled(537, 201, 25, 17, 3505); // this.AddImage(560, 73, 3502); // this.AddImageTiled(65, 234, 302, 5, 3007); // this.AddImageTiled(59, 283, 203, 5, 3007); // this.AddImageTiled(320, 283, 230, 5, 3007); // this.AddLabel(64, 265, 0, @"Note:"); // this.AddLabel(325, 262, 0, @"Signature:"); // this.AddImageTiled(65, 184, 302, 5, 3007); // this.AddLabel(510, 89, 0, @"# 001"); // this.AddLabel(70, 164, 0, @"Pay to:"); // this.AddLabel(318, 215, 0, @"Tokens"); // this.AddLabel(59, 321, 0, @":1943859762: 113 || 089193 || 0009"); // this.AddLabel(398, 262, 0, from.Name.ToString()); // this.AddLabel(462, 310, 0, @"Make a deposit"); // this.AddLabel(462, 333, 0, @"Write check"); // this.AddLabel(462, 288, 0, @"Make a withdraw"); // this.AddButton(445, 295, 2103, 2104, 2, GumpButtonType.Reply, 0); // Deposit // this.AddButton(445, 315, 2103, 2104, 1, GumpButtonType.Reply, 0); // withdraw // this.AddButton(445, 336, 2103, 2104, 3, GumpButtonType.Reply, 0); // Check // this.AddLabel(399, 200, 0, @"Balance:"); // this.AddLabel(450, 200, 0, book.Token.ToString()); // AddTextEntry(68, 216, 242, 20, 0, 1, "0"); //************************************************************************* this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddImageTiled(0, 0, 26, 324, 10464); this.AddImageTiled(27, 12, 200, 300, 9394); this.AddImageTiled(228, 0, 26, 324, 10464); this.AddLabel(114, 164, 0, @"Deposit"); this.AddLabel(114, 200, 0, @"Withdraw"); this.AddLabel(114, 235, 0, @"Write Check"); this.AddButton(73, 164, 5224, 5231, 1, GumpButtonType.Reply, 0); this.AddButton(73, 199, 5224, 5231, 2, GumpButtonType.Reply, 0); this.AddButton(73, 235, 5224, 5231, 3, GumpButtonType.Reply, 0); this.AddLabel(73, 275, 0, @"____________"); this.AddTextEntry(73, 272, 150, 20, 0, 1, "0"); this.AddLabel(120, 21, 0, @"World Bank"); this.AddLabel(120, 88, 0, book.Token.ToString()); this.AddLabel(120, 63, 0, @"Balance :"); this.AddImageTiled(0, 0, 96, 142, 5536); //************************************************************************* }
public IHttpActionResult Put([FromBody] CheckBook checkBook, [FromUri] string Check_User_name) { checkBook.Check_User_name = Check_User_name; this.cbrepo.Update(checkBook); return(Ok(checkBook)); }