private void PlayerViewModel_PlayerChanged(object sender, EventArgs e) { HitDice.ReplaceRange(from h in Context.Player.GetHitDie() orderby h select new HitDieViewModel(this, h)); OnPropertyChanged(null); Skills.ReplaceRange(Context.Player.GetSkills()); Scores.Update(Context.Player); ShowClasses.ChangeCanExecute(); ShowRace.ChangeCanExecute(); ShowBackground.ChangeCanExecute(); UpdateAllConditions(); UpdateCondtions(); resources.Clear(); resources.AddRange(from r in Context.Player.GetResourceInfo(true).Values select new ResourceViewModel(r, this)); resources.AddRange(from r in Context.Player.GetBonusSpells(false) select new ResourceViewModel(r, this)); UpdateResources(); features = (from f in Context.Player.GetFeatures() where f.Name != "" && !f.Hidden select f).ToList(); UpdateFeatures(); proficiencies = new List <IXML>(); proficiencies.AddRange(Context.Player.GetLanguages()); proficiencies.AddRange(Context.Player.GetToolProficiencies()); proficiencies.AddRange(from p in Context.Player.GetToolKWProficiencies() select new Feature(p, "Proficiency")); proficiencies.AddRange(from p in Context.Player.GetOtherProficiencies() select new Feature(p, "Proficiency")); UpdateProficiencies(); UpdateItems(); UpdateSpellcasting(); UpdateInventoryChoices(); UpdateJournal(); UpdateNotes(); }
private void Parent_PlayerChanged(object sender, EventArgs e) { HitDice.ReplaceRange(from h in Context.Player.GetHitDie() orderby h select new HitDieViewModel(this, h)); Scores.Update(Context.Player); ShowClasses.ChangeCanExecute(); ShowRace.ChangeCanExecute(); ShowBackground.ChangeCanExecute(); }
private void btn_show_class_Click(object sender, EventArgs e) { this.Hide(); ShowClasses obj = new ShowClasses(); obj.tb_classes_list.Text = ClassController.Show(); obj.ShowDialog(); this.Close(); }
protected void Page_Load(object sender, EventArgs e) { int ShowDetailsID = Convert.ToInt32(Request["showdetailsid"]); int ShowDayID = Convert.ToInt32(Request["dayid"]); ShowDetails _showDetails = new ShowDetails(ShowDayID); DataRowCollection getDayRowData = _showDetails.GetDayData(ShowDayID, true); String res = "<table id='classDetails' showDetailsID='" + ShowDetailsID.ToString() + "'>"; String tmp = ""; tmp += "<tr>"; String dateThing = getDateOrdinalSuffix(_showDetails.ShowDate.Day); tmp += "<td class='classHeader' colspan='5'>" + _showDetails.ShowDate.ToString("dddd MMM d").ToUpper() + dateThing + " CLASSES</td>"; tmp += "<td>"; tmp += "<tr class='tableHeader'>"; tmp += "<td class='clsno'></td>"; tmp += "<td class='name'> </td>"; tmp += "<td class='grades'></td>"; tmp += "<td class='cat'></td>"; tmp += "<td class='height'></td>"; tmp += "</tr>"; res += tmp; foreach (DataRow row in getDayRowData) { ShowClasses sc = new ShowClasses(row); tmp = "<tr id='" + sc.ID + "' class='tableItem' >"; String grades = ""; grades = "<table class='gradeTable' style='border:none'><tr>"; String str = sc.Grades; for (int i = 1; i <= 7; i++) { grades += "<td grade='" + i.ToString() + "' >"; if (str.IndexOf((char)(i + 48)) > -1) { grades += i.ToString(); } grades += "</td>"; } grades += "</tr></table>"; tmp += String.Format("<td class='clsno'>Class {0}</td>", sc.ClassNo); tmp += String.Format("<td class='name'><div >{0} {1} {2} </div></td>", ShowClasses.expandHeight(row), sc.LongClassName, sc.ClassName); tmp += String.Format("<td class='cat'>{0}</td>", ShowClasses.expandCatagory(row) ); tmp += String.Format("<td class='grades'>{0}</td>", grades); tmp += "</tr>"; res += tmp; } res += "</table>"; previewArea.InnerHtml = res; }
public classesAllowed(ShowClasses sc) { String tmp = sc.longHeight; if (sc.EntryType == 2) { tmp = ""; } Category = sc.longCatagory; _className = "(" + Category[0] + ") " + tmp + " " + sc.getGrades + " " + sc.LongClassName + " " + sc.ClassName; _clsNo = sc.ClassNo; _entryType = sc.EntryType; _chargeType = sc.ChargeType; _classType = sc.ClassType; _charge = sc.Charge ; _classID = sc.ID; Lho = sc.Lho; }
public void addClassDetails(ShowClasses sc) { _classesAllowed.Add(new classesAllowed(sc)); }
private String CreateTotalsSummaryEmail(int ShowID, int UserID, ref Decimal totals) { ShowClasses classes = new ShowClasses(); List<ShowClasses.Totals> totalsList = classes.getShowTotalsForUser(ShowID, UserID); TransactionSummary transSummary = new TransactionSummary(ShowID, UserID); String totalsBox = "<table>"; totalsBox += "<tr >"; foreach (ShowClasses.Totals total in totalsList) { String tmp = "<span class='infoSpacer'></span>"; totalsBox += "<tr class='clsTypeRow group' entryType='" + total.EntryType + "' >"; totalsBox += "<td class='clsTypeName themeBorder-r themeContentHilite' chargename='" + total.ChargeName + "'>" + tmp + total.ChargeName + "</td>"; totalsBox += "<td class='clsTypeRate themeBorder-r'>" + total.ChargeRate.ToString("0.00") + "</td>"; totalsBox += "<td class='clsTypeEntry themeBorder-r'>" + total.Count + "</td>"; totalsBox += "<td class='clsTypeSubTotal'>" + total.Total.ToString("0.00") + "</td>"; totalsBox += "</tr>"; totals += total.Total; } if (transSummary.ID != -1) { totalsBox += "<tr class='clsTypeRow group prepaid'>"; totalsBox += "<td class='clsTypePaymentInfo themeBorder-t themeContentHilite'>Payment Received</td>"; totalsBox += "<td class='clsTypeTotal themeBorder-t themeBorder-l'>" + transSummary.Total.ToString("0.00") + "</td>"; totalsBox += "</tr >"; totals -= transSummary.Total; } totalsBox += "<tr class='clsTypeRow group fulltotal'>"; if (totals > 0) { totalsBox += "<td class='clsTypePaymentInfo themeBorder-t themeContentHilite'>Payment Due</td>"; } else if (totals < 0) { totalsBox += "<td class='clsTypePaymentInfo themeBorder-t themeContentHilite'>Payment Due</td>"; } else { totalsBox += "<td class='clsTypePaymentInfo themeBorder-t themeContentHilite'>No Payment Due</td>"; } totalsBox += "<td class='clsTypeTotal themeBorder-t themeBorder-l'>" + totals.ToString("0.00") + "</td>"; totalsBox += "</tr >"; totalsBox += "</table>"; return totalsBox; }