private void DoSave() { try { baseForm.SetCursor(); baseForm.ValidateData(this); tmdlemployeetype employeetype = new tmdlemployeetype(); if (UpdateMode == Public_UpdateMode.Update) { employeetype = baseForm.OriginalObject as tmdlemployeetype; } baseForm.CreateSingleObject<tmdlemployeetype>(employeetype, this, UpdateMode); if (UpdateMode == Public_UpdateMode.Insert) { InsertEmployeeType(employeetype); } else { UpdateEmployeeType(employeetype); } if (UpdateMode == Public_UpdateMode.Insert) { baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00001")); } else if (UpdateMode == Public_UpdateMode.Update) { baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00002")); } this.Dispose(); } catch (UtilException uex) { baseForm.CreateMessageBox(Public_MessageBox.Error, MessageBoxButtons.OK, null, ExceptionParser.Parse(uex)); } catch (Exception ex) { baseForm.ResetCursor(); MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } }
public void DoUpdateEmployeeType(ContextInfo contextInfo, tmdlemployeetype employeetype) { contextInfo.Action = MES_ActionType.Delete; EmployeeTypeBll bll = new EmployeeTypeBll(contextInfo); bll.CallAccessControl(); bll.DoUpdate<tmdlemployeetype>(employeetype); GC.Collect(); }
/// <summary> /// Create a new tmdlemployeetype object. /// </summary> /// <param name="employeetypeid">Initial value of the employeetypeid property.</param> public static tmdlemployeetype Createtmdlemployeetype(global::System.String employeetypeid) { tmdlemployeetype tmdlemployeetype = new tmdlemployeetype(); tmdlemployeetype.employeetypeid = employeetypeid; return tmdlemployeetype; }
/// <summary> /// Deprecated Method for adding a new object to the tmdlemployeetype EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotmdlemployeetype(tmdlemployeetype tmdlemployeetype) { base.AddObject("tmdlemployeetype", tmdlemployeetype); }
private void UpdateEmployeeType(tmdlemployeetype _employeetype) { wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient(); try { client.DoUpdateEmployeeType(baseForm.CurrentContextInfo, _employeetype); } catch (Exception ex) { throw ex; } finally { baseForm.CloseWCF(client); } }