예제 #1
0
 private void DeleteEmployeeType()
 {
     if (this.gridEmployeeTypeList.ActiveRow != null)
     {
         Dictionary<string, object> dir = new Dictionary<string, object>();
         dir.Add(UtilCulture.GetString("Label.R00380"), this.gridEmployeeTypeList.ActiveRow.Cells["EMPLOYEETYPEID"].Value.ToString());
         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 = "employeetypeid",
                     ParamValue = this.gridEmployeeTypeList.ActiveRow.Cells["EMPLOYEETYPEID"].Value.ToString(),
                     ParamType = "string"
                 });
                 client.DoDeleteEmployeeType(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>());
                 ShowEmployeeTypeList();
                 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);
             }
         }
     }
 }