Пример #1
0
 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();
     }
 }
Пример #2
0
 partial void UpdateTeam(Team instance);
Пример #3
0
 partial void DeleteTeam(Team instance);
Пример #4
0
 partial void InsertTeam(Team instance);