private void SubmitItem(object sender, EventArgs e) { for (int i = 0; i < dtCboValue.Rows.Count; i++) { var val = dtCboValue.Rows[i][0]; var obj = new Material_ComboBox_Value(); obj.Id = i; obj.Value = val.ToString(); obj.Create_Date = DateTime.Now; obj.Create_User_Id = 1; obj.Is_Delete = "0"; obj.Extend_Id = 1; comboBoxValueList.Add(obj); propertyService.AddORUpdateComboBoxValue(obj); } }
private bool UpdateComboBoxValue(Material_ComboBox_Value comboBoxValue) { return true; }
private List<Material_ComboBox_Value> GetAllComboBoxValue() { var comboBoxValueList = new List<Material_ComboBox_Value>(); var comboBoxValue = new Material_ComboBox_Value { Id = 1, Extend_Id = 1, Value = "测试1", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 2, Extend_Id = 1, Value = "测试2", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 3, Extend_Id = 1, Value = "测试3", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 4, Extend_Id = 1, Value = "测试4", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); #region 物料属性 comboBoxValue = new Material_ComboBox_Value { Id = 5, Extend_Id = 2, Value = "外协件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 6, Extend_Id = 2, Value = "自制件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 7, Extend_Id = 2, Value = "外购件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 8, Extend_Id = 2, Value = "虚拟件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); #endregion #region 物料种类 comboBoxValue = new Material_ComboBox_Value { Id = 9, Extend_Id = 3, Value = "零件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 10, Extend_Id = 3, Value = "部件", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); comboBoxValue = new Material_ComboBox_Value { Id = 11, Extend_Id = 3, Value = "产品", Is_Delete = "0" }; comboBoxValueList.Add(comboBoxValue); #endregion return comboBoxValueList; }
public bool AddORUpdateComboBoxValue(Material_ComboBox_Value comboBoxValue) { return comboBoxValue.Id == 0 ? AddComboBoxValue(comboBoxValue) : UpdateComboBoxValue(comboBoxValue); }
private bool AddComboBoxValue(Material_ComboBox_Value comboBoxValue) { return false; }