change - 修改物料信息操作错误

dep_nodyang
wangsr 1 year ago
parent 6f79836a47
commit 868917498f

@ -48,9 +48,7 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
{ {
int mID = Convert.ToInt32(Convert.ToInt32(clientGridView.SelectedRows[0].Cells["recipetype_Id"].Value)); int mID = Convert.ToInt32(Convert.ToInt32(clientGridView.SelectedRows[0].Cells["recipetype_Id"].Value));
string mName = clientGridView.SelectedRows[0].Cells["recipetype_Name"].Value as string; string mName = clientGridView.SelectedRows[0].Cells["recipetype_Name"].Value as string;
string msg1 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_DeleteAction_msg1")); //确认删除当前物料(物料名:{0})吗? DialogResult result = MessageBox.Show("确认删除当前物料吗", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
msg1 = String.Format(msg1, mName);
DialogResult result = MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes) if (result == DialogResult.Yes)
{ {
//删除本地数据库中的用户信息 //删除本地数据库中的用户信息
@ -68,8 +66,7 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
} }
else else
{ {
string msg2 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_DeleteAction_msg2")); //请选择一条要删除物料信息! MessageBox.Show("请选择一条要删除物料信息!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information); //请选择一条要删除物料信息!
MessageBox.Show(msg2, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
} }
catch (Exception ex) catch (Exception ex)

@ -82,7 +82,7 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
private void FrmRecipeTypeInfo_Load(object sender, EventArgs e) private void FrmRecipeTypeInfo_Load(object sender, EventArgs e)
{ {
this.InitUI(); //this.InitUI();
this.InitData(); this.InitData();
} }
@ -98,18 +98,18 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
} }
} }
private void InitUI() //private void InitUI()
{ //{
if (this._actionType == ActionType.Add) // if (this._actionType == ActionType.Add)
{ // {
this.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_Text_Add")); //添加物料 // this.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_Text_Add")); //添加物料
} // }
else if (this._actionType == ActionType.Modify) // else if (this._actionType == ActionType.Modify)
{ // {
this.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_Text_Modify")); //修改物料信息 // this.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_Text_Modify")); //修改物料信息
} // }
this.label1.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_label1_Text")); //物料名称: // this.label1.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_label1_Text")); //物料名称:
this.label2.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_label2_Text")); //物料编码: // this.label2.Text = StringParser.Parse(ResourceService.GetString("Menac_Action_ChemicalWeighing_MaterialManage_FrmRecipeType_label2_Text")); //物料编码:
} //}
} }
} }

@ -51,8 +51,8 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
//验证是否选中某物料 //验证是否选中某物料
if (clientGridView.SelectedRows.Count != 1) if (clientGridView.SelectedRows.Count != 1)
{ {
string msg1 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_ModifyAction_msg1")); //请选择一项要修改的物料! //string msg1 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_ModifyAction_msg1")); //请选择一项要修改的物料!
MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("请选择一项要修改的物料!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
this._runtime.IsReturn = true; this._runtime.IsReturn = true;
return; return;
} }
@ -73,9 +73,9 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.RecipType
newMaterial.recipetype_Id = base_RecipeType.recipetype_Id; //在此设定物料对象的ID newMaterial.recipetype_Id = base_RecipeType.recipetype_Id; //在此设定物料对象的ID
frmMaterial.Dispose(); frmMaterial.Dispose();
string msg2 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_ModifyAction_msg2")); //确认修改{0}物料信息? //string msg2 = StringParser.Parse(ResourceService.GetString("Mesnac_Action_ChemicalWeighing_FrmRecipeType_ModifyAction_msg2")); //确认修改{0}物料信息?
msg2 = String.Format(msg2, base_RecipeType.recipetype_Name); //msg2 = String.Format(msg2, base_RecipeType.recipetype_Name);
if (MessageBox.Show(msg2, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) if (MessageBox.Show("确认修改物料信息?", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{ {
//更新数据库中的物料信息 //更新数据库中的物料信息
TechnicalHelper.updateRecipeType(newMaterial); TechnicalHelper.updateRecipeType(newMaterial);

Loading…
Cancel
Save