protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int returnID = Request.Params["key"].ToInt(); if (returnID != 0) { ReturnID = returnID; } } else { string code = Master.TextBoxCode.Text.Trim(); Master.TextBoxCode.Text = ""; if (BarcodeBLL.IsValidDINCode(code)) { LoadCurrentDIN(BarcodeBLL.ParseDIN(code)); } else if (BarcodeBLL.IsValidReturnCode(code)) { ReturnID = BarcodeBLL.ParseReturnID(code); } else if (BarcodeBLL.IsValidProductCode(code)) { AddPackOrder(BarcodeBLL.ParseProductCode(code)); } } }