|
|
@ -266,46 +266,12 @@ namespace formula_manage |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void CP_PRODUCT_CODE_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) |
|
|
private void CP_PRODUCT_CODE_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
string PRODUCTCODE = null; |
|
|
|
|
|
int rownum = Grid_RRODUCT.SelectedIndex; |
|
|
|
|
|
// string PRODUCTCODE = (Grid_RRODUCT.Columns[2].GetCellContent(Grid_RRODUCT.Items[rownum]) as System.Windows.Controls.ComboBox).Text;
|
|
|
|
|
|
|
|
|
|
|
|
//string PRODUCTCODE = DetailedGrid.//DataGridTemplateColumn.CellTemplateProperty.ToString(); //(DetailedGrid.CurrentCell.ToString() as DataGridTemplateColumn); //DataGridComboBoxColumn).TextBinding; //DetailedGrid.CurrentCell..ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataGridTemplateColumn PRODUCTCODE_tempColumn = this.Grid_RRODUCT.Columns.Where(r => r.Header.Equals("原料代码")).FirstOrDefault() as DataGridTemplateColumn; |
|
|
|
|
|
FrameworkElement PRODUCTCODE_element = PRODUCTCODE_tempColumn.GetCellContent(Grid_RRODUCT.Items[rownum-1]); |
|
|
|
|
|
|
|
|
|
|
|
if (PRODUCTCODE_element != null)//构件类型
|
|
|
|
|
|
{ |
|
|
|
|
|
//把单元格元素转换为相应的控件,再从该控件中取值
|
|
|
|
|
|
// System.Windows.Controls.ComboBox
|
|
|
|
|
|
PRODUCTCODE = (PRODUCTCODE_tempColumn.CellTemplate.FindName("CP_PRODUCT_CODE", PRODUCTCODE_element) as System.Windows.Controls.ComboBox).Text; |
|
|
|
|
|
} |
|
|
|
|
|
// string specs = Grid_RRODUCT.SelectedCells[1].Column.GetCellContent(Grid_RRODUCT.SelectedItem) as TextBlock).Text; // return null
|
|
|
|
|
|
// imgPopup.Source = dgridTenderInventory.SelectedCells[1].Column.GetCellContent(item) as Image).Source; // ?? how does it be implemented?
|
|
|
|
|
|
|
|
|
|
|
|
/* if (PRODUCTCODE == null) |
|
|
|
|
|
{ |
|
|
|
|
|
if (e.Key == Key.Enter) |
|
|
|
|
|
{ |
|
|
|
|
|
UserClass.PressKey.PressKeys(Keys.Right, false); |
|
|
|
|
|
UserClass.PressKey.PressKeys(Keys.Right, true); |
|
|
|
|
|
UserClass.PressKey.PressKeys(Keys.Tab, false); |
|
|
|
|
|
UserClass.PressKey.PressKeys(Keys.Tab, true); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
{ |
|
|
if (e.Key == Key.Enter) |
|
|
if (e.Key == Key.Enter) |
|
|
{ |
|
|
{ |
|
|
UserClass.PressKey.PressKeys(Keys.Tab, false); |
|
|
UserClass.PressKey.PressKeys(Keys.Tab, false); |
|
|
UserClass.PressKey.PressKeys(Keys.Tab, true); |
|
|
UserClass.PressKey.PressKeys(Keys.Tab, true); |
|
|
} |
|
|
} |
|
|
} */ |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) |
|
|
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) |
|
|
|