Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.deviceId       = Common.GetEncryptedQueryStringValue("deviceId", 0);
            LabelPageTitle.Text = (this.deviceId == 0) ? "New Device" : "Edit Device";
            PanelError.Visible  = false;

            Page.Form.DefaultFocus  = DropDownListDeviceType.ClientID;
            Page.Form.DefaultButton = ButtonSaveList.UniqueID;

            if (!IsPostBack)
            {
                DropDownListDeviceType.Focus();

                BindDeviceType();
                BindMobileNetwork();

                PanelMobile.Visible = false;
                PanelLaptop.Visible = false;

                ButtonSaveEdit.Visible = true;
                ButtonSaveNew.Visible  = true;

                if (ViewState["deviceId"] != null)
                {
                    this.deviceId = Convert.ToInt32(ViewState["deviceId"].ToString());
                }
                if (this.deviceId != 0)
                {
                    BindDevice();
                }
            }
        }