示例#1
0
        private void NewMethod()
        {
            WaitingFrom.ShowWait("");
            gc_Matrl.DataSource = null;
            DataTable dt = new DataTable();

            if (txt_mat_code.Text.Trim() == "" && txt_GZ.Text.Trim() == "" && txt_STD.Text.Trim() == "" && txt_Spec.Text.Trim() == "")
            {
                MessageBox.Show("请输入物料编码或钢种、执行标准、规格!");
                return;
            }
            if (strType == "1")//钢坯=1
            {
                dt = bll_matrl.GetGP_WL(txt_mat_code.Text.Trim(), txt_GZ.Text.Trim(), txt_STD.Text.Trim(), txt_Spec.Text.Trim(), txt_Len.Text.Trim(), "6").Tables[0];
            }
            if (strType == "2")//线材=2
            {
                // dt = bll_matrl.GetGP_WL(txt_mat_code.Text.Trim(), txt_GZ.Text.Trim(), txt_STD.Text.Trim(), txt_Spec.Text.Trim(), txt_Len.Text.Trim(), "8").Tables[0];
                NewMethod1();
            }

            gc_Matrl.DataSource = dt;
            gv_Matrl.BestFitColumns();
            SetGridViewRowNum.SetRowNum(gv_Matrl);
            WaitingFrom.CloseWait();
        }