Beispiel #1
0
        private void btn_cancle_pc_Click(object sender, EventArgs e)
        {
            DataRow dr = gv_Plan.GetDataRow(gv_Plan.FocusedRowHandle);

            if (dr != null)
            {
                if (DialogResult.No == MessageBox.Show("是否确认撤回选中的计划?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
                {
                    return;
                }
                bool result = Cls_APS_PC.CancleZGPlan(dr["C_ID"].ToString());
                if (result)
                {
                    MessageBox.Show("计划成功撤回!");
                    BindPlan();
                    BindItem();
                }
                else
                {
                    MessageBox.Show("撤回失败!");
                }
            }
            else
            {
                MessageBox.Show("选择要撤回的计划!");
                return;
            }
        }
Beispiel #2
0
        /// <summary>
        /// 取消排产
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_cancle_pc_Click(object sender, EventArgs e)
        {
            int checknum = lst.Where(a => a.B_check).ToList().Count;

            if (DialogResult.Yes == MessageBox.Show("是否确认取消当前选中的计划?\r\n选中计划数:" + checknum.ToString(), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
            {
                WaitingFrom.ShowWait("系统正对订单进行确认处理,请稍候...");
                int res = 0;
                for (int i = 0; i < lst.Count; i++)
                {
                    if (lst[i].B_check)
                    {
                        string C_ID   = lst[i].C_ORDER_NO;
                        bool   result = Cls_APS_PC.CancleOrder(lst[i].C_ID);
                        if (result)
                        {
                            res = res + 1;
                        }
                    }
                }
                WaitingFrom.CloseWait();
                MessageBox.Show("成功取消计划数:" + res.ToString());
            }

            btn_query_order_Click(null, null);
        }
Beispiel #3
0
 private void btn_pc_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_APS_PC.DownOrder(mod.C_ID, mod.N_WGT);
             MessageBox.Show("计划已下达");
             WaitingFrom.ShowWait("数据正在加载,请稍后。。。");
             NewMethod();
             WaitingFrom.CloseWait();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Beispiel #4
0
        private void btn_bxg_plan_Click(object sender, EventArgs e)
        {
            string d_dtf    = this.dtp_from.Text;
            string d_dte    = this.dtp_end.Text;
            string c_ccm_id = "";

            if (icbo_lz.SelectedIndex <= 0)
            {
                c_ccm_id = "";
            }
            else
            {
                c_ccm_id = icbo_lz.Properties.Items[icbo_lz.SelectedIndex].Value.ToString();
            }


            if (DialogResult.No == MessageBox.Show("是否确认重新重新生成浇次计划!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
            {
            }
            else
            {
                WaitingFrom.ShowWait("浇次计划正在重新生成,请稍候...");
                // string res = bll_plan.P_JCJH(Convert.ToDateTime(d_dtf),Convert.ToDateTime(d_dte));//生产浇次计划到临时表
                //  string C_IS_BXG = this.rbtn_status.SelectedIndex.ToString();
                Cls_APS_PC.Generation_Slab_Plan(d_dtf, d_dte, c_ccm_id, "1");
                MessageBox.Show("浇次计划已成功生成,请在炼钢生产顺序界面进行处理!");
                WaitingFrom.CloseWait();
            }
        }
Beispiel #5
0
        /// <summary>
        /// 订单确认排产
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_pc_Click(object sender, EventArgs e)
        {
            if (DialogResult.Yes == MessageBox.Show("是否确认排产所选中的订单?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
            {
                lstwl = bll_wl.GetListLZ("");
                #region 新方法
                WaitingFrom.ShowWait("");
                if (lst.Count > 0)
                {
                    if (lst.Where(a => a.B_check).ToList().Count > 0)
                    {
                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (lst[i].B_check)
                            {
                                if (lst[i].B_check)
                                {
                                    decimal down_wgt = lst[i].N_WGT - lst[i].N_PROD_WGT - lst[i].N_ROLL_PROD_WGT;
                                    if (down_wgt > 0)
                                    {
                                        #region 验证订单是否有首尾炉钢种
                                        bool      flag = true;
                                        DataTable dtsl = Cls_Order_PC.GetSWLGZ(lst[i].C_STL_GRD_SLAB, lst[i].C_STD_CODE_SLAB, "首炉");
                                        if (dtsl != null && dtsl.Rows.Count > 0)
                                        {
                                            string slorder = "";//首炉生产钢种的订单
                                            for (int m = 0; m < dtsl.Rows.Count; m++)
                                            {
                                                string C_STL_GRD  = dtsl.Rows[m]["C_B_E_STOVE_STEEL"].ToString();
                                                string C_STD_CODE = dtsl.Rows[m]["C_BORDER_STD_CODE"].ToString();
                                            }
                                        }

                                        #endregion


                                        Cls_APS_PC.DownOrder(lst[i].C_ID, down_wgt);
                                    }
                                }
                            }
                        }
                        //string group = bll_plan.P_LGPLAN_GROUPING();//炼钢计划重新分组
                    }
                }
                WaitingFrom.CloseWait();
                #endregion
            }

            btn_query_order_Click(null, null);
        }
Beispiel #6
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            string d_dtf    = this.dtp_from.Text;
            string d_dte    = this.dtp_end.Text;
            string c_ccm_id = "";

            if (icbo_lz.SelectedIndex <= 0)
            {
                c_ccm_id = "";
            }
            else
            {
                c_ccm_id = icbo_lz.Properties.Items[icbo_lz.SelectedIndex].Value.ToString();
            }

            int N_GROUP = 0;

            int[] aa  = this.gv_lg_plan.GetSelectedRows();
            int   cou = 0;

            for (int i = 0; i < aa.Length; i++)
            {
                int selectedHandle = aa[i];
                N_GROUP = Convert.ToInt32(this.gv_lg_plan.GetRowCellValue(selectedHandle, "N_GROUP").ToString());
            }


            if (DialogResult.No == MessageBox.Show("是否确认重新重新生成浇次计划!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
            {
            }
            else
            {
                WaitingFrom.ShowWait("浇次计划正在重新生成,请稍候...");
                string C_IS_BXG = this.rbtn_status.SelectedIndex.ToString();
                Cls_APS_PC.Generation_Slab_PlanByGroup(d_dtf, d_dte, c_ccm_id, C_IS_BXG, N_GROUP);
                MessageBox.Show("浇次计划已成功生成,请在炼钢生产顺序界面进行处理!");
                WaitingFrom.CloseWait();
            }
        }