Ejemplo n.º 1
0
        private void btn_order_pj1_Click(object sender, EventArgs e)
        {
            if (DialogResult.Yes == MessageBox.Show("是否评价选中的订单?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
            {
                WaitingFrom.ShowWait("系统正在对订单进行分析,请稍候...");
                int res = 0;
                if (lst.Count > 0)
                {
                    if (lst.Where(a => a.B_check).ToList().Count > 0)
                    {
                        string C_TYPE = "正常";
                        if (rbtn_lx_type.SelectedIndex == 1)
                        {
                            C_TYPE = "试验";
                        }

                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (lst[i].B_check)
                            {
                                string        c_order_id = lst[i].C_ID;
                                Mod_TMO_ORDER mod        = bll_order.GetModel(c_order_id);
                                Cls_Order_PC.OrderPj(mod, C_TYPE);
                                res = res + 1;
                            }
                        }
                    }
                }

                MessageBox.Show("订单已成功评价" + res.ToString() + "条!");
                btn_query_order_Click(null, null);
                WaitingFrom.CloseWait();
            }
        }
Ejemplo n.º 2
0
 private void btn_order_pj1_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dialogResult = MessageBox.Show("是否评价该头尾炉计划?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
         if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
         {
             DataRow dr = this.gv_Order.GetDataRow(this.gv_Order.FocusedRowHandle);
             if (dr == null)
             {
                 MessageBox.Show("请选择需要评价的计划!");
                 return;
             }
             Mod_TMO_ORDER mod = bll_Order.GetModel(dr["C_ID"].ToString());
             Cls_Order_PC.OrderPj(mod, "正常");
             MessageBox.Show("计划已评价");
             WaitingFrom.ShowWait("数据正在加载,请稍后。。。");
             NewMethod();
             WaitingFrom.CloseWait();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }