pkmn-classic-framework/gts/test/VideoId.aspx.cs
Greg Edwards 4198aace33 For fuck's sake mysql
Workaround LAST_INSERT_ID and CAST limitations by making all primary keys unsigned bigint.
Workaround LAST_INSERT_ID signed/unsigned inconsistency between 5.5 and 5.6 by using Convert.ToUInt64 instead of casts.
2014-07-22 12:04:31 -04:00

30 lines
892 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PkmnFoundations.Structures;
namespace PkmnFoundations.GTS.test
{
public partial class VideoId : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnToSerial_Click(object sender, EventArgs e)
{
ulong valueNumeric = Convert.ToUInt64(txtBattleVideo.Text.Replace("-", ""));
txtSerial.Text = BattleVideoHeader4.SerialToKey(valueNumeric).ToString();
}
protected void btnToVideo_Click(object sender, EventArgs e)
{
ulong valueNumeric = Convert.ToUInt64(txtSerial.Text.Replace("-", ""));
txtBattleVideo.Text = BattleVideoHeader4.KeyToSerial(valueNumeric).ToString();
}
}
}