//private void panel1_Resize(object sender, EventArgs e) //{ // LabelProduct(CatModelList); //} private void dataGridView2_CellClick_1(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { //得到每个值的类型,以便价格授权等 string constraintType = dataGridView2.Rows[e.RowIndex].Cells[3].Value.ToString(); if (constraintType.Equals("计算重置")) { return; } decimal price = (decimal)dataGridView2.Rows[e.RowIndex].Cells[2].Value; ProCode = dataGridView2.Rows[e.RowIndex].Cells[0].Value.ToString(); string valueDescription = dataGridView2.Rows[e.RowIndex].Cells[1].Value.ToString(); CatalogBLL.saveOrder(1, OrderID, ModelPropertyName, ProCode, price, valueDescription); //设置变红标签 var RedList = CatalogBLL.getAllByCondition(ModelPropertyName, OrderID, 1); foreach (var mol in CatModelList) { h3[mol.PropertyName] = panel1.BackColor; if (mol.PropertyName == ModelPropertyName) { ((Label)h1[mol.PropertyName]).Text = ProCode; h3[mol.PropertyName] = Color.Yellow; } if (RedList != null) { if (RedList.Select(s => s.PropertyName).Contains(mol.PropertyName)) { ((Label)h1[mol.PropertyName]).Text = RedList .Where(s => s.PropertyName == mol.PropertyName) .First() .Value; h3[mol.PropertyName] = Color.Red; } } ((Label)h1[mol.PropertyName]).BackColor = (Color)h3[mol.PropertyName]; } //如果是附件 if (constraintType.Equals("附件")) { RequiredControllerParts rcp = new RequiredControllerParts(1, OrderID, AAonRating.aaon.RowIndex); rcp.ShowDialog(); } else if (constraintType.Equals("手动赋值")) { QuotedPriceSpecialInformation qpsi = new QuotedPriceSpecialInformation(OrderID, ModelPropertyName, ProCode, valueDescription); qpsi.ShowDialog(); } //MessageBox.Show(constraintType); } }
private void unitSpec_SelectedIndexChanged(object sender, EventArgs e) { if (unitSpec.SelectedIndex != -1) { List<UnitModel> Bound_Data = UnitBLL.getAllByCondition("Special", orderID); if (Bound_Data.Count > 0) { BoundData(Bound_Data); } UnitBLL.saveOrder(orderID, "Special", unitSpec.SelectedValue.ToString()); if (unitSpec.Text.Equals("X=SPA Req'd")) { btn_SPA.Visible = true; QuotedPriceSpecialInformation quotedPrice = new QuotedPriceSpecialInformation(); quotedPrice.ShowDialog(); } else { btn_SPA.Visible = false; } } }