private void DeleteEmployee() { if (this.gridEmployeeList.ActiveRow != null) { Dictionary<string, object> dir = new Dictionary<string, object>(); dir.Add(UtilCulture.GetString("Label.R00022"), this.gridEmployeeList.ActiveRow.Cells["EMPLOYEEID"].Value.ToString()); //DialogResult result = MessageBox.Show(UtilCulture.GetString("Msg.R00004"), UtilCulture.GetString("Msg.R00005"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); DialogResult result = baseForm.CreateMessageBox(Public_MessageBox.Question, MessageBoxButtons.OKCancel, UtilCulture.GetString("Msg.R00004"), dir); if (result == DialogResult.OK) { baseForm.SetCursor(); wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient(); try { List<MESParameterInfo> lstParameters = new List<MESParameterInfo>(); lstParameters.Add(new MESParameterInfo() { ParamName = "employeeid", ParamValue = this.gridEmployeeList.ActiveRow.Cells["EMPLOYEEID"].Value.ToString(), ParamType = "string" }); client.DoDeleteEmployee(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); ShowEmployeeList(); baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00003")); } catch (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } } } }