private void btnNext_Click(object sender, EventArgs e) { WaitCursor.Set(); try { if (!(SystemCache.ConnetionType == "USB连接")) { BillDetail billDetail = new BillDetail(); billDetail.BillNo = billId; billDetail.BillType = billType; billDetail.DetailID = int.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString()); billDetail.PieceQuantity = decimal.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 5].ToString()); billDetail.BarQuantity = decimal.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 6].ToString()); billDetail.Operator = Dns.GetHostName(); httpDataDal.Apply(billDetail); //修改内存中对应作业的状态为:已申请 DataRow[] rows = detailTable.Select(string.Format("DetailID = {0}", this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString())); rows[0]["StatusName"] = "已申请"; } BillDetailForm billDetailForm = new BillDetailForm(billType, this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString(), billId, detailTable); billDetailForm.Index = this.index; billDetailForm.Show(); this.Close(); } catch (Exception ex) { WaitCursor.Restore(); MessageBox.Show(ex.Message); } }
private void btnNext_Click(object sender, EventArgs e) { WaitCursor.Set(); try { if (!(SystemCache.ConnetionType == "USB����")) { BillDetail billDetail = new BillDetail(); billDetail.BillNo = billId; billDetail.BillType = billType; billDetail.DetailID = int.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString()); billDetail.PieceQuantity = decimal.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 5].ToString()); billDetail.BarQuantity = decimal.Parse(this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 6].ToString()); billDetail.Operator = Dns.GetHostName(); httpDataDal.Apply(billDetail); //���ڴ��ж�Ӧ��ҵ��״̬Ϊ�������� DataRow[] rows = detailTable.Select(string.Format("DetailID = {0}", this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString())); rows[0]["StatusName"] = "������"; } BillDetailForm billDetailForm = new BillDetailForm(billType, this.dgInfo[this.dgInfo.CurrentCell.RowNumber, 0].ToString(), billId, detailTable); billDetailForm.Index = this.index; billDetailForm.Show(); this.Close(); } catch (Exception ex) { WaitCursor.Restore(); MessageBox.Show(ex.Message); } }