コード例 #1
0
        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));
            }
        }
コード例 #2
0
ファイル: wsMDL.svc.cs プロジェクト: jimidzj/Inspect
 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();
 }
コード例 #3
0
ファイル: MES.Designer.cs プロジェクト: jimidzj/Inspect
 /// <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;
 }
コード例 #4
0
ファイル: MES.Designer.cs プロジェクト: jimidzj/Inspect
 /// <summary>
 /// Deprecated Method for adding a new object to the tmdlemployeetype EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotmdlemployeetype(tmdlemployeetype tmdlemployeetype)
 {
     base.AddObject("tmdlemployeetype", tmdlemployeetype);
 }
コード例 #5
0
 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);
     }
 }