Exemplo n.º 1
0
 public void DoUpdateFunctions(ContextInfo contextInfo, tsecfunctions functions)
 {
     contextInfo.Action = MES_ActionType.Update;
     FunctionsBll bll = new FunctionsBll(contextInfo);
     bll.CallAccessControl();
     bll.DoUpdate<tsecfunctions>(functions);
     GC.Collect();
 }
Exemplo n.º 2
0
        private void DoSave()
        {
            try
            {
                baseForm.SetCursor();
                baseForm.ValidateData(this);

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

                if (UpdateMode == Public_UpdateMode.Insert)
                {
                    InsertFunctions(functions);
                }
                else
                {
                    UpdateFunctions(functions);
                }

                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();
            }
        }
Exemplo n.º 3
0
 private void UpdateFunctions(tsecfunctions _functions)
 {
     wsSEC.IwsSECClient client = new wsSEC.IwsSECClient();
     try
     {
         client.DoUpdateFunctions(baseForm.CurrentContextInfo, _functions);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.CloseWCF(client);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new tsecfunctions object.
 /// </summary>
 /// <param name="funcid">Initial value of the funcid property.</param>
 public static tsecfunctions Createtsecfunctions(global::System.String funcid)
 {
     tsecfunctions tsecfunctions = new tsecfunctions();
     tsecfunctions.funcid = funcid;
     return tsecfunctions;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tsecfunctions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotsecfunctions(tsecfunctions tsecfunctions)
 {
     base.AddObject("tsecfunctions", tsecfunctions);
 }