Beispiel #1
0
 private void pnl_later_Click(object sender, EventArgs e)
 {
     try
     {
         System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
         if (this.ord.status == "0")
         {
             bll.SignRead(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
     {
         System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
     }
 }
Beispiel #2
0
 private void btn_view_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         var row = this.dg_data.CurrentRow();
         if (row != null)
         {
             var ord_id      = row["ord_id"].ToString();
             var ord         = new body.wm_order();
             var lines       = new DataTable();
             int un_read_num = 0;
             bll.GetOrder(ord_id, out ord, out lines, out un_read_num);
             var frm = new frmHand(ord, lines, "订单明细", un_read_num);
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 this.refreshData();
             }
         }
     }
     catch (Exception ex)
     {
         Program.frmMsg(ex.Message);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
 private void dg_data_DoubleClickCell(object sender, string column_name, DataRow row, MouseEventArgs e)
 {
     if (row != null)
     {
         string ord_id      = row["ord_id"].ToString();
         var    ord         = new body.wm_order();
         var    lines       = new DataTable();
         int    un_read_num = 0;
         bll.GetOrder(ord_id, out ord, out lines, out un_read_num);
         var frm = new frmHand(ord, lines, "订单明细", un_read_num);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             this.refreshData();
         }
     }
 }
        private void btn_view_Click(object sender, EventArgs e)
        {
            var row = this.dg_data.CurrentRow();

            if (row != null)
            {
                string ord_id      = row["ord_id"].ToString();
                var    ord         = new body.wm_order();
                var    lines       = new DataTable();
                int    un_read_num = 0;
                bll.GetOrder(ord_id, out ord, out lines, out un_read_num);
                var frm = new frmHand(ord, lines, "订单明细", un_read_num);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    this.refreshData();
                }
            }
        }
Beispiel #5
0
 private void newOrderMsg1_Click(object sender, EventArgs e)
 {
     try
     {
         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)
         {
             var frm = new frmHand(ord, lines, "订单处理", un_read_num);
             frm.ShowDialog();
         }
         else
         {
             throw new Exception("不存在未阅读的订单");
         }
     }
     catch (Exception ex)
     {
         Program.frmMsg(ex.Message);
     }
 }
Beispiel #6
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;
            }
        }