private void toolStripButton8_Click(object sender, EventArgs e) { if (MessageBox.Show("删除此订单项?", "删除警告", MessageBoxButtons.OKCancel) == DialogResult.OK) { SysPublic.getInstance().getService().DeleteOrderItem(Convert.ToInt32(dataGridView6.SelectedRows[0].Cells[0].Value.ToString()), DeleteOrderItem_callback); } }
private void prev_Click(object sender, EventArgs e) { if (pageForPrize == 1) { return; } SysPublic.getInstance().getService().GetPrizer(--pageForPrize, getPrizeOfUser_callback); }
private void getOrderItem() { dataGridView6.Rows.Clear(); if (dataGridView5.SelectedRows.Count == 1) { SysPublic.getInstance().getService().GetOrderItem(Convert.ToInt32(dataGridView5.SelectedRows[0].Cells[0].Value.ToString()), getOrderItem_callback); } }
private void updateReceived_callback(int result, Object[] args, String output, PHPRPC_Error error, Boolean failure) { if (result > 0) { MessageBox.Show("修改成功"); SysPublic.getInstance().getService().GetPrizer(pageForPrize, getPrizeOfUser_callback); } }
private void getFruitPrice() { dataGridView3.Rows.Clear(); if (dataGridView2.SelectedRows.Count == 1) { SysPublic.getInstance().getService().GetFruitPrice(Convert.ToInt32(dataGridView2.SelectedRows[0].Cells[0].Value.ToString()), getFruitPrice_callback); } }
private void updateReceived_Click(object sender, EventArgs e) { if (dataGridView4.SelectedRows.Count == 1) { int id = Convert.ToInt32((string)dataGridView4.SelectedRows[0].Cells[0].Value); int received = Convert.ToInt32((string)dataGridView4.SelectedRows[0].Cells[4].Value); SysPublic.getInstance().getService().UpdateReceived(id, received == 0 ? 1 : 0, updateReceived_callback); } }
private void button_ok_Click(object sender, EventArgs e) { if (name.Text == "" || password.Text == "") { MessageBox.Show("请输入用户名和密码!"); return; } SysPublic.getInstance().getService().Login(name.Text.Trim(), password.Text.Trim(), login_callback); //HproseHttpClient client = new HproseHttpClient("http://www.meirixianguo.com/index.php/Home/Api2"); //IService2 stub = client.UseService<IService2>(); //stub.test1("World", login_callback2); }
private void add_update_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(product.Text.Trim())) { MessageBox.Show("填写不完整"); } else { if (_mode == FruitTypeForm.MODE.ADD) { SysPublic.getInstance().getService().AddOrderItem(_orderId, product.Text.Trim(), Convert.ToInt32(quantity.Value), float.Parse(money.Text.Trim()), comment.Text.Trim(), OrderItem_callback); } else if (_mode == FruitTypeForm.MODE.EDIT) { SysPublic.getInstance().getService().UpdateOrderItem(_id, product.Text.Trim(), Convert.ToInt32(quantity.Value), float.Parse(money.Text.Trim()), comment.Text.Trim(), OrderItem_callback); } } }
private void add_update_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(customer.Text.Trim())) { MessageBox.Show("填写不完整"); } else { if (_mode == FruitTypeForm.MODE.ADD) { SysPublic.getInstance().getService().AddOrder(customer.Text.Trim(), cdate.Text.Trim(), earliest.Text.Trim(), latest.Text.Trim(), comment.Text.Trim(), Order_callback); } else if (_mode == FruitTypeForm.MODE.EDIT) { SysPublic.getInstance().getService().UpdateOrder(_id, customer.Text.Trim(), cdate.Text.Trim(), earliest.Text.Trim(), latest.Text.Trim(), comment.Text.Trim(), Order_callback); } } }
private void add_update_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(name.Text.Trim())) { MessageBox.Show("填写不完整"); } else { if (_mode == MODE.ADD) { SysPublic.getInstance().getService().AddFruitType(name.Text, FruitType_callback); } else if (_mode == MODE.EDIT) { SysPublic.getInstance().getService().UpdateFruitType(_id, name.Text, FruitType_callback); } } }
private void add_update_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(minPrice.Text.Trim()) && String.IsNullOrEmpty(maxPrice.Text.Trim())) { MessageBox.Show("填写不完整"); } else { if (_mode == FruitTypeForm.MODE.ADD) { SysPublic.getInstance().getService().AddFruitPrice(_fruitId, (float)Convert.ToDouble(minPrice.Text.Trim()), (float)Convert.ToDouble(maxPrice.Text.Trim()), cdate.Text.Trim(), FruitPrice_callback); } else if (_mode == FruitTypeForm.MODE.EDIT) { SysPublic.getInstance().getService().UpdateFruitPrice(_id, (float)Convert.ToDouble(minPrice.Text.Trim()), (float)Convert.ToDouble(maxPrice.Text.Trim()), cdate.Text.Trim(), FruitPrice_callback); } } }
private void add_update_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(name.Text.Trim()) && String.IsNullOrEmpty(level.Text.Trim()) && String.IsNullOrEmpty(area.Text.Trim()) && String.IsNullOrEmpty(unit.Text.Trim()) && String.IsNullOrEmpty(description.Text.Trim()) && String.IsNullOrEmpty(loss.Text.Trim())) { MessageBox.Show("填写不完整"); } else { if (_mode == FruitTypeForm.MODE.ADD) { SysPublic.getInstance().getService().AddFruit(_fruitTypeId, name.Text.Trim(), Convert.ToInt32(level.Text.Trim()), area.Text.Trim(), unit.Text.Trim(), description.Text.Trim(), (float)Convert.ToDouble(loss.Text.Trim()), Fruit_callback); } else if (_mode == FruitTypeForm.MODE.EDIT) { SysPublic.getInstance().getService().UpdateFruit(_id, name.Text, Convert.ToInt32(level.Text.Trim()), area.Text.Trim(), unit.Text.Trim(), description.Text.Trim(), (float)Convert.ToDouble(loss.Text.Trim()), Fruit_callback); } } }
private void getOrder() { dataGridView5.Rows.Clear(); SysPublic.getInstance().getService().GetOrder(dtp.Value.ToString(dtp.CustomFormat).Trim(), getOrder_callback); }
private void getOrder() { dataGridView5.Rows.Clear(); SysPublic.getInstance().getService().GetOrder(dtp.Text.Trim(), getOrder_callback); }
private void next_Click(object sender, EventArgs e) { SysPublic.getInstance().getService().GetPrizer(++pageForPrize, getPrizeOfUser_callback); }
private void first_Click(object sender, EventArgs e) { SysPublic.getInstance().getService().GetPrizer(1, getPrizeOfUser_callback); }
private void GetOrders() { list.Controls.Clear(); SysPublic.getInstance().getService().GetOrder(dtp.Value.ToString(dtp.CustomFormat).Trim(), getOrder_callback); }
private void getFruitType() { dataGridView1.Rows.Clear(); SysPublic.getInstance().getService().GetFruitType(getFruitType_callback); }