SourceCode/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.cs
John 2d753b1db6 Allow user to select a date to begin showing change bars
Added context menu item to allow the selection of a date to begin showing change bars.
2016-02-24 17:34:21 +00:00

52 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Controls;
using VEPROMS.CSLA.Library;
namespace VEPROMS
{
public partial class dlgSetChangeBarStartDate : DevComponents.DotNetBar.Office2007Form
{
private ProcedureConfig _MyProcConfig = null;
public ProcedureConfig MyProcConfig
{
get { return _MyProcConfig; }
set { _MyProcConfig = value; }
}
public dlgSetChangeBarStartDate(ProcedureConfig pc)
{
InitializeComponent();
_MyProcConfig = pc;
}
private void dlgSetChangeBarStartDate_Load(object sender, EventArgs e)
{
string cbdt = MyProcConfig.Print_ChangeBarDate;
string[] tmp = cbdt.Split(' ');
cbdt = tmp[0] + " 00:00:00";
dateTimeInput1.Value = (cbdt == null || cbdt == "") ? DateTime.Now : DateTime.Parse(cbdt);
}
private void btnOK_Click(object sender, EventArgs e)
{
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy 00:00:00");// ("MM/dd/yyyy HH:mm:ss");
}
private void btnNow_Click(object sender, EventArgs e)
{
dateTimeInput1.Value = DateTime.Now;
}
}
}