public NewSale(Form callback, Book bk) { InitializeComponent(); this.callback = callback; remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); remClient = (IRemClient)GetRemote.New(typeof(IRemClient)); this.bk = bk; }
public static void run() { remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); while (true) { Thread.Sleep(5000); update(dataGrid); } }
public NewBook(Form callback) { remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); InitializeComponent(); this.callback = callback; this.textBox1.KeyPress += TextBox1_KeyPress; this.textBox7.KeyPress += TextBox7_KeyPress; this.textBox8.KeyPress += TextBox8_KeyPress; this.textBox9.KeyPress += TextBox9_KeyPress; this.textBox10.KeyPress += TextBox10_KeyPress; }
public int BuyBook(string title, string name, string email, string address, int quantity) { iRemBook = (IRemBook)Activator.GetObject(typeof(IRemBook), "http://localhost:9000/StoreServer/RemBook.rem"); Book book = iRemBook.getBookByTitle(title); Client client = new Client(); client.Name = name; client.email = email; client.address = address; return(iRemBook.sellBook(book, client, quantity)); }
public Search(Form callback) { remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); InitializeComponent(); this.callback = callback; this.radioButton1.Checked = true; this.textBox1.Enabled = true; this.textBox2.Enabled = false; this.textBox1.Focus(); this.textBox1.KeyPress += TextBox1_KeyPress; }
public Orders(Form callback) { InitializeComponent(); this.callback = callback; remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); int[] keys = remBook.getOrdersId(); Order order; foreach (int id in keys) { order = remBook.getOrder(id); this.dataGridView1.Rows.Add(order.id, order.book.title, order.status, order.requestDate, order.replyDate); } }
public Sales(Form callback) { InitializeComponent(); this.callback = callback; remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); int[] keys = remBook.getSalesId(); Sale sale; foreach (int id in keys) { sale = remBook.getSale(id); this.dataGridView1.Rows.Add(sale.id, sale.client.cpf, sale.client.Name, sale.book.title, sale.quantity, sale.totalPrice); } }
public BookWindow(Book book) { remBook = (IRemBook)GetRemote.New(typeof(IRemBook)); bk = book; InitializeComponent(); this.label10.Text = bk.id.ToString(); this.label11.Text = bk.title; this.label12.Text = bk.author; this.label13.Text = bk.publisher; this.label14.Text = bk.pubDate; this.label15.Text = bk.genre; this.label16.Text = bk.volume.ToString(); this.label17.Text = bk.edition.ToString(); this.label18.Text = (remBook.getBookStock(bk)).ToString(); this.label20.Text = bk.price.ToString(); }
public Order OrderDetails(int orderId) { iRemBook = (IRemBook)Activator.GetObject(typeof(IRemBook), "http://localhost:9000/StoreServer/RemBook.rem"); return(iRemBook.getOrder(orderId)); }
public Book BookDetails(string title) { iRemBook = (IRemBook)Activator.GetObject(typeof(IRemBook), "http://localhost:9000/StoreServer/RemBook.rem"); return(iRemBook.getBookByTitle(title)); }