예제 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        LockManager manager = new LockManager();

        if (Request["DeviceID"] != null && !string.IsNullOrEmpty(Request["DeviceID"]))
        {
            manager.UpdateLockDevice(Request["DeviceID"].ToString(), ddlDeviceType.SelectedValue, hdRentNO.Value, txtVersion.Text, txtBatch.Text, txtMemo.Text, ddlStatus.SelectedValue);
        }
        else
        {
            manager.AddLockDevice(txtDeviceID.Text, ddlDeviceType.SelectedValue, hdRentNO.Value
                                  , txtVersion.Text, txtBatch.Text, txtMemo.Text, ddlStatus.SelectedValue);
        }
        ScriptManager.RegisterStartupScript(btnSave, btnSave.GetType(), "success", "javascript:SaveDialog();", true);
    }