private void SetupContribute() { if (IsMonitoringAuditor) { item = (ItemID == 0) ? new SPA.ServerFunction() : new SPA.ServerFunction(ItemID); } else { Response.Redirect(string.Format("{0}/{1}?code={2}", SPContext.Current.Web.Url, Message.URL_USERMESSAGE, Message.Code.MngrAccessReq), false); } }
public Action(ServerFunction serverFunction, params object[] parameters) { this.serverFunction = serverFunction; this.parameters = parameters; string rand = ""; for (int i = 0; i < 25; i++) { rand += charArr[UnityEngine.Random.Range(0, charArr.Length)]; } actionID = rand; }
private bool SaveItem() { bool success = false; if (IsMonitoringAdmin) { try { bool isUpdate = (IView == ItemView.Edit); item = (isUpdate) ? new SPA.ServerFunction(ItemID) : new SPA.ServerFunction(); item.Name = txtName.Text.Trim(); item.Description = txtDescription.Text.Trim(); item.ModifiedBy = CurrentUser.DisplayName; if (!isUpdate) { item.CreatedBy = item.ModifiedBy; if (item.Insert()) { success = true; } } else { if (item.Update()) { success = true; } } ItemID = (success) ? item.ID : 0; } catch (Exception ex) { SPA.Error.WriteError(ex); if (ShowDebug) { lblErrorMessage.Text = ex.ToString(); } } } return(success); }
public void RegisterServerFunction(string functionName, ServerFunction function) { functionToString.Add(function, functionName); stringToFunction.Add(functionName, function); }
//Copy Constructor public ServerFunction(ServerFunction obj) { LocalHost = obj.LocalHost; User = obj.User; Pass = obj.Pass; }