FrmWorkLog: Fix NRE changing start date of a work log.
This commit is contained in:
@@ -435,14 +435,16 @@ namespace VAR.Toolbox.UI.Tools.WorkLog
|
|||||||
private void WorkLogItem_Update(bool refresh = true)
|
private void WorkLogItem_Update(bool refresh = true)
|
||||||
{
|
{
|
||||||
if (_currentWorkLogItem == null) { return; }
|
if (_currentWorkLogItem == null) { return; }
|
||||||
_currentWorkLogItem.DateStart = dtStart.Value;
|
DateTime dateStart = dtStart.Value;
|
||||||
|
_currentWorkLogItem.DateStart = dateStart;
|
||||||
_currentWorkLogItem.DateEnd = dtEnd.Value;
|
_currentWorkLogItem.DateEnd = dtEnd.Value;
|
||||||
_currentWorkLogItem.Activity = txtActivity.Text;
|
_currentWorkLogItem.Activity = txtActivity.Text;
|
||||||
_currentWorkLogItem.Description = txtDescription.Text;
|
_currentWorkLogItem.Description = txtDescription.Text;
|
||||||
if (refresh)
|
if (refresh)
|
||||||
{
|
{
|
||||||
|
lsbWorkLog.SelectedIndex = -1;
|
||||||
WorkLog_Refresh();
|
WorkLog_Refresh();
|
||||||
WorkLog_SelectDate(_currentWorkLogItem.DateStart);
|
WorkLog_SelectDate(dateStart);
|
||||||
}
|
}
|
||||||
WorkLog_MarkDirty();
|
WorkLog_MarkDirty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user