public LinksAndResources()
        {
            RefreshControl();
            CommunitySettings cdo = CustomDataObject.Get <CommunitySettings>(CommunitySettings.Key);

            Links = cdo.Links == null || cdo.Links.Count.Equals(0) ? new Dictionary <string, Dictionary <string, string> >() : cdo.Links.ContainsKey(EncompassHelper.LastPersona) ? cdo.Links[EncompassHelper.LastPersona] : cdo.Links["Default"];
        }
示例#2
0
 public ExportServicePlugin_Config()
 {
     InitializeComponent();
     Config = CustomDataObject.Get <ExportServiceConfigs>(ExportServiceConfigs.Key);
     cmbService.Items.AddRange(Enum.GetNames(typeof(GSEServiceType)));
     Forms = Session.FormManager.GetFormInfos(InputFormType.Custom);
     chkForms.Items.AddRange(Forms.OrderBy(x => x.Name).Select(x => x.Name).ToArray());
 }
示例#3
0
        public LoanInformation()
        {
            InitializeComponent();
            CommunitySettings cdo = CustomDataObject.Get <CommunitySettings>(CommunitySettings.Key);

            Fields = cdo.LoanInformation == null || cdo.LoanInformation.Count.Equals(0) ? new Dictionary <string, string>() : cdo.LoanInformation.ContainsKey(EncompassHelper.LastPersona) ? cdo.LoanInformation[EncompassHelper.LastPersona] : cdo.LoanInformation["Default"];
            RefreshInfo();
        }
        public override void NativeFormLoaded(object sender, FormOpenedArgs e)
        {
            openedForm = e.OpenForm;
            if (openedForm == null || (openedForm.IsDisposed || !openedForm.Text.Contains("Trigger")))
            {
                return;
            }

            RuleLockCDO  cdo    = CustomDataObject.Get <RuleLockCDO>(RuleLockCDO.Key);
            int          id     = ((EllieMae.EMLite.Setup.TriggerEditor)openedForm.ActiveControl.TopLevelControl).Trigger.RuleID;
            RuleLockInfo locked = cdo.Rules?.FirstOrDefault(x => x.RuleID.Equals(id)) ?? (RuleLockInfo)null;

            TextBox comments = openedForm.AllControls <TextBox>().FirstOrDefault(x => x.Name.Equals("commentsTxt"));

            if (comments == null)
            {
                return;
            }

            Button ok = openedForm.AllControls <Button>().FirstOrDefault(x => x.Name.Equals("okBtn"));

            if (ok == null)
            {
                return;
            }

            ok.Click += Ok_Click;

            FlowLayoutPanel p = new FlowLayoutPanel();

            openedForm.Controls.Add(p);
            p.Left          = comments.Left;
            p.Top           = comments.Bottom + 20;
            p.Size          = comments.Size;
            p.FlowDirection = FlowDirection.LeftToRight;

            Locked = new CheckBox();
            p.Controls.Add(Locked);
            Locked.Text = "Lock Rule";

            TextBox lockedBy = new TextBox();

            p.Controls.Add(lockedBy);

            Button diff = new Button();

            p.Controls.Add(diff);
            diff.Text   = "Diff";
            diff.Click += Diff_Click;

            if (locked != null)
            {
                lockedBy.Text  = $"Locked By {locked.ID}";
                Locked.Checked = locked.Locked;
                ok.Enabled     = locked.Locked && locked.ID.Equals(EncompassHelper.User.ID) ? false : true;
            }
        }
        public PluginManagement_Form()
        {
            InitializeComponent();
            CommunitySettings cdo = CustomDataObject.Get <CommunitySettings>(CommunitySettings.Key);

            chkAdmin.Checked = cdo.SuperAdminRun;
            chkSide.Checked  = cdo.SideMenuOpenByDefault.Contains("True");
            txtTest.Text     = cdo.TestServer;
            flwPlugins.Controls.Add(new AccessControl());
        }
        private void btnSave_Click(object sender, System.EventArgs e)
        {
            CommunitySettings cdo = CustomDataObject.Get <CommunitySettings>(CommunitySettings.Key);

            cdo.SideMenuOpenByDefault = chkSide.Checked ? "True" : "False";
            cdo.SuperAdminRun         = chkAdmin.Checked;
            cdo.TestServer            = txtTest.Text;
            CustomDataObject.Save <CommunitySettings>(CommunitySettings.Key, cdo);
            MessageBox.Show($" Saved");
        }
        private void InitControls()
        {
            CDO = CustomDataObject.Get <LoanFolderRules>(LoanFolderRules.Key);
            dgvFolders.Columns.Add("Loan Folder", "Loan Folder");
            foreach (string folder in EncompassHelper.GetFolders())
            {
                dgvFolders.Rows.Add(folder);
            }

            cmbMilestone.Items.AddRange(EncompassHelper.GetAllMilestones());
        }
