//导入五金 private void button5_Click(object sender, EventArgs e) { var frm = new FormSelect(); frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { DataTable dt = frm.gdt.DefaultView.Table; WaitForm loading = WaitForm.getLoading(); loading.SetExecuteMethod(runImpWujin, dt); loading.ShowDialog(); if (ValidateProjectInfo()) { //CaculateFloorSum(false); CaculateTotalPrice(); gCBDataSource.EndEdit(); gCBTableAdapter.Update(dataSet1.GCB); new DataSet1TableAdapters.XMBTableAdapter().Update(dataSet1.XMB); new DataSet1TableAdapters.PARTSTableAdapter().Update(dataSet1.PARTS); } this.SubProjectDetailGrid1.DataSource = null; this.SubProjectDetailGrid1.DataSource = this.PARTSSource; this.dataGridView4.DataSource = null; this.dataGridView4.DataSource = this.XMBBindingSource; //refreshData(); //dataGridView4.Refresh(); //SubProjectDetailGrid1.Refresh(); } }
//导入板材 private void button6_Click(object sender, EventArgs e) { openFileDialog.FilterIndex = 1; if (openFileDialog.ShowDialog() == DialogResult.OK) { WaitForm loading = WaitForm.getLoading(); loading.SetExecuteMethod(runImpbancai, null); loading.ShowDialog(); if (ValidateProjectInfo()) { //CaculateFloorSum(false); CaculateTotalPrice(); gCBDataSource.EndEdit(); gCBTableAdapter.Update(dataSet1.GCB); new DataSet1TableAdapters.XMBTableAdapter().Update(dataSet1.XMB); new DataSet1TableAdapters.PARTSTableAdapter().Update(dataSet1.PARTS); } this.SubProjectDetailGrid1.DataSource = null; this.SubProjectDetailGrid1.DataSource = this.PARTSSource; this.dataGridView4.DataSource = null; this.dataGridView4.DataSource = this.XMBBindingSource; } }