public virtual FormViewMode DetermineMode(string EntityID, ScreenInputType EntityInputType) { FormViewMode retVal = FormViewMode.ReadOnly; string EntityIDValue = this.GetEntityIDValue(this.Screen, EntityID, EntityInputType); if (String.IsNullOrEmpty(EntityIDValue)) { retVal = FormViewMode.Insert; } else { retVal = FormViewMode.Edit; } return(retVal); }
public string GetEntityIDValue(Screen screen, string EntityID, ScreenInputType EntityInputType, Control container) { string retVal = null; ScreenDataCommandParameter p = new ScreenDataCommandParameter(EntityID, EntityInputType); object EntityIDValue = Common.GetParameterInputValue(this, p, container); if (EntityIDValue != null) { retVal = EntityIDValue.ToString(); } //switch (EntityInputType) //{ // case ScreenInputType.QueryString: // EntityIDValue = Request.QueryString[EntityID]; // break; // case ScreenInputType.User: // try // { // List<string> profileProperties = CodeTorch.Core.Configuration.GetInstance().App.ProfileProperties; // int propertyIndex = Enumerable.Range(0, profileProperties.Count).First(i => profileProperties[i].ToLower() == EntityID.ToLower()); // FormsIdentity identity = (FormsIdentity)HttpContext.Current.User.Identity; // FormsAuthenticationTicket ticket = identity.Ticket; // EntityIDValue = ticket.UserData.Split('|')[propertyIndex]; // } // catch { } // break; //} return(retVal); }
public string GetEntityIDValue(Screen screen, string EntityID, ScreenInputType EntityInputType) { return(GetEntityIDValue(screen, EntityID, EntityInputType, this)); }
public ScreenDataCommandParameter(string Key, object Value, ScreenInputType Type) { InputKey = Key; InputType = Type; this.Value = Value; }
public ScreenDataCommandParameter(string Key, ScreenInputType Type) { InputKey = Key; InputType = Type; }
public ReportParameter(string Key, object Value, ScreenInputType Type) { InputKey = Key; InputType = Type; this.Value = Value; }
public ReportParameter(string Key, ScreenInputType Type) { InputKey = Key; InputType = Type; }