示例#8
0
        private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e)
        {
            ContextMenuStrip menu = sender as ContextMenuStrip;
            ToolStripItem    vip  = menu.Items.Cast <ToolStripItem>().Where(x => x.Text.Contains(nameof(VIP))).FirstOrDefault();

            if (vip != null)
            {
                VIPCDO cdo      = CustomDataObject.Get <VIPCDO>(VIPCDO.Key);
                GVItem selected = FormWrapper.GetPipeline().SelectedItems.FirstOrDefault();
                vip.Text = "Mark As VIP";

                if (cdo.Loans.Contains((selected?.Tag as PipelineInfo).GUID))
                {
                    vip.Text = "Marked VIP";
                }
            }
        }
示例#9
0
        private void Item_Click(object sender, EventArgs e)
        {
            GridView gridView = FormWrapper.GetPipeline();
            VIPCDO   cdo      = CustomDataObject.Get <VIPCDO>(VIPCDO.Key);
            string   guid     = (gridView.SelectedItems.FirstOrDefault().Tag as PipelineInfo).GUID;

            if (cdo.Loans.Contains(guid))
            {
                cdo.Loans.Remove(guid);
            }
            else
            {
                cdo.Loans.Add(guid);
            }


            CustomDataObject.Save <VIPCDO>(VIPCDO.Key, cdo);
        }
示例#10
0
        public override void DataExchangeReceived(object sender, DataExchangeEventArgs e)
        {
            if (!ConcurrentUser)
            {
                return;
            }

            RuleLockInfo info = JsonConvert.DeserializeObject <RuleLockInfo>(e.Data.ToString(), new Newtonsoft.Json.JsonSerializerSettings
            {
                TypeNameHandling  = Newtonsoft.Json.TypeNameHandling.Auto,
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
            });


            RuleLockCDO cdo = CustomDataObject.Get <RuleLockCDO>(RuleLockCDO.Key);

            cdo.Rules.Add(info);
            CustomDataObject.Save <RuleLockCDO>(RuleLockCDO.Key, cdo);
        }
        public override void PipelineTabChanged(object sender, EventArgs e)
        {
            cdo = CustomDataObject.Get <PipelineFilterCDO>(PipelineFilterCDO.Key);
            if (cdo == null)
            {
                return;
            }

            TabControl tab     = sender as TabControl;
            TabPage    tabPage = tab.TabPages[tab.SelectedIndex];

            Folder = tabPage.Controls.Find("cboFolder", true)[0] as CheckedComboBox;
            View   = tabPage.Controls.Find("cboView", true)[0] as ComboBox;
            View.SelectedIndexChanged += View_SelectedIndexChanged;
            Control c = tabPage.Controls.Find("gradientPanel1", true).FirstOrDefault();

            if (c != null && c.Controls.Find("save", true).Count().Equals(0))
            {
                Filter = new ComboBox();
                Label  label  = new Label();
                Button save   = new Button();
                Button delete = new Button();
                c.Controls.Add(label);
                c.Controls.Add(Filter);
                c.Controls.Add(save);
                c.Controls.Add(delete);
                Point p = c.Controls.Find("btnManageViews", true).FirstOrDefault().Location;
                label.Location               = new Point(p.X + 20, p.Y);
                label.Text                   = "Filters";
                label.Size                   = new Size(label.Size.Width / 2, label.Size.Height);
                Filter.Location              = new Point(label.Location.X + label.Width + 5, label.Location.Y);
                Filter.SelectedValueChanged += Filter_SelectedValueChanged;
                save.Location                = new Point(Filter.Location.X + Filter.Width + 5, Filter.Location.Y);
                save.Click                  += Save_Click;
                save.Text       = "Save";
                delete.Location = new Point(save.Location.X + save.Width + 5, save.Location.Y);
                delete.Click   += Delete_Click;
                delete.Text     = "Delete";

                LoadFilters(Filter);
            }
        }
