/// <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); } }
/// <summary> /// Sets the focused view instance of the grid /// </summary> private void GetFocusedAccount() { m_SelectedAccount = gvCompany.GetFocusedRow() as CTFinalCallListAccount; }
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(); }
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(); }
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(); }
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(); }