Пример #1
0
        /// <summary>
        /// Update the account list priorities
        /// </summary>
        /// <param name="Priority"></param>
        private void UpdateAccountPriorities(string Priority)
        {
            if (gvCompany.RowCount < 1)
                return;

            /**
             * we need to get all the lists first and queue this items.
             */
            #region Code Logic
            List<CTFinalCallListAccount> _lstAccounts = new List<CTFinalCallListAccount>();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                CTFinalCallListAccount _item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(_item.selected))
                {
                    _item.priority = Priority;
                    _lstAccounts.Add(_item);
                }
            }
            this.QueueUpdatedCallListAccounts(_lstAccounts);
            #endregion

            CTFinalCallListAccount item = new CTFinalCallListAccount();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(item.selected))
                    gvCompany.SetRowCellValue(i, "priority", Priority);
            }
        }
Пример #2
0
 /// <summary>
 /// Sets the focused view instance of the grid
 /// </summary>
 private void GetFocusedAccount()
 {
     m_SelectedAccount = gvCompany.GetFocusedRow() as CTFinalCallListAccount;
 }
Пример #3
0
        private void cmdCompanyReleaseLockForSelected_Click(object sender, EventArgs e)
        {
            if (gvCompany.RowCount < 1)
                return;

            WaitDialog.Show(ParentForm, "Queueing items...");
            List<int> ItemsToUnlock = new List<int>();
            CTFinalCallListAccount item = new CTFinalCallListAccount();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(item.selected) && !string.IsNullOrEmpty(item.locked_by))
                {
                    ItemsToUnlock.Add(item.id);
                    gvCompany.SetRowCellValue(i, "locked_by", "");
                }
            }

            if (ItemsToUnlock.Count > 0)
                ObjectCallList.ReleaseAccountLocks(ItemsToUnlock);

            WaitDialog.Close();
        }
Пример #4
0
        private void cmdCompanyDeActivate_Click(object sender, EventArgs e)
        {
            if (gvCompany.RowCount < 1)
                return;

            WaitDialog.Show(ParentForm, "Updating account list...");
            CTFinalCallListAccount item = new CTFinalCallListAccount();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(item.selected))
                    gvCompany.SetRowCellValue(i, "active", "No");
            }
            WaitDialog.Close();
        }
Пример #5
0
        private void cmdApplyCustomAssignedTo_Click(object sender, EventArgs e)
        {
            if (txtCustomAssignedTo.Text.Length < 1)
            {
                MessageBox.Show("Please enter a custom assigned to text.", "Bright Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtCustomAssignedTo.Focus();
                return;
            }

            if (gvCompany.RowCount < 1)
                return;

            WaitDialog.Show(ParentForm, "Updating account list...");
            CTFinalCallListAccount item = new CTFinalCallListAccount();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(item.selected))
                    gvCompany.SetRowCellValue(i, "assigned_to", txtCustomAssignedTo.Text);
            }

            gvCompany.BestFitColumns();
            WaitDialog.Close();
        }
Пример #6
0
        private void cmcCompanyAssignSalesUser_Click(object sender, EventArgs e)
        {
            if (gvCompany.RowCount < 1)
                return;

            WaitDialog.Show(ParentForm, "Updating account list...");
            CTFinalCallListAccount item = new CTFinalCallListAccount();
            for (int i = 0; i < gvCompany.RowCount; i++)
            {
                item = gvCompany.GetRow(i) as CTFinalCallListAccount;
                if (Convert.ToBoolean(item.selected))
                    gvCompany.SetRowCellValue(i, "assigned_to", cboSalesUser.Text);
            }

            gvCompany.BestFitColumns();
            WaitDialog.Close();
        }