1326 lines
65 KiB
C#
1326 lines
65 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Windows.Forms;
|
|
using GZTW.AyaNova.BLL;
|
|
using Infragistics.Win;
|
|
using Infragistics.Win.UltraWinGrid;
|
|
using System.Reflection;
|
|
using log4net;
|
|
|
|
|
|
namespace AyaNova
|
|
{
|
|
/// <summary>
|
|
/// Summary description for DashboardForm.
|
|
/// </summary>
|
|
public class DashboardForm : System.Windows.Forms.Form
|
|
{
|
|
// Create a logger for use in this class
|
|
//case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
|
|
private System.Windows.Forms.ErrorProvider ErrorProvider;
|
|
private System.ComponentModel.IContainer components;
|
|
private System.Windows.Forms.HelpProvider helpProvider1;
|
|
private Panel pnlCompany;
|
|
private Panel pnlUser;
|
|
private Label hdrMy;
|
|
private DataGridView gridMyOverdue;
|
|
private Panel pnlMyWOOverDue;
|
|
private Panel pnlMyTitle;
|
|
private Label lblMyOverdue;
|
|
private Panel pnlMyWOScheduled;
|
|
private DataGridView gridMyScheduled;
|
|
private Label lblMyScheduled;
|
|
private Panel pnlMyServiceRateSummary;
|
|
private DataGridView gridMyServiceRateSummary;
|
|
private Label lblMyServiceRateSummary;
|
|
private Panel pnlMyReminders;
|
|
private DataGridView gridMyReminders;
|
|
private Label label1;
|
|
private Panel pnlMyNewMemos;
|
|
private DataGridView gridMyNewMemos;
|
|
private Label label2;
|
|
private Panel pnlCompanyNotAssigned;
|
|
private DataGridView gridCompanyNotAssigned;
|
|
private Label label4;
|
|
private Panel pnlCompanyTitle;
|
|
private Label lblCompany;
|
|
private Panel pnlCompanyNewServiceRequests;
|
|
private DataGridView gridCompanyNewServiceRequests;
|
|
private Label label8;
|
|
private Panel pnlCompanyServiceRateSummary;
|
|
private DataGridView gridCompanyServiceRateSummary;
|
|
private Label label7;
|
|
private Panel pnlCompanyNextScheduled;
|
|
private DataGridView gridCompanyNext;
|
|
private Label label6;
|
|
private Panel pnlCompanyOverdue;
|
|
private DataGridView gridCompanyOverdue;
|
|
private Label label5;
|
|
private TableLayoutPanel tblOuter;
|
|
private TableLayoutPanel hdrTablePanel;
|
|
private Button btnNewWorkorder;
|
|
private Button btnNewClient;
|
|
private Button btnRefresh;
|
|
private Timer timerGridRefresh;
|
|
|
|
|
|
bool full = !AyaBizUtils.Lite;
|
|
|
|
public DashboardForm()
|
|
{
|
|
//
|
|
// Required for Windows Form Designer support
|
|
//
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Clean up any resources being used.
|
|
/// </summary>
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing)
|
|
{
|
|
if (components != null)
|
|
{
|
|
components.Dispose();
|
|
}
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
#region Windows Form Designer generated code
|
|
/// <summary>
|
|
/// Required method for Designer support - do not modify
|
|
/// the contents of this method with the code editor.
|
|
/// </summary>
|
|
private void InitializeComponent()
|
|
{
|
|
this.components = new System.ComponentModel.Container();
|
|
this.ErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
|
|
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
|
|
this.pnlUser = new System.Windows.Forms.Panel();
|
|
this.pnlMyNewMemos = new System.Windows.Forms.Panel();
|
|
this.gridMyNewMemos = new System.Windows.Forms.DataGridView();
|
|
this.label2 = new System.Windows.Forms.Label();
|
|
this.pnlMyReminders = new System.Windows.Forms.Panel();
|
|
this.gridMyReminders = new System.Windows.Forms.DataGridView();
|
|
this.label1 = new System.Windows.Forms.Label();
|
|
this.pnlMyServiceRateSummary = new System.Windows.Forms.Panel();
|
|
this.gridMyServiceRateSummary = new System.Windows.Forms.DataGridView();
|
|
this.lblMyServiceRateSummary = new System.Windows.Forms.Label();
|
|
this.pnlMyWOScheduled = new System.Windows.Forms.Panel();
|
|
this.gridMyScheduled = new System.Windows.Forms.DataGridView();
|
|
this.lblMyScheduled = new System.Windows.Forms.Label();
|
|
this.pnlMyWOOverDue = new System.Windows.Forms.Panel();
|
|
this.gridMyOverdue = new System.Windows.Forms.DataGridView();
|
|
this.lblMyOverdue = new System.Windows.Forms.Label();
|
|
this.pnlMyTitle = new System.Windows.Forms.Panel();
|
|
this.hdrMy = new System.Windows.Forms.Label();
|
|
this.pnlCompany = new System.Windows.Forms.Panel();
|
|
this.pnlCompanyNewServiceRequests = new System.Windows.Forms.Panel();
|
|
this.gridCompanyNewServiceRequests = new System.Windows.Forms.DataGridView();
|
|
this.label8 = new System.Windows.Forms.Label();
|
|
this.pnlCompanyServiceRateSummary = new System.Windows.Forms.Panel();
|
|
this.gridCompanyServiceRateSummary = new System.Windows.Forms.DataGridView();
|
|
this.label7 = new System.Windows.Forms.Label();
|
|
this.pnlCompanyNextScheduled = new System.Windows.Forms.Panel();
|
|
this.gridCompanyNext = new System.Windows.Forms.DataGridView();
|
|
this.label6 = new System.Windows.Forms.Label();
|
|
this.pnlCompanyOverdue = new System.Windows.Forms.Panel();
|
|
this.gridCompanyOverdue = new System.Windows.Forms.DataGridView();
|
|
this.label5 = new System.Windows.Forms.Label();
|
|
this.pnlCompanyNotAssigned = new System.Windows.Forms.Panel();
|
|
this.gridCompanyNotAssigned = new System.Windows.Forms.DataGridView();
|
|
this.label4 = new System.Windows.Forms.Label();
|
|
this.pnlCompanyTitle = new System.Windows.Forms.Panel();
|
|
this.lblCompany = new System.Windows.Forms.Label();
|
|
this.tblOuter = new System.Windows.Forms.TableLayoutPanel();
|
|
this.hdrTablePanel = new System.Windows.Forms.TableLayoutPanel();
|
|
this.btnNewWorkorder = new System.Windows.Forms.Button();
|
|
this.btnRefresh = new System.Windows.Forms.Button();
|
|
this.btnNewClient = new System.Windows.Forms.Button();
|
|
this.timerGridRefresh = new System.Windows.Forms.Timer(this.components);
|
|
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).BeginInit();
|
|
this.pnlUser.SuspendLayout();
|
|
this.pnlMyNewMemos.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyNewMemos)).BeginInit();
|
|
this.pnlMyReminders.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyReminders)).BeginInit();
|
|
this.pnlMyServiceRateSummary.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyServiceRateSummary)).BeginInit();
|
|
this.pnlMyWOScheduled.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyScheduled)).BeginInit();
|
|
this.pnlMyWOOverDue.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyOverdue)).BeginInit();
|
|
this.pnlMyTitle.SuspendLayout();
|
|
this.pnlCompany.SuspendLayout();
|
|
this.pnlCompanyNewServiceRequests.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNewServiceRequests)).BeginInit();
|
|
this.pnlCompanyServiceRateSummary.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyServiceRateSummary)).BeginInit();
|
|
this.pnlCompanyNextScheduled.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNext)).BeginInit();
|
|
this.pnlCompanyOverdue.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyOverdue)).BeginInit();
|
|
this.pnlCompanyNotAssigned.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNotAssigned)).BeginInit();
|
|
this.pnlCompanyTitle.SuspendLayout();
|
|
this.tblOuter.SuspendLayout();
|
|
this.hdrTablePanel.SuspendLayout();
|
|
this.SuspendLayout();
|
|
//
|
|
// ErrorProvider
|
|
//
|
|
this.ErrorProvider.ContainerControl = this;
|
|
//
|
|
// pnlUser
|
|
//
|
|
this.pnlUser.BackColor = System.Drawing.SystemColors.Window;
|
|
this.pnlUser.Controls.Add(this.pnlMyNewMemos);
|
|
this.pnlUser.Controls.Add(this.pnlMyReminders);
|
|
this.pnlUser.Controls.Add(this.pnlMyServiceRateSummary);
|
|
this.pnlUser.Controls.Add(this.pnlMyWOScheduled);
|
|
this.pnlUser.Controls.Add(this.pnlMyWOOverDue);
|
|
this.pnlUser.Controls.Add(this.pnlMyTitle);
|
|
this.pnlUser.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.pnlUser.Location = new System.Drawing.Point(3, 61);
|
|
this.pnlUser.Name = "pnlUser";
|
|
this.pnlUser.Padding = new System.Windows.Forms.Padding(20);
|
|
this.pnlUser.Size = new System.Drawing.Size(394, 1092);
|
|
this.pnlUser.TabIndex = 1;
|
|
//
|
|
// pnlMyNewMemos
|
|
//
|
|
this.pnlMyNewMemos.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyNewMemos.Controls.Add(this.gridMyNewMemos);
|
|
this.pnlMyNewMemos.Controls.Add(this.label2);
|
|
this.pnlMyNewMemos.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyNewMemos.Location = new System.Drawing.Point(20, 611);
|
|
this.pnlMyNewMemos.Name = "pnlMyNewMemos";
|
|
this.pnlMyNewMemos.Size = new System.Drawing.Size(354, 139);
|
|
this.pnlMyNewMemos.TabIndex = 7;
|
|
this.pnlMyNewMemos.Tag = "InfoPanel";
|
|
//
|
|
// gridMyNewMemos
|
|
//
|
|
this.gridMyNewMemos.AllowUserToAddRows = false;
|
|
this.gridMyNewMemos.AllowUserToDeleteRows = false;
|
|
this.gridMyNewMemos.AllowUserToResizeColumns = false;
|
|
this.gridMyNewMemos.AllowUserToResizeRows = false;
|
|
this.gridMyNewMemos.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridMyNewMemos.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridMyNewMemos.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridMyNewMemos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridMyNewMemos.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridMyNewMemos.Location = new System.Drawing.Point(0, 17);
|
|
this.gridMyNewMemos.Name = "gridMyNewMemos";
|
|
this.gridMyNewMemos.ReadOnly = true;
|
|
this.gridMyNewMemos.Size = new System.Drawing.Size(354, 105);
|
|
this.gridMyNewMemos.TabIndex = 1;
|
|
this.gridMyNewMemos.Tag = "MyNewMemos";
|
|
//
|
|
// label2
|
|
//
|
|
this.label2.AutoSize = true;
|
|
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label2.Location = new System.Drawing.Point(0, 0);
|
|
this.label2.Name = "label2";
|
|
this.label2.Size = new System.Drawing.Size(132, 17);
|
|
this.label2.TabIndex = 2;
|
|
this.label2.Tag = "h2";
|
|
this.label2.Text = "LT:Memo.Label.List";
|
|
//
|
|
// pnlMyReminders
|
|
//
|
|
this.pnlMyReminders.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyReminders.Controls.Add(this.gridMyReminders);
|
|
this.pnlMyReminders.Controls.Add(this.label1);
|
|
this.pnlMyReminders.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyReminders.Location = new System.Drawing.Point(20, 471);
|
|
this.pnlMyReminders.Name = "pnlMyReminders";
|
|
this.pnlMyReminders.Size = new System.Drawing.Size(354, 140);
|
|
this.pnlMyReminders.TabIndex = 6;
|
|
this.pnlMyReminders.Tag = "InfoPanel";
|
|
//
|
|
// gridMyReminders
|
|
//
|
|
this.gridMyReminders.AllowUserToAddRows = false;
|
|
this.gridMyReminders.AllowUserToDeleteRows = false;
|
|
this.gridMyReminders.AllowUserToResizeColumns = false;
|
|
this.gridMyReminders.AllowUserToResizeRows = false;
|
|
this.gridMyReminders.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridMyReminders.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridMyReminders.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridMyReminders.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridMyReminders.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridMyReminders.Location = new System.Drawing.Point(0, 17);
|
|
this.gridMyReminders.Name = "gridMyReminders";
|
|
this.gridMyReminders.ReadOnly = true;
|
|
this.gridMyReminders.Size = new System.Drawing.Size(354, 105);
|
|
this.gridMyReminders.TabIndex = 1;
|
|
this.gridMyReminders.Tag = "MyReminders";
|
|
//
|
|
// label1
|
|
//
|
|
this.label1.AutoSize = true;
|
|
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label1.Location = new System.Drawing.Point(0, 0);
|
|
this.label1.Name = "label1";
|
|
this.label1.Size = new System.Drawing.Size(210, 17);
|
|
this.label1.TabIndex = 2;
|
|
this.label1.Tag = "h2";
|
|
this.label1.Text = "LT:Dashboard.Label.Reminders";
|
|
//
|
|
// pnlMyServiceRateSummary
|
|
//
|
|
this.pnlMyServiceRateSummary.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyServiceRateSummary.Controls.Add(this.gridMyServiceRateSummary);
|
|
this.pnlMyServiceRateSummary.Controls.Add(this.lblMyServiceRateSummary);
|
|
this.pnlMyServiceRateSummary.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyServiceRateSummary.Location = new System.Drawing.Point(20, 332);
|
|
this.pnlMyServiceRateSummary.Name = "pnlMyServiceRateSummary";
|
|
this.pnlMyServiceRateSummary.Size = new System.Drawing.Size(354, 139);
|
|
this.pnlMyServiceRateSummary.TabIndex = 5;
|
|
this.pnlMyServiceRateSummary.Tag = "InfoPanel";
|
|
//
|
|
// gridMyServiceRateSummary
|
|
//
|
|
this.gridMyServiceRateSummary.AllowUserToAddRows = false;
|
|
this.gridMyServiceRateSummary.AllowUserToDeleteRows = false;
|
|
this.gridMyServiceRateSummary.AllowUserToResizeColumns = false;
|
|
this.gridMyServiceRateSummary.AllowUserToResizeRows = false;
|
|
this.gridMyServiceRateSummary.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridMyServiceRateSummary.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridMyServiceRateSummary.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridMyServiceRateSummary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridMyServiceRateSummary.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridMyServiceRateSummary.Location = new System.Drawing.Point(0, 17);
|
|
this.gridMyServiceRateSummary.Name = "gridMyServiceRateSummary";
|
|
this.gridMyServiceRateSummary.ReadOnly = true;
|
|
this.gridMyServiceRateSummary.Size = new System.Drawing.Size(354, 105);
|
|
this.gridMyServiceRateSummary.TabIndex = 1;
|
|
this.gridMyServiceRateSummary.Tag = "MyServiceRateSummary";
|
|
//
|
|
// lblMyServiceRateSummary
|
|
//
|
|
this.lblMyServiceRateSummary.AutoSize = true;
|
|
this.lblMyServiceRateSummary.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.lblMyServiceRateSummary.Location = new System.Drawing.Point(0, 0);
|
|
this.lblMyServiceRateSummary.Name = "lblMyServiceRateSummary";
|
|
this.lblMyServiceRateSummary.Size = new System.Drawing.Size(332, 17);
|
|
this.lblMyServiceRateSummary.TabIndex = 2;
|
|
this.lblMyServiceRateSummary.Tag = "h2";
|
|
this.lblMyServiceRateSummary.Text = "LT:WorkorderItemLabor.Label.ServiceRateQuantity";
|
|
//
|
|
// pnlMyWOScheduled
|
|
//
|
|
this.pnlMyWOScheduled.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyWOScheduled.Controls.Add(this.gridMyScheduled);
|
|
this.pnlMyWOScheduled.Controls.Add(this.lblMyScheduled);
|
|
this.pnlMyWOScheduled.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyWOScheduled.Location = new System.Drawing.Point(20, 192);
|
|
this.pnlMyWOScheduled.Name = "pnlMyWOScheduled";
|
|
this.pnlMyWOScheduled.Size = new System.Drawing.Size(354, 140);
|
|
this.pnlMyWOScheduled.TabIndex = 4;
|
|
this.pnlMyWOScheduled.Tag = "InfoPanel";
|
|
//
|
|
// gridMyScheduled
|
|
//
|
|
this.gridMyScheduled.AllowUserToAddRows = false;
|
|
this.gridMyScheduled.AllowUserToDeleteRows = false;
|
|
this.gridMyScheduled.AllowUserToResizeColumns = false;
|
|
this.gridMyScheduled.AllowUserToResizeRows = false;
|
|
this.gridMyScheduled.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridMyScheduled.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridMyScheduled.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridMyScheduled.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridMyScheduled.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridMyScheduled.Location = new System.Drawing.Point(0, 17);
|
|
this.gridMyScheduled.Name = "gridMyScheduled";
|
|
this.gridMyScheduled.ReadOnly = true;
|
|
this.gridMyScheduled.Size = new System.Drawing.Size(354, 105);
|
|
this.gridMyScheduled.TabIndex = 1;
|
|
this.gridMyScheduled.Tag = "MyScheduled";
|
|
//
|
|
// lblMyScheduled
|
|
//
|
|
this.lblMyScheduled.AutoSize = true;
|
|
this.lblMyScheduled.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.lblMyScheduled.Location = new System.Drawing.Point(0, 0);
|
|
this.lblMyScheduled.Name = "lblMyScheduled";
|
|
this.lblMyScheduled.Size = new System.Drawing.Size(209, 17);
|
|
this.lblMyScheduled.TabIndex = 2;
|
|
this.lblMyScheduled.Tag = "h2";
|
|
this.lblMyScheduled.Text = "LT:Dashboard.Label.Scheduled";
|
|
//
|
|
// pnlMyWOOverDue
|
|
//
|
|
this.pnlMyWOOverDue.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyWOOverDue.Controls.Add(this.gridMyOverdue);
|
|
this.pnlMyWOOverDue.Controls.Add(this.lblMyOverdue);
|
|
this.pnlMyWOOverDue.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyWOOverDue.Location = new System.Drawing.Point(20, 59);
|
|
this.pnlMyWOOverDue.Name = "pnlMyWOOverDue";
|
|
this.pnlMyWOOverDue.Size = new System.Drawing.Size(354, 133);
|
|
this.pnlMyWOOverDue.TabIndex = 3;
|
|
this.pnlMyWOOverDue.Tag = "InfoPanel";
|
|
//
|
|
// gridMyOverdue
|
|
//
|
|
this.gridMyOverdue.AllowUserToAddRows = false;
|
|
this.gridMyOverdue.AllowUserToDeleteRows = false;
|
|
this.gridMyOverdue.AllowUserToResizeColumns = false;
|
|
this.gridMyOverdue.AllowUserToResizeRows = false;
|
|
this.gridMyOverdue.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridMyOverdue.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridMyOverdue.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridMyOverdue.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridMyOverdue.Cursor = System.Windows.Forms.Cursors.Default;
|
|
this.gridMyOverdue.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridMyOverdue.Location = new System.Drawing.Point(0, 17);
|
|
this.gridMyOverdue.Name = "gridMyOverdue";
|
|
this.gridMyOverdue.ReadOnly = true;
|
|
this.gridMyOverdue.Size = new System.Drawing.Size(354, 98);
|
|
this.gridMyOverdue.TabIndex = 1;
|
|
this.gridMyOverdue.Tag = "MyOverdue";
|
|
//
|
|
// lblMyOverdue
|
|
//
|
|
this.lblMyOverdue.AutoSize = true;
|
|
this.lblMyOverdue.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.lblMyOverdue.Location = new System.Drawing.Point(0, 0);
|
|
this.lblMyOverdue.Name = "lblMyOverdue";
|
|
this.lblMyOverdue.Size = new System.Drawing.Size(197, 17);
|
|
this.lblMyOverdue.TabIndex = 2;
|
|
this.lblMyOverdue.Tag = "h2";
|
|
this.lblMyOverdue.Text = "LT:Dashboard.Label.Overdue";
|
|
//
|
|
// pnlMyTitle
|
|
//
|
|
this.pnlMyTitle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlMyTitle.Controls.Add(this.hdrMy);
|
|
this.pnlMyTitle.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlMyTitle.Location = new System.Drawing.Point(20, 20);
|
|
this.pnlMyTitle.Name = "pnlMyTitle";
|
|
this.pnlMyTitle.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
|
this.pnlMyTitle.Size = new System.Drawing.Size(354, 39);
|
|
this.pnlMyTitle.TabIndex = 2;
|
|
//
|
|
// hdrMy
|
|
//
|
|
this.hdrMy.AutoSize = true;
|
|
this.hdrMy.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
this.hdrMy.ForeColor = System.Drawing.SystemColors.WindowText;
|
|
this.hdrMy.Location = new System.Drawing.Point(4, 0);
|
|
this.hdrMy.Name = "hdrMy";
|
|
this.hdrMy.Size = new System.Drawing.Size(364, 37);
|
|
this.hdrMy.TabIndex = 0;
|
|
this.hdrMy.Tag = "h1";
|
|
this.hdrMy.Text = "LT:UI.Label.CurrentUserName";
|
|
//
|
|
// pnlCompany
|
|
//
|
|
this.pnlCompany.BackColor = System.Drawing.SystemColors.Window;
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyNewServiceRequests);
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyServiceRateSummary);
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyNextScheduled);
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyOverdue);
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyNotAssigned);
|
|
this.pnlCompany.Controls.Add(this.pnlCompanyTitle);
|
|
this.pnlCompany.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.pnlCompany.Location = new System.Drawing.Point(403, 61);
|
|
this.pnlCompany.Name = "pnlCompany";
|
|
this.pnlCompany.Padding = new System.Windows.Forms.Padding(20);
|
|
this.pnlCompany.Size = new System.Drawing.Size(394, 1092);
|
|
this.pnlCompany.TabIndex = 2;
|
|
//
|
|
// pnlCompanyNewServiceRequests
|
|
//
|
|
this.pnlCompanyNewServiceRequests.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyNewServiceRequests.Controls.Add(this.gridCompanyNewServiceRequests);
|
|
this.pnlCompanyNewServiceRequests.Controls.Add(this.label8);
|
|
this.pnlCompanyNewServiceRequests.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyNewServiceRequests.Location = new System.Drawing.Point(20, 597);
|
|
this.pnlCompanyNewServiceRequests.Name = "pnlCompanyNewServiceRequests";
|
|
this.pnlCompanyNewServiceRequests.Size = new System.Drawing.Size(354, 133);
|
|
this.pnlCompanyNewServiceRequests.TabIndex = 8;
|
|
this.pnlCompanyNewServiceRequests.Tag = "InfoPanel";
|
|
//
|
|
// gridCompanyNewServiceRequests
|
|
//
|
|
this.gridCompanyNewServiceRequests.AllowUserToAddRows = false;
|
|
this.gridCompanyNewServiceRequests.AllowUserToDeleteRows = false;
|
|
this.gridCompanyNewServiceRequests.AllowUserToResizeColumns = false;
|
|
this.gridCompanyNewServiceRequests.AllowUserToResizeRows = false;
|
|
this.gridCompanyNewServiceRequests.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridCompanyNewServiceRequests.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridCompanyNewServiceRequests.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridCompanyNewServiceRequests.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridCompanyNewServiceRequests.Cursor = System.Windows.Forms.Cursors.Default;
|
|
this.gridCompanyNewServiceRequests.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridCompanyNewServiceRequests.Location = new System.Drawing.Point(0, 17);
|
|
this.gridCompanyNewServiceRequests.Name = "gridCompanyNewServiceRequests";
|
|
this.gridCompanyNewServiceRequests.ReadOnly = true;
|
|
this.gridCompanyNewServiceRequests.Size = new System.Drawing.Size(354, 98);
|
|
this.gridCompanyNewServiceRequests.TabIndex = 1;
|
|
this.gridCompanyNewServiceRequests.Tag = "CompanyNewServiceRequests";
|
|
//
|
|
// label8
|
|
//
|
|
this.label8.AutoSize = true;
|
|
this.label8.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label8.Location = new System.Drawing.Point(0, 0);
|
|
this.label8.Name = "label8";
|
|
this.label8.Size = new System.Drawing.Size(229, 17);
|
|
this.label8.TabIndex = 2;
|
|
this.label8.Tag = "h2";
|
|
this.label8.Text = "LT:ClientServiceRequest.Label.List";
|
|
//
|
|
// pnlCompanyServiceRateSummary
|
|
//
|
|
this.pnlCompanyServiceRateSummary.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyServiceRateSummary.Controls.Add(this.gridCompanyServiceRateSummary);
|
|
this.pnlCompanyServiceRateSummary.Controls.Add(this.label7);
|
|
this.pnlCompanyServiceRateSummary.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyServiceRateSummary.Location = new System.Drawing.Point(20, 457);
|
|
this.pnlCompanyServiceRateSummary.Name = "pnlCompanyServiceRateSummary";
|
|
this.pnlCompanyServiceRateSummary.Size = new System.Drawing.Size(354, 140);
|
|
this.pnlCompanyServiceRateSummary.TabIndex = 7;
|
|
this.pnlCompanyServiceRateSummary.Tag = "InfoPanel";
|
|
//
|
|
// gridCompanyServiceRateSummary
|
|
//
|
|
this.gridCompanyServiceRateSummary.AllowUserToAddRows = false;
|
|
this.gridCompanyServiceRateSummary.AllowUserToDeleteRows = false;
|
|
this.gridCompanyServiceRateSummary.AllowUserToResizeColumns = false;
|
|
this.gridCompanyServiceRateSummary.AllowUserToResizeRows = false;
|
|
this.gridCompanyServiceRateSummary.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridCompanyServiceRateSummary.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridCompanyServiceRateSummary.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridCompanyServiceRateSummary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridCompanyServiceRateSummary.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridCompanyServiceRateSummary.Location = new System.Drawing.Point(0, 17);
|
|
this.gridCompanyServiceRateSummary.Name = "gridCompanyServiceRateSummary";
|
|
this.gridCompanyServiceRateSummary.ReadOnly = true;
|
|
this.gridCompanyServiceRateSummary.Size = new System.Drawing.Size(354, 105);
|
|
this.gridCompanyServiceRateSummary.TabIndex = 1;
|
|
this.gridCompanyServiceRateSummary.Tag = "CompanyServiceRateSummary";
|
|
//
|
|
// label7
|
|
//
|
|
this.label7.AutoSize = true;
|
|
this.label7.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label7.Location = new System.Drawing.Point(0, 0);
|
|
this.label7.Name = "label7";
|
|
this.label7.Size = new System.Drawing.Size(332, 17);
|
|
this.label7.TabIndex = 2;
|
|
this.label7.Tag = "h2";
|
|
this.label7.Text = "LT:WorkorderItemLabor.Label.ServiceRateQuantity";
|
|
//
|
|
// pnlCompanyNextScheduled
|
|
//
|
|
this.pnlCompanyNextScheduled.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyNextScheduled.Controls.Add(this.gridCompanyNext);
|
|
this.pnlCompanyNextScheduled.Controls.Add(this.label6);
|
|
this.pnlCompanyNextScheduled.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyNextScheduled.Location = new System.Drawing.Point(20, 325);
|
|
this.pnlCompanyNextScheduled.Name = "pnlCompanyNextScheduled";
|
|
this.pnlCompanyNextScheduled.Size = new System.Drawing.Size(354, 132);
|
|
this.pnlCompanyNextScheduled.TabIndex = 6;
|
|
this.pnlCompanyNextScheduled.Tag = "InfoPanel";
|
|
//
|
|
// gridCompanyNext
|
|
//
|
|
this.gridCompanyNext.AllowUserToAddRows = false;
|
|
this.gridCompanyNext.AllowUserToDeleteRows = false;
|
|
this.gridCompanyNext.AllowUserToResizeColumns = false;
|
|
this.gridCompanyNext.AllowUserToResizeRows = false;
|
|
this.gridCompanyNext.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridCompanyNext.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridCompanyNext.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridCompanyNext.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridCompanyNext.Cursor = System.Windows.Forms.Cursors.Default;
|
|
this.gridCompanyNext.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridCompanyNext.Location = new System.Drawing.Point(0, 17);
|
|
this.gridCompanyNext.Name = "gridCompanyNext";
|
|
this.gridCompanyNext.ReadOnly = true;
|
|
this.gridCompanyNext.Size = new System.Drawing.Size(354, 98);
|
|
this.gridCompanyNext.TabIndex = 1;
|
|
this.gridCompanyNext.Tag = "CompanyNext";
|
|
//
|
|
// label6
|
|
//
|
|
this.label6.AutoSize = true;
|
|
this.label6.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label6.Location = new System.Drawing.Point(0, 0);
|
|
this.label6.Name = "label6";
|
|
this.label6.Size = new System.Drawing.Size(170, 17);
|
|
this.label6.TabIndex = 2;
|
|
this.label6.Tag = "h2";
|
|
this.label6.Text = "LT:Dashboard.Label.Next";
|
|
//
|
|
// pnlCompanyOverdue
|
|
//
|
|
this.pnlCompanyOverdue.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyOverdue.Controls.Add(this.gridCompanyOverdue);
|
|
this.pnlCompanyOverdue.Controls.Add(this.label5);
|
|
this.pnlCompanyOverdue.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyOverdue.Location = new System.Drawing.Point(20, 192);
|
|
this.pnlCompanyOverdue.Name = "pnlCompanyOverdue";
|
|
this.pnlCompanyOverdue.Size = new System.Drawing.Size(354, 133);
|
|
this.pnlCompanyOverdue.TabIndex = 5;
|
|
this.pnlCompanyOverdue.Tag = "InfoPanel";
|
|
//
|
|
// gridCompanyOverdue
|
|
//
|
|
this.gridCompanyOverdue.AllowUserToAddRows = false;
|
|
this.gridCompanyOverdue.AllowUserToDeleteRows = false;
|
|
this.gridCompanyOverdue.AllowUserToResizeColumns = false;
|
|
this.gridCompanyOverdue.AllowUserToResizeRows = false;
|
|
this.gridCompanyOverdue.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridCompanyOverdue.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridCompanyOverdue.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridCompanyOverdue.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridCompanyOverdue.Cursor = System.Windows.Forms.Cursors.Default;
|
|
this.gridCompanyOverdue.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridCompanyOverdue.Location = new System.Drawing.Point(0, 17);
|
|
this.gridCompanyOverdue.Name = "gridCompanyOverdue";
|
|
this.gridCompanyOverdue.ReadOnly = true;
|
|
this.gridCompanyOverdue.Size = new System.Drawing.Size(354, 98);
|
|
this.gridCompanyOverdue.TabIndex = 1;
|
|
this.gridCompanyOverdue.Tag = "CompanyOverdue";
|
|
//
|
|
// label5
|
|
//
|
|
this.label5.AutoSize = true;
|
|
this.label5.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label5.Location = new System.Drawing.Point(0, 0);
|
|
this.label5.Name = "label5";
|
|
this.label5.Size = new System.Drawing.Size(197, 17);
|
|
this.label5.TabIndex = 2;
|
|
this.label5.Tag = "h2";
|
|
this.label5.Text = "LT:Dashboard.Label.Overdue";
|
|
//
|
|
// pnlCompanyNotAssigned
|
|
//
|
|
this.pnlCompanyNotAssigned.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyNotAssigned.Controls.Add(this.gridCompanyNotAssigned);
|
|
this.pnlCompanyNotAssigned.Controls.Add(this.label4);
|
|
this.pnlCompanyNotAssigned.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyNotAssigned.Location = new System.Drawing.Point(20, 59);
|
|
this.pnlCompanyNotAssigned.Name = "pnlCompanyNotAssigned";
|
|
this.pnlCompanyNotAssigned.Size = new System.Drawing.Size(354, 133);
|
|
this.pnlCompanyNotAssigned.TabIndex = 4;
|
|
this.pnlCompanyNotAssigned.Tag = "InfoPanel";
|
|
//
|
|
// gridCompanyNotAssigned
|
|
//
|
|
this.gridCompanyNotAssigned.AllowUserToAddRows = false;
|
|
this.gridCompanyNotAssigned.AllowUserToDeleteRows = false;
|
|
this.gridCompanyNotAssigned.AllowUserToResizeColumns = false;
|
|
this.gridCompanyNotAssigned.AllowUserToResizeRows = false;
|
|
this.gridCompanyNotAssigned.BackgroundColor = System.Drawing.Color.White;
|
|
this.gridCompanyNotAssigned.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
|
this.gridCompanyNotAssigned.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
|
this.gridCompanyNotAssigned.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.gridCompanyNotAssigned.Cursor = System.Windows.Forms.Cursors.Default;
|
|
this.gridCompanyNotAssigned.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.gridCompanyNotAssigned.Location = new System.Drawing.Point(0, 17);
|
|
this.gridCompanyNotAssigned.Name = "gridCompanyNotAssigned";
|
|
this.gridCompanyNotAssigned.ReadOnly = true;
|
|
this.gridCompanyNotAssigned.Size = new System.Drawing.Size(354, 98);
|
|
this.gridCompanyNotAssigned.TabIndex = 1;
|
|
this.gridCompanyNotAssigned.Tag = "CompanyNotAssigned";
|
|
//
|
|
// label4
|
|
//
|
|
this.label4.AutoSize = true;
|
|
this.label4.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.label4.Location = new System.Drawing.Point(0, 0);
|
|
this.label4.Name = "label4";
|
|
this.label4.Size = new System.Drawing.Size(222, 17);
|
|
this.label4.TabIndex = 2;
|
|
this.label4.Tag = "h2";
|
|
this.label4.Text = "LT:Dashboard.Label.NotAssigned";
|
|
//
|
|
// pnlCompanyTitle
|
|
//
|
|
this.pnlCompanyTitle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.pnlCompanyTitle.Controls.Add(this.lblCompany);
|
|
this.pnlCompanyTitle.Dock = System.Windows.Forms.DockStyle.Top;
|
|
this.pnlCompanyTitle.Location = new System.Drawing.Point(20, 20);
|
|
this.pnlCompanyTitle.Name = "pnlCompanyTitle";
|
|
this.pnlCompanyTitle.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
|
this.pnlCompanyTitle.Size = new System.Drawing.Size(354, 39);
|
|
this.pnlCompanyTitle.TabIndex = 3;
|
|
//
|
|
// lblCompany
|
|
//
|
|
this.lblCompany.AutoSize = true;
|
|
this.lblCompany.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
this.lblCompany.ForeColor = System.Drawing.SystemColors.WindowText;
|
|
this.lblCompany.Location = new System.Drawing.Point(4, 0);
|
|
this.lblCompany.Name = "lblCompany";
|
|
this.lblCompany.Size = new System.Drawing.Size(0, 37);
|
|
this.lblCompany.TabIndex = 0;
|
|
this.lblCompany.Tag = "h1";
|
|
//
|
|
// tblOuter
|
|
//
|
|
this.tblOuter.AutoScroll = true;
|
|
this.tblOuter.ColumnCount = 2;
|
|
this.tblOuter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
|
this.tblOuter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
|
this.tblOuter.Controls.Add(this.pnlCompany, 1, 1);
|
|
this.tblOuter.Controls.Add(this.pnlUser, 0, 1);
|
|
this.tblOuter.Controls.Add(this.hdrTablePanel, 0, 0);
|
|
this.tblOuter.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.tblOuter.Location = new System.Drawing.Point(30, 30);
|
|
this.tblOuter.Name = "tblOuter";
|
|
this.tblOuter.RowCount = 2;
|
|
this.tblOuter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 58F));
|
|
this.tblOuter.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
|
this.tblOuter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
|
this.tblOuter.Size = new System.Drawing.Size(820, 985);
|
|
this.tblOuter.TabIndex = 5;
|
|
//
|
|
// hdrTablePanel
|
|
//
|
|
this.hdrTablePanel.ColumnCount = 3;
|
|
this.tblOuter.SetColumnSpan(this.hdrTablePanel, 2);
|
|
this.hdrTablePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
|
this.hdrTablePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
|
this.hdrTablePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
|
this.hdrTablePanel.Controls.Add(this.btnNewWorkorder, 0, 0);
|
|
this.hdrTablePanel.Controls.Add(this.btnRefresh, 2, 0);
|
|
this.hdrTablePanel.Controls.Add(this.btnNewClient, 1, 0);
|
|
this.hdrTablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.hdrTablePanel.Location = new System.Drawing.Point(5, 5);
|
|
this.hdrTablePanel.Margin = new System.Windows.Forms.Padding(5);
|
|
this.hdrTablePanel.Name = "hdrTablePanel";
|
|
this.hdrTablePanel.RowCount = 1;
|
|
this.hdrTablePanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
|
this.hdrTablePanel.Size = new System.Drawing.Size(790, 48);
|
|
this.hdrTablePanel.TabIndex = 3;
|
|
//
|
|
// btnNewWorkorder
|
|
//
|
|
this.btnNewWorkorder.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
|
this.btnNewWorkorder.AutoSize = true;
|
|
this.btnNewWorkorder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.btnNewWorkorder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnNewWorkorder.Image = global::AyaNova.Resource1.New16;
|
|
this.btnNewWorkorder.Location = new System.Drawing.Point(3, 9);
|
|
this.btnNewWorkorder.Name = "btnNewWorkorder";
|
|
this.btnNewWorkorder.Size = new System.Drawing.Size(139, 29);
|
|
this.btnNewWorkorder.TabIndex = 0;
|
|
this.btnNewWorkorder.Text = "LT:O.Workorder";
|
|
this.btnNewWorkorder.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
|
this.btnNewWorkorder.UseVisualStyleBackColor = true;
|
|
this.btnNewWorkorder.Click += new System.EventHandler(this.btnNewWorkorder_Click);
|
|
//
|
|
// btnRefresh
|
|
//
|
|
this.btnRefresh.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
|
this.btnRefresh.AutoSize = true;
|
|
this.btnRefresh.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnRefresh.Image = global::AyaNova.Resource1.Refresh16;
|
|
this.btnRefresh.Location = new System.Drawing.Point(529, 9);
|
|
this.btnRefresh.Name = "btnRefresh";
|
|
this.btnRefresh.Size = new System.Drawing.Size(177, 29);
|
|
this.btnRefresh.TabIndex = 2;
|
|
this.btnRefresh.Text = "LT:UI.Toolbar.Refresh";
|
|
this.btnRefresh.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
|
this.btnRefresh.UseVisualStyleBackColor = true;
|
|
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
|
//
|
|
// btnNewClient
|
|
//
|
|
this.btnNewClient.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
|
this.btnNewClient.AutoSize = true;
|
|
this.btnNewClient.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
this.btnNewClient.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnNewClient.Image = global::AyaNova.Resource1.New16;
|
|
this.btnNewClient.Location = new System.Drawing.Point(266, 9);
|
|
this.btnNewClient.Name = "btnNewClient";
|
|
this.btnNewClient.Size = new System.Drawing.Size(107, 29);
|
|
this.btnNewClient.TabIndex = 1;
|
|
this.btnNewClient.Text = "LT:O.Client";
|
|
this.btnNewClient.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
|
this.btnNewClient.UseVisualStyleBackColor = true;
|
|
this.btnNewClient.Click += new System.EventHandler(this.btnNewClient_Click);
|
|
//
|
|
// timerGridRefresh
|
|
//
|
|
this.timerGridRefresh.Tick += new System.EventHandler(this.timerGridRefresh_Tick);
|
|
//
|
|
// DashboardForm
|
|
//
|
|
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
|
this.BackColor = System.Drawing.SystemColors.Window;
|
|
this.ClientSize = new System.Drawing.Size(880, 1045);
|
|
this.ControlBox = false;
|
|
this.Controls.Add(this.tblOuter);
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
|
this.helpProvider1.SetHelpKeyword(this, "");
|
|
this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
|
|
this.Name = "DashboardForm";
|
|
this.Padding = new System.Windows.Forms.Padding(30);
|
|
this.helpProvider1.SetShowHelp(this, true);
|
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
|
this.Closing += new System.ComponentModel.CancelEventHandler(this.DashboardForm_Closing);
|
|
this.Load += new System.EventHandler(this.DashboardForm_Load);
|
|
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).EndInit();
|
|
this.pnlUser.ResumeLayout(false);
|
|
this.pnlMyNewMemos.ResumeLayout(false);
|
|
this.pnlMyNewMemos.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyNewMemos)).EndInit();
|
|
this.pnlMyReminders.ResumeLayout(false);
|
|
this.pnlMyReminders.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyReminders)).EndInit();
|
|
this.pnlMyServiceRateSummary.ResumeLayout(false);
|
|
this.pnlMyServiceRateSummary.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyServiceRateSummary)).EndInit();
|
|
this.pnlMyWOScheduled.ResumeLayout(false);
|
|
this.pnlMyWOScheduled.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyScheduled)).EndInit();
|
|
this.pnlMyWOOverDue.ResumeLayout(false);
|
|
this.pnlMyWOOverDue.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridMyOverdue)).EndInit();
|
|
this.pnlMyTitle.ResumeLayout(false);
|
|
this.pnlMyTitle.PerformLayout();
|
|
this.pnlCompany.ResumeLayout(false);
|
|
this.pnlCompanyNewServiceRequests.ResumeLayout(false);
|
|
this.pnlCompanyNewServiceRequests.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNewServiceRequests)).EndInit();
|
|
this.pnlCompanyServiceRateSummary.ResumeLayout(false);
|
|
this.pnlCompanyServiceRateSummary.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyServiceRateSummary)).EndInit();
|
|
this.pnlCompanyNextScheduled.ResumeLayout(false);
|
|
this.pnlCompanyNextScheduled.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNext)).EndInit();
|
|
this.pnlCompanyOverdue.ResumeLayout(false);
|
|
this.pnlCompanyOverdue.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyOverdue)).EndInit();
|
|
this.pnlCompanyNotAssigned.ResumeLayout(false);
|
|
this.pnlCompanyNotAssigned.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCompanyNotAssigned)).EndInit();
|
|
this.pnlCompanyTitle.ResumeLayout(false);
|
|
this.pnlCompanyTitle.PerformLayout();
|
|
this.tblOuter.ResumeLayout(false);
|
|
this.hdrTablePanel.ResumeLayout(false);
|
|
this.hdrTablePanel.PerformLayout();
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
|
|
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
|
|
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
|
|
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
|
|
//
|
|
|
|
#region Form Load / Close
|
|
|
|
/* ===================
|
|
AyaNova 8 Westcoast theme
|
|
Based on Canucks current colors
|
|
Primary colour = dark blue
|
|
Web: #00205B
|
|
RGB: 0, 32, 91
|
|
|
|
Secondary colour = green
|
|
Web: #00843D
|
|
RGB: 0, 132, 61
|
|
*
|
|
* #00843D = Green
|
|
#00205B = Blue
|
|
private Color AyaGreen = System.Drawing.ColorTranslator.FromHtml("#00843D");
|
|
private Color AyaBlue = System.Drawing.ColorTranslator.FromHtml("#00205B");
|
|
=================== */
|
|
|
|
private Font listFont = new Font("Segoe UI", 12);
|
|
private Color listItemColor = SystemColors.HotTrack;
|
|
private Font headerFont = new Font("Segoe UI", 17);
|
|
private Color headerColor = SystemColors.WindowText;
|
|
private Font subHeaderFont = new Font("Segoe UI", 14);
|
|
private Color subHeaderColor = SystemColors.WindowText;
|
|
|
|
private Color pnlWestCoastLightBlue = Color.FromArgb(6,0,32,91);
|
|
private Color pnlWestCoastLightGreen = Color.FromArgb(6, 0, 132, 61);
|
|
private DashBoardInfo di = null;
|
|
/// <summary>
|
|
/// Prepare the form
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void DashboardForm_Load(object sender, System.EventArgs e)
|
|
{
|
|
//AyaGreen = System.Drawing.ColorTranslator.FromHtml("#00843D");
|
|
// AyaBlue = System.Drawing.ColorTranslator.FromHtml("#00205B");
|
|
//
|
|
// helpProvider1
|
|
//
|
|
this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "dashboard.htm";
|
|
|
|
Cursor.Current = Cursors.WaitCursor;
|
|
this.Visible = false;
|
|
StyleForm();//and setup grids
|
|
|
|
|
|
if (!AyaBizUtils.Lite && AyaBizUtils.GlobalSettings.MainGridAutoRefresh)//case 1487
|
|
{
|
|
//case 1824
|
|
#if (DEBUG)
|
|
//testing interval
|
|
this.timerGridRefresh.Interval = 5000;
|
|
#else
|
|
//5 minutes
|
|
this.timerGridRefresh.Interval = 300000;
|
|
#endif
|
|
timerGridRefresh.Enabled = true;
|
|
timerGridRefresh.Start();
|
|
}
|
|
|
|
|
|
RefreshDisplay();
|
|
|
|
Util.Localize(this);
|
|
//restrict UI based on security settings
|
|
RestrictUI();
|
|
|
|
Cursor.Current = Cursors.Default;
|
|
|
|
this.Visible = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Save form layout and grid layout for next time
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void DashboardForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
|
{
|
|
if (!AyaBizUtils.Lite)
|
|
{
|
|
timerGridRefresh.Stop();
|
|
timerGridRefresh.Enabled = false;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Form UI / Business object synchronization
|
|
|
|
private void RefreshDisplay()
|
|
{
|
|
Cursor.Current = Cursors.WaitCursor;
|
|
di = DashBoardInfo.Get(Util.LocaleText.GetLocalizedText("Common.Label.More"));
|
|
lblCompany.Text = di.CurrentCompanyOrRegionName;
|
|
|
|
|
|
#region Populate "My" panels
|
|
|
|
pnlMyWOOverDue.Visible = di.HasMyOverdueList;
|
|
if(di.HasMyOverdueList)
|
|
this.gridMyOverdue.DataSource = di.myOverdueList;
|
|
|
|
this.pnlMyNewMemos.Visible = di.HasMyNewMemoList;
|
|
if (di.HasMyNewMemoList)
|
|
this.gridMyNewMemos.DataSource = di.myNewMemosList;
|
|
|
|
this.pnlMyReminders.Visible = di.HasMyReminderList;
|
|
if (di.HasMyReminderList)
|
|
this.gridMyReminders.DataSource = di.myRemindersList;
|
|
|
|
this.pnlMyServiceRateSummary.Visible = di.HasMyServiceRateSummaryList;
|
|
if (di.HasMyServiceRateSummaryList)
|
|
this.gridMyServiceRateSummary.DataSource = di.myServiceRateSummaryList;
|
|
|
|
this.pnlMyWOScheduled.Visible = di.HasMyScheduledList;
|
|
if (di.HasMyScheduledList)
|
|
this.gridMyScheduled.DataSource = di.myScheduledList;
|
|
|
|
|
|
#endregion my panels
|
|
|
|
#region Populate Company / Region panels
|
|
|
|
this.pnlCompanyNotAssigned.Visible = di.HasCompNotAssignedList;
|
|
if (di.HasCompNotAssignedList)
|
|
this.gridCompanyNotAssigned.DataSource = di.compNotAssignedList;
|
|
|
|
this.pnlCompanyNewServiceRequests.Visible = di.HasCompServiceRequestList;
|
|
if (di.HasCompServiceRequestList)
|
|
this.gridCompanyNewServiceRequests.DataSource = di.compServiceRequestsList;
|
|
|
|
this.pnlCompanyNextScheduled.Visible = di.HasCompScheduledList;
|
|
if (di.HasCompScheduledList)
|
|
this.gridCompanyNext.DataSource = di.compScheduledList;
|
|
|
|
this.pnlCompanyOverdue.Visible = di.HasCompOverdueList;
|
|
if (di.HasCompOverdueList)
|
|
this.gridCompanyOverdue.DataSource = di.compOverdueList;
|
|
|
|
this.pnlCompanyServiceRateSummary.Visible = di.HasCompServiceRateSummaryList;
|
|
if (di.HasCompServiceRateSummaryList)
|
|
this.gridCompanyServiceRateSummary.DataSource = di.compServiceRateSummaryList;
|
|
|
|
|
|
#endregion comp/region panels
|
|
|
|
|
|
if (di.MyPanelVisible && di.CompPanelVisible)
|
|
{
|
|
tblOuter.SetColumn(pnlCompany, 1);
|
|
tblOuter.SetColumnSpan(pnlCompany, 1);
|
|
pnlCompany.Visible = true;
|
|
|
|
tblOuter.SetColumn(pnlUser, 0);
|
|
tblOuter.SetColumnSpan(pnlUser, 1);
|
|
pnlUser.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
//One of the two panels isn't visible
|
|
//so make the other one take up all the space and hide the invisible one
|
|
if (!di.MyPanelVisible)
|
|
{
|
|
pnlCompany.Visible = true;
|
|
pnlUser.Visible = false;
|
|
tblOuter.SetColumn(pnlCompany, 0);
|
|
tblOuter.SetColumnSpan(pnlCompany, 2);
|
|
}
|
|
else
|
|
{
|
|
pnlUser.Visible = true;
|
|
pnlCompany.Visible = false;
|
|
tblOuter.SetColumn(pnlUser, 0);
|
|
tblOuter.SetColumnSpan(pnlUser, 2);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//resize all grids based on rows they contain
|
|
SizeGrids();
|
|
Cursor.Current = Cursors.Default;
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Adapt UI to accomodate users security access level
|
|
/// by default form is set with full rights in mind
|
|
/// so this code just needs to restrict them as required
|
|
/// </summary>
|
|
private void RestrictUI()
|
|
{
|
|
|
|
// bool ReadOnly = AyaBizUtils.Right("Object.Global") < (int)SecurityLevelTypes.ReadWrite;
|
|
// if(AyaBizUtils.Right(RootObjectTypes.Client) < (int)SecurityLevelTypes.ReadWrite)
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region Style form
|
|
|
|
private void StyleForm()
|
|
{
|
|
// pnlUser.BackColor = pnlWestCoastLightBlue;
|
|
//pnlCompany.BackColor = pnlWestCoastLightGreen;
|
|
StyleLabels(this);
|
|
StylePanels(this);
|
|
|
|
|
|
StyleGrid(gridMyOverdue,true);
|
|
StyleGrid(gridMyScheduled, true);
|
|
StyleGrid(gridMyServiceRateSummary, false);
|
|
StyleGrid(gridMyReminders, true);
|
|
StyleGrid(gridMyNewMemos, true);
|
|
StyleGrid(gridCompanyNewServiceRequests, true);
|
|
StyleGrid(gridCompanyNext, true);
|
|
StyleGrid(gridCompanyNotAssigned, true);
|
|
StyleGrid(gridCompanyOverdue, true);
|
|
StyleGrid(gridCompanyServiceRateSummary, false);
|
|
|
|
|
|
|
|
//testing
|
|
// PopulateSampleData(gridMyOverdue);
|
|
//PopulateSampleData(gridMyScheduled);
|
|
//PopulateSampleServiceRateData(gridMyServiceRateSummary);
|
|
//PopulateSampleData(gridMyReminders);
|
|
//PopulateSampleData(gridMyNewMemos);
|
|
}
|
|
|
|
private void StyleLabels(Control outer)
|
|
{
|
|
if (outer is Label)
|
|
{
|
|
if (outer.Tag != null)
|
|
{
|
|
string tagtype = outer.Tag.ToString();
|
|
if (tagtype == "h1")
|
|
{
|
|
outer.Font = headerFont;
|
|
outer.ForeColor = headerColor;
|
|
}
|
|
else if (tagtype == "h2")
|
|
{
|
|
outer.Font = subHeaderFont;
|
|
outer.ForeColor = subHeaderColor;
|
|
}
|
|
}
|
|
}
|
|
foreach (Control c in outer.Controls)
|
|
{
|
|
StyleLabels(c);
|
|
}
|
|
|
|
}
|
|
|
|
private void StyleGrid(DataGridView dgv, bool Clickable)
|
|
{
|
|
dgv.AutoGenerateColumns = false;
|
|
dgv.ColumnCount = 2;
|
|
dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
|
dgv.ColumnHeadersVisible = false;
|
|
dgv.DefaultCellStyle.Font = listFont;
|
|
if (Clickable)
|
|
{
|
|
dgv.DefaultCellStyle.ForeColor = listItemColor;
|
|
dgv.Cursor = Cursors.Hand;
|
|
}
|
|
else
|
|
{
|
|
dgv.DefaultCellStyle.ForeColor = SystemColors.WindowText;
|
|
dgv.Cursor = Cursors.Default;
|
|
}
|
|
|
|
dgv.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders;
|
|
dgv.DefaultCellStyle.SelectionForeColor = dgv.DefaultCellStyle.ForeColor;
|
|
dgv.DefaultCellStyle.SelectionBackColor = dgv.DefaultCellStyle.BackColor;
|
|
dgv.RowHeadersVisible = false;
|
|
dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
|
dgv.MultiSelect = false;
|
|
|
|
dgv.Columns[0].Name = "id";
|
|
dgv.Columns[0].DataPropertyName = "id";
|
|
dgv.Columns[0].Visible = false;
|
|
dgv.Columns[1].Name = "item";
|
|
dgv.Columns[1].DataPropertyName = "item";
|
|
|
|
dgv.CellClick += gridCellClick;
|
|
}
|
|
|
|
|
|
private void StylePanels(Control outer)
|
|
{
|
|
if (outer is Panel)
|
|
{
|
|
if (outer.Tag != null)
|
|
{
|
|
string tagtype = outer.Tag.ToString();
|
|
if (tagtype == "InfoPanel")
|
|
{
|
|
Panel p = outer as Panel;
|
|
p.Padding = new Padding(10);
|
|
p.AutoSize = true;
|
|
}
|
|
}
|
|
}
|
|
foreach (Control c in outer.Controls)
|
|
{
|
|
StylePanels(c);
|
|
}
|
|
}
|
|
|
|
private void SizeGrids()
|
|
{
|
|
SetGridHeight(gridMyOverdue);
|
|
SetGridHeight(gridMyScheduled);
|
|
SetGridHeight(gridMyServiceRateSummary);
|
|
SetGridHeight(gridMyReminders);
|
|
SetGridHeight(gridMyNewMemos);
|
|
SetGridHeight(gridCompanyNewServiceRequests);
|
|
SetGridHeight(gridCompanyNext);
|
|
SetGridHeight(gridCompanyNotAssigned);
|
|
SetGridHeight(gridCompanyOverdue);
|
|
SetGridHeight(gridCompanyServiceRateSummary);
|
|
}
|
|
|
|
private void SetGridHeight(DataGridView dgv)
|
|
{
|
|
if(dgv.Rows.Count > 0)
|
|
dgv.Height = (dgv.Rows.Count + 1) * dgv.Rows[0].Height;
|
|
}
|
|
|
|
|
|
#endregion style form
|
|
|
|
#region GridEvents
|
|
private void gridCellClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
DataGridView dgv = sender as DataGridView;
|
|
TypeAndID tid=dgv.Rows[e.RowIndex].Cells["id"].Value as TypeAndID;
|
|
|
|
if (tid.ID == Guid.Empty)
|
|
{
|
|
|
|
switch (dgv.Tag.ToString())
|
|
{
|
|
case "MyOverdue":
|
|
case "MyScheduled":
|
|
case "CompanyNotAssigned":
|
|
case "CompanyOverdue":
|
|
case "CompanyNext":
|
|
{
|
|
Util.frmMain.ForceNavPaneTreesUpdate();//case 1822
|
|
Util.gGridLastViews["WorkorderServiceScheduledUserList"].SubstituteCriteria = di.ListCriteria[dgv.Tag.ToString()];
|
|
Util.frmMain.ShowForm("LT:UI.Go.Service", "LT:WorkorderItem.Label.ScheduledUsers", true);
|
|
Util.frmMain.UltraExplorerBar1.SelectedGroup = Util.frmMain.UltraExplorerBar1.Groups["LT:UI.Go.Service"];
|
|
//Util.frmMain.MainServiceTree.Nodes["LT:WorkorderService.Label.List"].Nodes["LT:WorkorderItem.Label.ScheduledUsers"].Selected = true;
|
|
|
|
Util.frmMain.MainServiceTree.Nodes["LT:WorkorderService.Label.List"].Nodes["LT:WorkorderItem.Label.List"].Nodes["LT:WorkorderItem.Label.ScheduledUsers"].Selected = true;
|
|
}
|
|
break;
|
|
case "CompanyNewServiceRequests":
|
|
{
|
|
Util.gGridLastViews["ClientServiceRequestList"].SubstituteCriteria = di.ListCriteria[dgv.Tag.ToString()];
|
|
Util.frmMain.ShowForm("LT:Client.Label.List", "LT:ClientServiceRequest.Label.List", true);
|
|
Util.frmMain.UltraExplorerBar1.SelectedGroup = Util.frmMain.UltraExplorerBar1.Groups["LT:Client.Label.List"];
|
|
|
|
}
|
|
break;
|
|
case "MyNewMemos":
|
|
{
|
|
|
|
Util.gGridLastViews["MemoList"].SubstituteCriteria = di.ListCriteria[dgv.Tag.ToString()];
|
|
Util.frmMain.ShowForm("LT:UI.Go.User", "LT:Memo.Label.List", true);
|
|
Util.frmMain.UltraExplorerBar1.SelectedGroup = Util.frmMain.UltraExplorerBar1.Groups["LT:UI.Go.User"];
|
|
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
Util.EditRecord(tid);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion gridevents
|
|
|
|
#region Testing
|
|
private void PopulateSampleData(DataGridView dgv)
|
|
{
|
|
for (int x = 1; x < 4; x++)
|
|
{
|
|
string[] s = { "01/14/2012 WO12345 ABC Accounting Fix all the things " + x.ToString(), x.ToString() };
|
|
dgv.Rows.Add(s);
|
|
}
|
|
string[] smore = { "More ... ", "-1" };
|
|
dgv.Rows.Add(smore);
|
|
}
|
|
|
|
private void PopulateSampleServiceRateData(DataGridView dgv)
|
|
{
|
|
//string[] s = { "Today = 22" }; dgv.Rows.Add(s);
|
|
// s = { "Today = 22" }; dgv.Rows.Add(s);
|
|
dgv.Rows.Add(new[] { "Today = 6.5" });
|
|
dgv.Rows.Add(new[] { "Yesterday = 4.5" });
|
|
dgv.Rows.Add(new[] { "This week = 24.25" });
|
|
dgv.Rows.Add(new[] { "This month = 124.50" });
|
|
}
|
|
#endregion testing
|
|
|
|
#region Button events
|
|
private void btnNewWorkorder_Click(object sender, EventArgs e)
|
|
{
|
|
ClientSelector c = new ClientSelector(WorkorderTypes.TemplateService);//case 1887
|
|
DialogResult result = c.ShowDialog();
|
|
if (result == DialogResult.Cancel) return;
|
|
|
|
Workorder w = null;
|
|
try
|
|
{
|
|
if (c.SelectedTemplateID != Guid.Empty)
|
|
w = Workorder.NewItem(c.SelectedTemplateID, c.SelectedClientID);
|
|
else
|
|
w = Workorder.NewItem(WorkorderTypes.Service);
|
|
}
|
|
catch (TrialException ex)
|
|
{
|
|
ex.ToString();
|
|
Util.PromptRestricted();
|
|
return;
|
|
}
|
|
catch (System.Security.SecurityException ex)
|
|
{
|
|
MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
return;
|
|
}
|
|
w.ClientID = c.SelectedClientID;
|
|
c.Dispose();
|
|
if (AyaBizUtils.Lite)//case 1172
|
|
{
|
|
WorkorderFormLite wfl = new WorkorderFormLite();
|
|
wfl.WorkorderToEdit = w;
|
|
wfl.ShowDialog();
|
|
wfl.Dispose();
|
|
}
|
|
else
|
|
{
|
|
WorkorderForm wf = new WorkorderForm();
|
|
wf.WorkorderToEdit = w;
|
|
//Case 677
|
|
wf.Show();
|
|
}
|
|
RefreshDisplay();
|
|
}
|
|
|
|
private void btnNewClient_Click(object sender, EventArgs e)
|
|
{
|
|
if (Util.EditRecord(RootObjectTypes.Client, AyaBizUtils.NewObjectGuid) == true)
|
|
RefreshDisplay();
|
|
|
|
}
|
|
|
|
private void btnRefresh_Click(object sender, EventArgs e)
|
|
{
|
|
RefreshDisplay();
|
|
}
|
|
|
|
#endregion button events
|
|
|
|
//case 1824
|
|
private void timerGridRefresh_Tick(object sender, EventArgs e)
|
|
{
|
|
timerGridRefresh.Stop();
|
|
if (AyaBizUtils.GlobalSettings.MainGridAutoRefresh)//case 1487
|
|
{
|
|
RefreshDisplay();
|
|
timerGridRefresh.Start();
|
|
}
|
|
}
|
|
|
|
}//eoc
|
|
}
|