protected void JqgridTeam_RowAdding(object sender, Trirand.Web.UI.WebControls.JQGridRowAddEventArgs e)
 {
     if (Session["seasonid"] == null) return;
     if (Convert.ToInt32(Session["seasonid"]) == 0) return;
     using (var dc = ThaitaeDataDataContext.Create())
     {
         var objTeam = new Team
                           {
                               TeamName = e.RowData["TeamName"].Trim(),
                               TeamDesc = e.RowData["TeamDesc"].Trim(),
                               Active = Convert.ToByte(e.RowData["ActiveName"]),
                               Guid = Guid.NewGuid()
                           };
         dc.Teams.InsertOnSubmit(objTeam);
         dc.SubmitChanges();
         dc.TeamSeasons.InsertOnSubmit(new TeamSeason
         {
             SeasonId = Convert.ToInt32(Session["seasonid"]),
             TeamId = objTeam.TeamId
         });
         dc.SubmitChanges();
     }
 }
 partial void UpdateTeam(Team instance);
 partial void DeleteTeam(Team instance);
 partial void InsertTeam(Team instance);