Esempio n. 1
0
        private void btn_delete_Click(object sender, EventArgs e)
        {
            WaitingFrom.ShowWait("");
            DataTable dtdchs = dtzgjh.Clone();                  //选中的需要评价的订单

            int[] rownumber = this.gridView1.GetSelectedRows(); //获取选中行号数组;
            if (rownumber.Length > 0)
            {
                for (int i = 0; i < rownumber.Length; i++)
                {
                    int     selectedHandle = rownumber[i];
                    DataRow dr             = dtdchs.NewRow();
                    dr.ItemArray = this.gridView1.GetDataRow(i).ItemArray;
                    dtdchs.Rows.Add(dr);
                }
                dtdchs.DefaultView.Sort = " N_SORT ";  //将选中的订单按照排产目标进行排序
                dtdchs = dtdchs.DefaultView.ToTable(); //获取的需要初始化的表
            }
            for (int j = 0; j < dtdchs.Rows.Count; j++)
            {
                string            C_PLAN_ID = dtdchs.Rows[j]["C_ID"].ToString();
                Mod_TRP_PLAN_ROLL modPlan   = bll_plan.GetModel(C_PLAN_ID);
                decimal           WGT       = Convert.ToDecimal(modPlan.N_WGT);
                string            orderId   = modPlan.C_INITIALIZE_ITEM_ID;
                bll_order.BackZGWGT(orderId, WGT);
                bll_plan.Delete(C_PLAN_ID);
            }
            btn_query_zg_Click(null, null);
            WaitingFrom.CloseWait();
        }