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