protected void Page_Load(object sender, EventArgs e)
    {
        Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService clientGroupContext = new Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService();
        Page.Form.Controls.Add(clientGroupContext);

        SelectedLead.ReturnPrimaryKey = true;
        SelectedLead.ID = "SelectedLead";
        SelectedLead.LookupEntityName = "Lead";
        SelectedLead.LookupEntityTypeName = "Sage.SalesLogix.Entities.Lead, Sage.SalesLogix.Entities";
        for (int i = 0; i < SelectedLead.LookupProperties.Count; i++)
        {
            SelectedLead.LookupProperties[i].PropertyName = SelectedLead.LookupProperties[i].PropertyName.Replace("Lead.", "");
        }
        SelectedLead.SeedProperty = "";
        SelectedLead.SeedValue = "";
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService clientGroupContext = new Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService();
        Page.Form.Controls.Add(clientGroupContext);

        SelectedLead.ReturnPrimaryKey = true;
        SelectedLead.ID = "SelectedLead";
        SelectedLead.LookupEntityName     = "Lead";
        SelectedLead.LookupEntityTypeName = "Sage.SalesLogix.Entities.Lead, Sage.SalesLogix.Entities";
        for (int i = 0; i < SelectedLead.LookupProperties.Count; i++)
        {
            SelectedLead.LookupProperties[i].PropertyName = SelectedLead.LookupProperties[i].PropertyName.Replace("Lead.", "");
        }
        SelectedLead.SeedProperty = "";
        SelectedLead.SeedValue    = "";
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService clientGroupContext = new Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService();
        Page.Form.Controls.Add(clientGroupContext);

        SelectedContact.ReturnPrimaryKey = true;
        if ((Request.Params["OpportunityId"] != null) && (Request.Params["OpportunityId"].ToString() != ""))
        {
            SelectedContact.ID = "SelectedOppContact";
            SelectedContact.LookupEntityName     = "OpportunityContact";
            SelectedContact.LookupEntityTypeName = "Sage.SalesLogix.Entities.OpportunityContact, Sage.SalesLogix.Entities";
            for (int i = 0; i < SelectedContact.LookupProperties.Count; i++)
            {
                SelectedContact.LookupProperties[i].PropertyName = "Contact." + SelectedContact.LookupProperties[i].PropertyName;
            }
            SelectedContact.SeedProperty = "Opportunity.Id";
            SelectedContact.SeedValue    = Request.Params["OpportunityId"].ToString();
        }
        else
        {
            SelectedContact.ID = "SelectedContact";
            SelectedContact.LookupEntityName     = "Contact";
            SelectedContact.LookupEntityTypeName = "Sage.SalesLogix.Entities.Contact, Sage.SalesLogix.Entities";
            for (int i = 0; i < SelectedContact.LookupProperties.Count; i++)
            {
                SelectedContact.LookupProperties[i].PropertyName = SelectedContact.LookupProperties[i].PropertyName.Replace("Contact.", "");
            }
            SelectedContact.SeedProperty = "";
            SelectedContact.SeedValue    = "";
        }
        if ((Request.Params["AccountId"] != null) && (Request.Params["AccountId"].ToString() != ""))
        {
            SelectedContact.SeedProperty = "Account.Id";
            SelectedContact.SeedValue    = Request.Params["AccountId"].ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService clientGroupContext = new Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService();
        Page.Form.Controls.Add(clientGroupContext);

        SelectedContact.ReturnPrimaryKey = true;
        if ((Request.Params["OpportunityId"] != null) && (Request.Params["OpportunityId"].ToString() != ""))
        {
            SelectedContact.ID = "SelectedOppContact";
            SelectedContact.LookupEntityName = "OpportunityContact";
            SelectedContact.LookupEntityTypeName = "Sage.SalesLogix.Entities.OpportunityContact, Sage.SalesLogix.Entities";
            for (int i = 0; i < SelectedContact.LookupProperties.Count; i++)
            {
                SelectedContact.LookupProperties[i].PropertyName = "Contact." + SelectedContact.LookupProperties[i].PropertyName;
            }
            SelectedContact.SeedProperty = "Opportunity.Id";
            SelectedContact.SeedValue = Request.Params["OpportunityId"].ToString();
        }
        else
        {
            SelectedContact.ID = "SelectedContact";
            SelectedContact.LookupEntityName = "Contact";
            SelectedContact.LookupEntityTypeName = "Sage.SalesLogix.Entities.Contact, Sage.SalesLogix.Entities";
            for (int i = 0; i < SelectedContact.LookupProperties.Count; i++)
            {
                SelectedContact.LookupProperties[i].PropertyName = SelectedContact.LookupProperties[i].PropertyName.Replace("Contact.", "");
            }
            SelectedContact.SeedProperty = "";
            SelectedContact.SeedValue = "";
        }
        if ((Request.Params["AccountId"] != null) && (Request.Params["AccountId"].ToString() != ""))
        {
            SelectedContact.SeedProperty = "Account.Id";
            SelectedContact.SeedValue = Request.Params["AccountId"].ToString();
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService clientGroupContext = new Sage.SalesLogix.Client.GroupBuilder.ClientGroupContextService();
            Page.Form.Controls.Add(clientGroupContext);

            Timeless.CheckedChanged += new EventHandler(Timeless_ChangeAction);
            CompleteAsScheduled.Click += new EventHandler(CompleteAsScheduled_ClickAction);
            CompleteNow.Click += new EventHandler(CompleteNow_ClickAction);
            btnCancel.Click += new EventHandler(btnCancel_Click);

            _mainTable = Request.Params["maintable"];
            if (!string.IsNullOrEmpty(_mainTable))
            {
                if (_mainTable.ToUpper() == "LEAD")
                {
                    IsLead = true;
                }
            }

            if (!IsPostBack)
            {
                Sage.SalesLogix.Activity.History hist = GetHistoryRecord();
                Completed.DateTimeValue = hist.CompletedDate;
                Scheduled.DateTimeValue = hist.StartDate;
                Duration.Value = ((hist.Duration == 0) ? 1 : hist.Duration);
                Timeless.Checked = hist.Timeless;
                if (!IsLead)
                {
                    luContact.LookupResultValue = hist.ContactId;
                    luContact.SeedValue = hist.AccountId;
                    luOpportunity.LookupResultValue = hist.OpportunityId;
                    luOpportunity.SeedValue = hist.AccountId;
                    luTicket.LookupResultValue = hist.TicketId;
                    luTicket.SeedValue = hist.AccountId;
                    luAccount.LookupResultValue = hist.AccountName;
                }
                else
                {
                    ContactIdDiv.Style.Value = "display:none";
                    OpportunityIdDiv.Style.Value = "display:none";
                    TicketIdDiv.Style.Value = "display:none";
                    AccountIdDiv.Style.Value = "display:none";
                    LeadIdDiv.Style.Value = "";
                    luLead.LookupResultValue = hist.LeadId;
                    FollowUp.Enabled = false;
                    CarryOverNotes.Enabled = false;
                }
                Description.PickListValue = hist.Description;
                Notes.Text = hist.LongNotes;
                Priority.PickListValue = hist.Priority;
                Category.PickListValue = hist.Category;
                CreateUser.LookupResultValue = hist.CreateUser;
                if ((hist.Result == null) || (hist.Result == ""))
                    Result.PickListValue = "Complete";
                else
                    Result.PickListValue = hist.Result;
            }
        }