case 3892
This commit is contained in:
@@ -559,7 +559,7 @@ namespace AyaNova
|
||||
|
||||
|
||||
//case 1219 - need user for more stuff below
|
||||
User currentUser=User.GetItem(User.CurrentThreadUserID);
|
||||
User currentUser = User.GetItem(User.CurrentThreadUserID);
|
||||
mSelectedUserGroupID = currentUser.LastSchedGroupID;
|
||||
FillScheduleableUserGroupList();
|
||||
|
||||
@@ -573,7 +573,11 @@ namespace AyaNova
|
||||
|
||||
//case 714
|
||||
sc.DayView.TopRowTime = TimeSpan.FromHours(8);
|
||||
//NewDateRange();
|
||||
|
||||
|
||||
//case 3892 restrict scrollable day view day to that day only as it's not working outside of the current day
|
||||
sc.DayView.VisibleTime.Start = TimeSpan.FromHours(0);
|
||||
sc.DayView.VisibleTime.End = TimeSpan.FromHours(24);
|
||||
|
||||
|
||||
//**************************************
|
||||
@@ -628,20 +632,20 @@ namespace AyaNova
|
||||
|
||||
|
||||
|
||||
//case 701
|
||||
//case 701
|
||||
#if (DEBUG)
|
||||
//testing interval (5 minutes)
|
||||
//testing interval (5 minutes)
|
||||
this.SchedRefreshTimer.Interval = 300000;
|
||||
#else
|
||||
//5 minutes
|
||||
SchedRefreshTimer.Interval=300000;
|
||||
#endif
|
||||
SchedRefreshTimer.Enabled = true;
|
||||
SchedRefreshTimer.Start();
|
||||
SchedRefreshTimer.Enabled = true;
|
||||
SchedRefreshTimer.Start();
|
||||
|
||||
|
||||
DoNotAllowFetchAndBind = false;
|
||||
BindData(true);
|
||||
DoNotAllowFetchAndBind = false;
|
||||
BindData(true);
|
||||
|
||||
}
|
||||
|
||||
@@ -661,7 +665,7 @@ namespace AyaNova
|
||||
u.LastSchedStartDate = new CSLA.SmartDate(sc.ActiveView.GetVisibleIntervals().Start);
|
||||
u.LastSchedStopDate = new CSLA.SmartDate(sc.ActiveView.GetVisibleIntervals().End);
|
||||
//case 1390
|
||||
int nstartdays=(u.LastSchedStartDate.Date - DateTime.Today).Days;
|
||||
int nstartdays = (u.LastSchedStartDate.Date - DateTime.Today).Days;
|
||||
int nstopdays = (u.LastSchedStopDate.Date - DateTime.Today).Days;
|
||||
if (nstartdays == 0 && nstopdays == 1)
|
||||
{
|
||||
@@ -672,9 +676,9 @@ namespace AyaNova
|
||||
//case 1553
|
||||
StateButtonTool sbt = (StateButtonTool)ToolBarManager.Tools["LT:UI.Toolbar.Schedule.ShowClosed"];
|
||||
if (!sbt.Checked)
|
||||
u.ScheduleLastViewOpenOnly=true;
|
||||
u.ScheduleLastViewOpenOnly = true;
|
||||
else
|
||||
u.ScheduleLastViewOpenOnly=false;
|
||||
u.ScheduleLastViewOpenOnly = false;
|
||||
|
||||
u.Save();
|
||||
|
||||
@@ -743,7 +747,7 @@ namespace AyaNova
|
||||
Resource r = new Resource(Guid.Empty.ToString(), Util.LocaleText.GetLocalizedText("Dashboard.Label.NotAssigned"));//case 1821
|
||||
|
||||
//Lite version has no unscheduled user
|
||||
if(!AyaBizUtils.Lite)
|
||||
if (!AyaBizUtils.Lite)
|
||||
ss.Resources.Add(r);
|
||||
|
||||
foreach (UserListScheduleable.UserListScheduleableInfo ui in uls)
|
||||
@@ -1141,7 +1145,7 @@ namespace AyaNova
|
||||
|
||||
}
|
||||
|
||||
private void HideDateRangeControlsInPreviewDialog(Control ctl)
|
||||
private void HideDateRangeControlsInPreviewDialog(Control ctl)
|
||||
{
|
||||
switch (ctl.Name)
|
||||
{
|
||||
@@ -1155,8 +1159,8 @@ namespace AyaNova
|
||||
}
|
||||
|
||||
}
|
||||
foreach(Control c in ctl.Controls)
|
||||
HideDateRangeControlsInPreviewDialog(c);
|
||||
foreach (Control c in ctl.Controls)
|
||||
HideDateRangeControlsInPreviewDialog(c);
|
||||
|
||||
}
|
||||
|
||||
@@ -1167,7 +1171,7 @@ namespace AyaNova
|
||||
foreach (Control c in ctl.Controls)
|
||||
{
|
||||
sb.Append(c.ToString());
|
||||
sb.Append(" - ");
|
||||
sb.Append(" - ");
|
||||
sb.Append(c.Name);
|
||||
|
||||
if (c.Controls.Count > 0)
|
||||
@@ -1201,6 +1205,9 @@ namespace AyaNova
|
||||
#region Events
|
||||
|
||||
#region Active view and date navigation events
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event fired when active view is about to change
|
||||
/// </summary>
|
||||
@@ -1210,6 +1217,7 @@ namespace AyaNova
|
||||
{
|
||||
if (ignoreActiveViewChanging)
|
||||
return;
|
||||
|
||||
ShowView(e.NewView.Type);
|
||||
e.Cancel = true;
|
||||
}
|
||||
@@ -1221,6 +1229,8 @@ namespace AyaNova
|
||||
/// <param name="newView"></param>
|
||||
private void ShowView(SchedulerViewType newView)
|
||||
{
|
||||
|
||||
|
||||
StateButtonTool sbt = (StateButtonTool)ToolBarManager.Tools["LT:UI.Toolbar.Schedule.TimeLineView"];
|
||||
bool useTimeLineView = sbt.Checked;
|
||||
ignoreActiveViewChanging = true;
|
||||
@@ -1230,8 +1240,11 @@ namespace AyaNova
|
||||
if (useTimeLineView)
|
||||
newView = SchedulerViewType.Timeline;
|
||||
else//case 714
|
||||
{
|
||||
sc.DayView.TopRowTime = TimeSpan.FromHours(8);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
sc.ActiveViewType = newView;
|
||||
ignoreActiveViewChanging = false;
|
||||
@@ -1309,7 +1322,7 @@ namespace AyaNova
|
||||
ToolBarManager.Tools["LT:UI.Toolbar.Schedule.AddToActiveWorkorderItem"].SharedProps.ToolTipText =
|
||||
Util.LocaleText.GetLocalizedText("UI.Toolbar.Schedule.AddToActiveWorkorderItem") + " (" + i.ServiceNumber + ")";
|
||||
}
|
||||
ToolBarManager.Tools["LT:UI.Toolbar.Schedule.PrintWorkorders"].SharedProps.Visible = true;
|
||||
ToolBarManager.Tools["LT:UI.Toolbar.Schedule.PrintWorkorders"].SharedProps.Visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1460,7 +1473,7 @@ namespace AyaNova
|
||||
2, MidpointRounding.AwayFromZero);
|
||||
|
||||
|
||||
su.UserID = gNewResourceID;
|
||||
su.UserID = gNewResourceID;
|
||||
|
||||
if (w.IsDirty)
|
||||
{
|
||||
@@ -1565,7 +1578,7 @@ namespace AyaNova
|
||||
WorkorderItemScheduledUser wisu = wi.ScheduledUsers.Add(wi);
|
||||
|
||||
|
||||
// Guid gUserID;
|
||||
// Guid gUserID;
|
||||
|
||||
|
||||
|
||||
@@ -1624,7 +1637,7 @@ namespace AyaNova
|
||||
private void EditAppointment(Appointment apt)
|
||||
{
|
||||
|
||||
if (apt.CustomFields==null || apt.CustomFields["AyaInfo"] == null) return;
|
||||
if (apt.CustomFields == null || apt.CustomFields["AyaInfo"] == null) return;
|
||||
AppointmentList.AppointmentListInfo i = (AppointmentList.AppointmentListInfo)apt.CustomFields["AyaInfo"];
|
||||
|
||||
switch (i.SourceObjectType)
|
||||
@@ -1817,7 +1830,7 @@ namespace AyaNova
|
||||
//case 1039 //log.Debug("FillScheduleableUserGroupList");
|
||||
|
||||
ComboBoxTool cbt = (ComboBoxTool)ToolBarManager.Tools["LT:UI.Toolbar.Schedule.SelectScheduleableUserGroup"];
|
||||
cbt.AutoComplete=true;
|
||||
cbt.AutoComplete = true;
|
||||
cbt.ValueList.ValueListItems.Clear();
|
||||
|
||||
cbt.ValueList.ValueListItems.Add(ScheduleableUserGroup.AllUsersGroupID, Util.LocaleText.GetLocalizedText("UI.Grid.RowFilterDropDownAllItem"));
|
||||
@@ -1831,7 +1844,7 @@ namespace AyaNova
|
||||
|
||||
|
||||
//NVCHANGED
|
||||
GenericNVList l = GenericNVList.GetList("aScheduleableUserGroup", "aID", "aName", true, true,false);
|
||||
GenericNVList l = GenericNVList.GetList("aScheduleableUserGroup", "aID", "aName", true, true, false);
|
||||
|
||||
//Loop through the items in the list and put them
|
||||
//into the combo box
|
||||
@@ -1931,7 +1944,7 @@ namespace AyaNova
|
||||
r.Inflate(-1, -1);
|
||||
FillRoundedRect(e.Cache.Paint, e.Graphics, e.Cache.GetSolidBrush(clAppointmentBackground), r, 5);
|
||||
|
||||
//case 1228
|
||||
//case 1228
|
||||
r.Inflate(-3, -3);
|
||||
e.Cache.FillRectangle(System.Drawing.Brushes.White, r);
|
||||
|
||||
@@ -1990,7 +2003,7 @@ namespace AyaNova
|
||||
Rectangle ir = new Rectangle(e.Bounds.X, e.Bounds.Y, 16, 16);
|
||||
Brush br = e.Cache.GetSolidBrush(Color.WhiteSmoke);
|
||||
//case 739
|
||||
e.Cache.Paint.DrawImage(e.Graphics,Util.Flag(i.PriorityARGB), ir);
|
||||
e.Cache.Paint.DrawImage(e.Graphics, Util.Flag(i.PriorityARGB), ir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2009,7 +2022,7 @@ namespace AyaNova
|
||||
{
|
||||
Rectangle ir = new Rectangle(e.Bounds.X, e.Bounds.Y, 16, 16);
|
||||
Brush br = e.Cache.GetSolidBrush(Color.WhiteSmoke);
|
||||
e.Cache.Paint.DrawImage(e.Graphics,Resource1.ScheduleMarker16, ir);
|
||||
e.Cache.Paint.DrawImage(e.Graphics, Resource1.ScheduleMarker16, ir);
|
||||
|
||||
}
|
||||
e.Handled = true;
|
||||
@@ -2065,7 +2078,7 @@ namespace AyaNova
|
||||
|
||||
#region Date range changed event
|
||||
double nMaxWindow = 0;
|
||||
// double nCurrentWindow = 0;
|
||||
// double nCurrentWindow = 0;
|
||||
|
||||
private void sc_VisibleIntervalChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -2085,48 +2098,57 @@ namespace AyaNova
|
||||
//System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString() + " *New date range should fetch*");
|
||||
return true;
|
||||
}
|
||||
// System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString() + " Not a new date range no fetch");
|
||||
// System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString() + " Not a new date range no fetch");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#endregion date range change
|
||||
//case 3892
|
||||
//void DayView_TopRowTimeChanged(object sender, DevExpress.XtraScheduler.Native.ChangeEventArgs e)
|
||||
//{
|
||||
// System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString() + "DayView_TopRowTimeChanged fired");
|
||||
// BindData();
|
||||
//}
|
||||
|
||||
|
||||
#region case 812 selected appointments
|
||||
public System.Collections.Generic.List<AppointmentList.AppointmentListInfo> SelectedAppointments
|
||||
{
|
||||
get
|
||||
{
|
||||
System.Collections.Generic.List<AppointmentList.AppointmentListInfo> apts = new List<AppointmentList.AppointmentListInfo>();
|
||||
if (sc.SelectedAppointments.Count == 0) return apts;
|
||||
foreach (Appointment a in sc.SelectedAppointments)
|
||||
{
|
||||
apts.Add((AppointmentList.AppointmentListInfo)a.CustomFields["AyaInfo"]);
|
||||
}
|
||||
return apts;
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<Guid> VisibleUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
System.Collections.Generic.List<Guid> usrs = new List<Guid>();
|
||||
for (int x = 0; x < ss.Resources.Count; x++)
|
||||
{
|
||||
Resource r = ss.Resources[x];
|
||||
if (r.Id == null || string.IsNullOrEmpty(r.Id.ToString())) continue;
|
||||
Guid id = new Guid(r.Id.ToString());
|
||||
if (id == Guid.Empty) continue;
|
||||
if(r.Visible)
|
||||
usrs.Add(id);
|
||||
#endregion date range change
|
||||
|
||||
}
|
||||
return usrs;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region case 812 selected appointments
|
||||
public System.Collections.Generic.List<AppointmentList.AppointmentListInfo> SelectedAppointments
|
||||
{
|
||||
get
|
||||
{
|
||||
System.Collections.Generic.List<AppointmentList.AppointmentListInfo> apts = new List<AppointmentList.AppointmentListInfo>();
|
||||
if (sc.SelectedAppointments.Count == 0) return apts;
|
||||
foreach (Appointment a in sc.SelectedAppointments)
|
||||
{
|
||||
apts.Add((AppointmentList.AppointmentListInfo)a.CustomFields["AyaInfo"]);
|
||||
}
|
||||
return apts;
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<Guid> VisibleUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
System.Collections.Generic.List<Guid> usrs = new List<Guid>();
|
||||
for (int x = 0; x < ss.Resources.Count; x++)
|
||||
{
|
||||
Resource r = ss.Resources[x];
|
||||
if (r.Id == null || string.IsNullOrEmpty(r.Id.ToString())) continue;
|
||||
Guid id = new Guid(r.Id.ToString());
|
||||
if (id == Guid.Empty) continue;
|
||||
if (r.Visible)
|
||||
usrs.Add(id);
|
||||
|
||||
}
|
||||
return usrs;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user