protected void btnAdd_Click(object sender, EventArgs e)
    {
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Device/All.aspx")).ToList();
        var empty_seri_logger           = list.Where(x => x.ControlId.Contains("empty_seri_logger")).FirstOrDefault();
        var logger_update_confirm       = list.Where(x => x.ControlId.Contains("logger_update_confirm")).FirstOrDefault();

        ntf.VisibleOnPageLoad = true;
        if (string.IsNullOrEmpty(cboSerials.Text))
        {
            ntf.Text = empty_seri_logger.Contents;
            cboSerials.Focus();
            return;
        }
        var logger   = GetControlValues();
        var dbLogger = _loggerBL.GetLogger(cboSerials.Text);

        if (dbLogger == null)
        {
            try
            {
                _loggerBL.InsertLogger(logger);
                ntf.Text = "logger added.";
                Serial_DataSource.DataBind();
                cboSerials.DataBind();
            }
            catch (Exception ex)
            {
                ntf.Text = "Lỗi: " + ex.Message;
                //throw;
            }
        }
        else
        {
            try
            {
                _loggerBL.UpdateLogger(logger, dbLogger);
                //ntf.Text = "Đã cập nhật logger.";
                ntf.Text = logger_update_confirm.Contents;
            }
            catch (Exception ex)
            {
                ntf.Text = "Lỗi: " + ex.Message;
                //throw;
            }
        }
    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Device/All.aspx")).ToList();
        var empty_seri_logger           = list.Where(x => x.ControlId.Contains("empty_seri_logger")).FirstOrDefault();

        ntf.VisibleOnPageLoad = true;
        if (string.IsNullOrEmpty(cboSerials.Text))
        {
            ntf.Text = empty_seri_logger.Contents;
            cboSerials.Focus();
            return;
        }
        var logger = _loggerBL.GetLogger(cboSerials.Text);

        if (logger != null)
        {
            try
            {
                _loggerBL.DeleteLogger(logger);
                ntf.Text = "logger deleted.";
                SetControlDefault();
                Serial_DataSource.DataBind();
                cboSerials.DataBind();
            }
            catch (Exception ex)
            {
                ntf.Text = "Lỗi: " + ex.Message;
                throw;
            }
        }
        else
        {
            ntf.Text = "seri logger not exist.";
        }
        cboSerials.Focus();
    }