Example #1
0
 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);
     }
 }
Example #2
0
 private void prev_Click(object sender, EventArgs e)
 {
     if (pageForPrize == 1)
     {
         return;
     }
     SysPublic.getInstance().getService().GetPrizer(--pageForPrize, getPrizeOfUser_callback);
 }
Example #3
0
 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);
     }
 }
Example #4
0
 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);
     }
 }
Example #5
0
 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);
     }
 }
Example #6
0
 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);
     }
 }
Example #7
0
 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);
 }
Example #8
0
 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);
         }
     }
 }
Example #9
0
 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);
         }
     }
 }
Example #10
0
 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);
         }
     }
 }
Example #11
0
 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);
         }
     }
 }
Example #12
0
 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);
         }
     }
 }
Example #13
0
 private void getOrder()
 {
     dataGridView5.Rows.Clear();
     SysPublic.getInstance().getService().GetOrder(dtp.Value.ToString(dtp.CustomFormat).Trim(), getOrder_callback);
 }
Example #14
0
 private void getOrder()
 {
     dataGridView5.Rows.Clear();
     SysPublic.getInstance().getService().GetOrder(dtp.Text.Trim(), getOrder_callback);
 }
Example #15
0
 private void next_Click(object sender, EventArgs e)
 {
     SysPublic.getInstance().getService().GetPrizer(++pageForPrize, getPrizeOfUser_callback);
 }
Example #16
0
 private void first_Click(object sender, EventArgs e)
 {
     SysPublic.getInstance().getService().GetPrizer(1, getPrizeOfUser_callback);
 }
Example #17
0
 private void GetOrders()
 {
     list.Controls.Clear();
     SysPublic.getInstance().getService().GetOrder(dtp.Value.ToString(dtp.CustomFormat).Trim(), getOrder_callback);
 }
Example #18
0
 private void getFruitType()
 {
     dataGridView1.Rows.Clear();
     SysPublic.getInstance().getService().GetFruitType(getFruitType_callback);
 }