System.Globalization.TaiwanCalendar.GetYear C# (CSharp) Method

GetYear() public method

public GetYear ( System.DateTime time ) : int
time System.DateTime
return int
        public override int GetYear(DateTime time) {
            return (helper.GetYear(time));
        }

Usage Example

Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string pUserID   = Session["ID"] + "";
        string pUserName = Session["name"] + "";

        //PostBack後停留在原畫面
        Page.MaintainScrollPositionOnPostBack = true;

        //全區公用↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

        TextUserName.Text = "您好," + pUserName + " " + Session["jobtitle"] + "";
        if (pUserName == "")
        {
            TextUserName.Visible = false;
            SignOut.Visible      = false;
        }

        //全區公用↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

        DateTime data       = DateTime.Now;
        var      taiwanyear = new System.Globalization.TaiwanCalendar();

        LBRPJ001.Text = "PJ" + taiwanyear.GetYear(data) + data.ToString("MM") + 000;

        //selectone();
        //年度
        Year();

        //TXTRPJ007.Attributes.Add("OnKeyPress", "txtkey();");
    }
All Usage Examples Of System.Globalization.TaiwanCalendar::GetYear