protected void AddJudoka(JudoShiaiWeb.judoka judoka, int jid, int cid) { competitionJudoka cj = new competitionJudoka(); cj.addedBy = 0; cj.addedDate = DateTime.Now; cj.beltId = Convert.ToInt16(ddlBelts.SelectedValue); cj.clubbId = judoka.clubbid; cj.judokaId = jid; if (!String.IsNullOrEmpty(txtWeight.Text)) { cj.weight = (int)(Convert.ToDecimal(txtWeight.Text) * 100); } else { cj.weight = 0; } cj.competitionId = cid; dbContext.competitionJudokas.Add(cj); dbContext.SaveChanges(); }
protected void AddJudoka(JudoShiaiWeb.judoka judoka, int jid, int cid) { competitionJudoka cj = new competitionJudoka(); cj.addedBy = 0; cj.addedDate = DateTime.Now; cj.beltId = Convert.ToInt16(ddlBelts.SelectedValue); cj.clubbId = judoka.clubbid; cj.judokaId = jid; if (!String.IsNullOrEmpty(txtWeight.Text)) { cj.weight = (int)(Convert.ToDecimal(txtWeight.Text) * 100); } else { cj.weight = 0; } cj.competitionId = cid; dbContext.competitionJudokas.Add(cj); dbContext.SaveChanges(); }