Exemplo n.º 1
0
        private void btn_approve_Click(object sender, EventArgs e)
        {
            var row = this.dg_data.CurrentRow();

            if (row != null)
            {
                string ord_id = row["ord_id"].ToString();
                bll.Pass(ord_id);
                this.refreshData();
            }
        }
Exemplo n.º 2
0
        private void pnl_pass_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                if (this.ord.pay_type == "1" && (Conv.ToDecimal(lbl合计.Text) > Conv.ToDecimal(lbl_credit_amt.Text)))
                {
                    if (Program.frmMsgYesNo("订单金额超出信用额度,确定下单吗?") != DialogResult.Yes)
                    {
                        return;
                    }
                }

                bll.Pass(this.ord.ord_id);
                //
                var ord         = new body.wm_order();
                var lines       = new DataTable();
                int un_read_num = 0;
                if (bll.GetFirstNewOrder(out ord, out lines, out un_read_num) == true)
                {
                    this.DialogResult = DialogResult.No;
                    var frm = new frmHand(ord, lines, "订单处理", un_read_num);
                    frm.ShowDialog();
                }
                else
                {
                    this.DialogResult = DialogResult.OK;
                }
            }
            catch (Exception ex)
            {
                Program.frmMsg(ex.Message);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }