private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) { int ID = Convert.ToInt16(this.RYdataGridView.CurrentRow.Cells[q(Msg_Type.fieldrydm)].Value);//"人员代码" ComboBox cb = (ComboBox)sender; object obj = cb.SelectedValue; MES_TM_CZR node = new MES_TM_CZR(); if (obj is TPYEMX) { TPYEMX m = (TPYEMX)obj; node.ID = ID; node.GWID = m.ID; } else { node.ID = ID; node.GWID = Convert.ToInt32(obj); } Sonluk.UI.Model.MES.TM_CZRService.MES_RETURN returns = ServicModel.TM_CZR.UPDATE_GW(node, getToken()); if (returns.TYPE.Equals("S")) { //MessageBox.Show("修改成功", "消息框"); ShowMeg(q(Msg_Type.msgxgcg)); } this.RYdataGridView.EndEdit(); }
private void btn_Click(object sender, EventArgs e) { Button btn = (Button)sender; MES_TM_CZR node = new MES_TM_CZR(); node.ID = ryID; node.GWID = Convert.ToInt32(btn.Tag); Sonluk.UI.Model.MES.TM_CZRService.MES_RETURN returns = ServicModel.TM_CZR.UPDATE_GW(node, getToken()); if (returns.TYPE.Equals("S")) { if (MessageBox.Show(q(Msg_Type.msgxgcg), q(Msg_Type.msgtitle), MessageBoxButtons.OK) == DialogResult.OK) //"修改成功" { this.Close(); } } }