示例#1
0
        private void DoSave()
        {
            try
            {
                baseForm.SetCursor();
                baseForm.ValidateData(this);

                tmdlshift shiftObj = new tmdlshift();
                if (UpdateMode == Public_UpdateMode.Update)
                {
                    shiftObj = baseForm.OriginalObject as tmdlshift;
                }
                baseForm.CreateSingleObject<tmdlshift>(shiftObj, this, UpdateMode);

                if (UpdateMode == Public_UpdateMode.Insert)
                {
                    InsertShift(shiftObj);
                }
                else
                {
                    UpdateShift(shiftObj);
                }

                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)
            {
                baseForm.ResetCursor();
                MESMsgBox.ShowError(ExceptionParser.Parse(ex));
            }
        }
示例#2
0
 public void DoUpdateShift(ContextInfo contextInfo, tmdlshift shift)
 {
     contextInfo.Action = MES_ActionType.Delete;
     ShiftBll bll = new ShiftBll(contextInfo);
     bll.CallAccessControl();
     bll.DoUpdate<tmdlshift>(shift);
     GC.Collect();
 }
示例#3
0
 public void DoInsertShift(ContextInfo contextInfo, tmdlshift shift)
 {
     contextInfo.Action = MES_ActionType.Insert;
     ShiftBll bll = new ShiftBll(contextInfo);
     bll.CallAccessControl();
     bll.DoInsert<tmdlshift>(shift);
     GC.Collect();
 }
示例#4
0
 /// <summary>
 /// Create a new tmdlshift object.
 /// </summary>
 /// <param name="shift">Initial value of the shift property.</param>
 /// <param name="shiftname">Initial value of the shiftname property.</param>
 public static tmdlshift Createtmdlshift(global::System.String shift, global::System.String shiftname)
 {
     tmdlshift tmdlshift = new tmdlshift();
     tmdlshift.shift = shift;
     tmdlshift.shiftname = shiftname;
     return tmdlshift;
 }
示例#5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tmdlshift EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotmdlshift(tmdlshift tmdlshift)
 {
     base.AddObject("tmdlshift", tmdlshift);
 }
示例#6
0
 private void UpdateShift(tmdlshift _shift)
 {
     wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
     try
     {
         client.DoUpdateShift(baseForm.CurrentContextInfo, _shift);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.CloseWCF(client);
     }
 }