📄 datetimetype.cs
字号:
namespace PowerEasy.WebSite.Controls.FieldControl
{
using PowerEasy.Controls;
using System;
using System.Web.UI.HtmlControls;
public class DateTimeType : BaseFieldControl
{
protected DatePicker PickDate;
protected RequiredFieldValidator ReqPickDate;
protected HtmlTableRow Tab;
protected void Page_Load(object sender, EventArgs e)
{
if (base.EnableNull)
{
this.ReqPickDate.Visible = true;
}
if (base.IsPostBack)
{
this.FieldValue = this.PickDate.Text;
}
else
{
this.PickDate.DateFormat = base.Settings[0];
string str = base.Settings[1];
if (str != null)
{
if (!(str == "0"))
{
if (str == "1")
{
this.PickDate.Text = DateTime.Now.ToString();
}
}
else
{
this.PickDate.Text = "";
}
}
if (this.FieldValue == "Now")
{
this.PickDate.Text = DateTime.Now.ToString();
}
else
{
this.PickDate.Text = this.FieldValue;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -