private void RadGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { //结束编辑,记录下value;与编辑前比较,值改变则执行修改 var typeNo = this.radGridViewBind.CurrentRow.Cells[1].Value; var materialPN = this.radGridViewBind.CurrentRow.Cells[2].Value; var describle = this.radGridViewBind.CurrentRow.Cells[3].Value; if (typeNo == null || materialPN == null || describle == null) { return; } if (materialPN.ToString().Contains("(")) { materialPN = materialPN.ToString().Substring(0, materialPN.ToString().IndexOf('(')); } if (materialPN.ToString() != keyMaterialCode || typeNo.ToString() != keyTypeNo || this.keyDescrible != describle.ToString()) { ProductMaterial productMaterial = new ProductMaterial(); productMaterial.keyMaterialCode = keyMaterialCode; productMaterial.keyTypeNo = keyTypeNo; pmListTemp.Add(productMaterial); } }
private void MainMaterialManager_Click(object sender, EventArgs e) { //物料绑定 if (!IsLoginAuthon()) { return; } ProductMaterial productMaterial = new ProductMaterial(); productMaterial.ShowDialog(); }
private void RadGridView2_CellEndEdit(object sender, GridViewCellEventArgs e) { var materialStock = this.radGridViewStock.CurrentRow.Cells[6].Value; var describle = this.radGridViewStock.CurrentRow.Cells[7].Value; var materialRid = this.radGridViewStock.CurrentRow.Cells[3].Value; if (materialStock == null) { return; } if (materialStock.ToString() != keyOldMaterialStock || describle.ToString() != keyOldMaterialDescrible) { ProductMaterial productMaterial = new ProductMaterial(); var materialCode = serviceClient.GetMaterialCode(materialRid.ToString()); productMaterial.keyMaterialCode = materialCode; productMaterial.keyOldMaterialStock = materialStock.ToString(); productMaterial.keyOldMaterialDescrible = describle.ToString(); this.pmStockList.Add(productMaterial); } }