Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         txtRefNo.Text = OrderAccess.GetRefNumber();
     }
 }
Beispiel #2
0
    protected void GetRefNo()
    {
        DateTime date         = System.DateTime.Now;
        string   refNo        = date.ToString("yy") + date.ToString("MM"); //System.DateTime.Now.Year.ToString();
        string   currentRefNo = OrderAccess.GetRefNumber();
        string   last3        = currentRefNo.Substring(currentRefNo.Length - 3);

        refNo = refNo + last3;

        int newRefNo = Int32.Parse(refNo);

        txtRefNo.Text = (newRefNo + 1).ToString();
        lblRefNo.Text = "Last Ref. No  : " + currentRefNo;    // "Last Ref. No. :  " + refNo;
    }
Beispiel #3
0
    protected void GetRefNo()
    {
        DateTime date         = System.DateTime.Now;
        string   refNo        = date.ToString("yy") + date.ToString("MM");       //System.DateTime.Now.Year.ToString();
        string   currentRefNo = OrderAccess.GetRefNumber();
        string   last3        = currentRefNo.Substring(currentRefNo.Length - 3); // error !!!!! what if value is less than 3 digits ????>

        if (last3 == "999")
        {
            last3 = "000";
        }
        refNo = refNo + last3;

        int newRefNo = Int32.Parse(refNo);

        txtRefNo.Text = (newRefNo + 1).ToString();
        lblRefNo.Text = "Last Ref. No  : " + currentRefNo;    // "Last Ref. No. :  " + refNo;
    }
Beispiel #4
0
 protected void GetRefNo()
 {
     txtRefNo.Text = OrderAccess.GetRefNumber();
 }