private void DoSave() { try { baseForm.SetCursor(); baseForm.ValidateData(this); tmdlemployee employee = new tmdlemployee(); if (UpdateMode == Public_UpdateMode.Update) { employee = baseForm.OriginalObject as tmdlemployee; } baseForm.CreateSingleObject<tmdlemployee>(employee, this, UpdateMode); if (UpdateMode == Public_UpdateMode.Insert) { InsertEmployee(employee); } else { UpdateEmployee(employee); } 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 (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); } }
public void DoUpdateEmployee(ContextInfo contextInfo, tmdlemployee employee) { contextInfo.Action = MES_ActionType.Update; EmployeeBll bll = new EmployeeBll(contextInfo); bll.CallAccessControl(); bll.DoUpdate<tmdlemployee>(employee); GC.Collect(); }
/// <summary> /// Deprecated Method for adding a new object to the tmdlemployee EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotmdlemployee(tmdlemployee tmdlemployee) { base.AddObject("tmdlemployee", tmdlemployee); }
/// <summary> /// Create a new tmdlemployee object. /// </summary> /// <param name="employeeid">Initial value of the employeeid property.</param> public static tmdlemployee Createtmdlemployee(global::System.String employeeid) { tmdlemployee tmdlemployee = new tmdlemployee(); tmdlemployee.employeeid = employeeid; return tmdlemployee; }
private void UpdateEmployee(tmdlemployee _employee) { wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient(); try { client.DoUpdateEmployee(baseForm.CurrentContextInfo, _employee); } catch (Exception ex) { throw ex; } finally { baseForm.CloseWCF(client); } }