protected void gvMatch_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            var tbHome = gvMatch.Rows[gvMatch.EditIndex].FindControl("tbHome") as TextBox;
            var tbAway = gvMatch.Rows[gvMatch.EditIndex].FindControl("tbAway") as TextBox;
            var tbPlayTime = gvMatch.Rows[gvMatch.EditIndex].FindControl("tbPlayTime") as TextBox;
            var tbRound = gvMatch.Rows[gvMatch.EditIndex].FindControl("tbRound") as TextBox;

            var key = gvMatch.DataKeys[gvMatch.EditIndex];

            if (tbHome != null && tbAway != null && tbPlayTime != null && tbRound != null && key != null)
            {
                try
                {
                    var guid = (Guid)key.Value;

                    var m = new Match(guid);

                    short rHome;
                    short rAway;
                    if (short.TryParse(tbHome.Text, out rHome) && short.TryParse(tbAway.Text, out rAway))
                    {
                        m.ResultHome = rHome;
                        m.ResultAway = rAway;
                    }
                    else if (string.IsNullOrEmpty(tbHome.Text) && string.IsNullOrEmpty(tbAway.Text))
                    {
                        m.ResultHome = null;
                        m.ResultAway = null;
                    }

                    m.PlayTime = Convert.ToDateTime(tbPlayTime.Text);

                    if (!string.IsNullOrEmpty(tbRound.Text))
                        m.Round = Convert.ToInt16(tbRound.Text);

                    m.Update();

                    var casinoItemGuid = CasinoItem.GetCasinoItemGuidByMatch(guid, CasinoType.MatchResult);

                    if (casinoItemGuid.HasValue && m.ResultHome.HasValue && m.ResultAway.HasValue)
                    {
                        Match.UpdateMatchResult(casinoItemGuid.Value, m.ResultHome.Value, m.ResultAway.Value);
                    }

                    if (casinoItemGuid.HasValue)
                        CasinoItem.UpdateCasinoItemCloseTime(guid, m.PlayTime);
                }
                catch (Exception ex)
                {
                    ClientScript.RegisterClientScriptBlock(typeof(string), "failed", $"alert('{ex.Message}');", true);
                }
            }

            gvMatch.EditIndex = -1;

            BindData();
        }