示例#12
0
        private void GridView_ItemDoubleClick(object source, GVItemEventArgs e)
        {
            VIPCDO cdo = CustomDataObject.Get <VIPCDO>(VIPCDO.Key);

            if (cdo.Loans.Contains(EncompassApplication.CurrentLoan.Guid))
            {
                UserGroup group = EncompassApplication.Session.Users.Groups.GetGroupByName("VIP");
                if (group == null)
                {
                    return;
                }

                UserList users = group.GetUsers();
                if (!users.Contains(EncompassApplication.CurrentUser))
                {
                    Session.Application.GetService <ILoanConsole>().CloseLoanWithoutPrompts(false);
                    EncompassHelper.ShowOnTop("VIP", "You do not have access to this loan.");
                }
            }
        }
        public override void Committed(object sender, EventArgs e)
        {
            Loan            l      = EncompassHelper.CurrentLoan;
            string          folder = l.LoanFolder;
            LoanFolderRules rules  = CustomDataObject.Get <LoanFolderRules>(LoanFolderRules.Key);

            foreach (LoanFolderRule rule in rules.Rules.Where(x => x.Active && !x.FolderName.Equals(folder)).OrderBy(x => x.Order))
            {
                if (rule.Calculate())
                {
                    Request = new FolderMoveRequest()
                    {
                        LoanFolder = rule.FolderName,
                        GUID       = l.Guid,
                        LoanName   = l.LoanName
                    };

                    FormWrapper.TabControl.ControlRemoved += TabControl_ControlRemoved;
                }
            }
        }
示例#14
0
        public static bool CheckAccess(string pluginName)
        {
            CommunitySettings        cdo    = CustomDataObject.Get <CommunitySettings>(CommunitySettings.Key);
            List <PluginAccessRight> rights = cdo.Rights;

            if (rights.Count.Equals(0))
            {
                rights.Add(new PluginAccessRight()
                {
                    PluginName = nameof(TopMenuBase), AllAccess = true
                });
                rights.Add(new PluginAccessRight()
                {
                    PluginName = nameof(PluginManagement), AllAccess = true
                });
                CustomDataObject.Save <CommunitySettings>(CommunitySettings.Key, cdo);
            }

            PluginAccessRight right = rights.Where(x => x.PluginName.Equals(pluginName)).FirstOrDefault();

            if (right == null)
            {
                return(false);
            }

            bool isAllowedToRun = right.AllAccess;

            if (!isAllowedToRun && right.Personas != null)
            {
                isAllowedToRun = EncompassHelper.ContainsPersona(right.Personas);
            }

            if (!isAllowedToRun && right.UserIDs != null)
            {
                isAllowedToRun = right.UserIDs.Contains(EncompassHelper.User.ID);
            }

            return(isAllowedToRun);
        }
示例#15
0
        private async void SimulateAsync()
        {
            dgvProgress.DataSource = null;

            Loan current = EncompassHelper.CurrentLoan;

            if (current == null)
            {
                MessageBox.Show("Please Open a Loan.");
                this.Close();
            }

            string                folder = current.LoanFolder;
            LoanFolderRules       cdo    = CustomDataObject.Get <LoanFolderRules>(LoanFolderRules.Key);
            List <LoanFolderRule> rules  = cdo.Rules.OrderBy(x => x.Order).ToList();

            dgvProgress.DataSource = rules;

            await Task.Run(() =>
            {
                Run(rules);
            });
        }
        public List <ITask> GetTriggers()
        {
            AutoMailerCDO      cdo      = CustomDataObject.Get <AutoMailerCDO>(AutoMailerCDO.Key);
            List <MailTrigger> Triggers = cdo.Triggers;

            List <ITask> result = new List <ITask>();

            DateTime Now = DateTime.Now;

            foreach (MailTrigger trigger in Triggers.Where(x => x.Active))
            {
                bool run = false;
                if (!trigger.Active)
                {
                    continue;
                }

                bool onTime = trigger.Time.Hour.Equals(Now.Hour) && trigger.Time.Minute.Equals(Now.Minute) && Math.Abs(trigger.Time.Second - Now.Second) < 10;
                run = (trigger.Frequency == Enums.FrequencyType.Daily || trigger.Frequency == Enums.FrequencyType.Weekly || trigger.Frequency == Enums.FrequencyType.BiWeekly) && DaysOfWeek(trigger.Days).Contains(Now.DayOfWeek.ToString()) && onTime;
                if (!run)
                {
                    run = trigger.Frequency == Enums.FrequencyType.Monthly && onTime && Now.Day.Equals(trigger.Date.Day);
                }
                if (!run)
                {
                    run = trigger.Frequency == Enums.FrequencyType.Yearly && onTime && Now.Day.Equals(trigger.Date.Day) && Now.Month.Equals(trigger.Date.Month);
                }

                if (run)
                {
                    result.Add(trigger);
                }
            }

            return(result);
        }
示例#17
0
 public override void LoanOpened(object sender, EventArgs e)
 {
     Config = CustomDataObject.Get <ExportServiceConfigs>(ExportServiceConfigs.Key);
 }