public List <string> GetAttributesList() { List <string> attributes = new List <string>(); attributes.Add(rego); attributes.Add(Make); attributes.Add(Model); attributes.Add(Year.ToString()); attributes.Add(VehClass); attributes.Add(Seats.ToString()); attributes.Add(Transmission); attributes.Add(Fuel); if (gps == true) { attributes.Add("gps"); } attributes.Add(SunRoof.ToString()); if (SunRoof == true) { attributes.Add("sunroof"); } attributes.Add(DailyRate.ToString()); attributes.Add(Colour); return(attributes); }
public void Constructor2(int number, string input) { Seats = Seats + number; Manufacturer = input; Console.WriteLine(Seats.ToString()); Console.WriteLine(Manufacturer); }
protected void btnGo_Click(object sender, EventArgs e) { decimal discountamt = 0; TransactionRecord tr = new TransactionRecord(); tr.BookingID = txt_BookingID.Text.Length > 0 ? long.Parse(txt_BookingID.Text) : 0; tr.ReceiptNo = txt_ReceiptNo.Text.Length > 0 ? txt_ReceiptNo.Text : "0"; tr.DateOfBooking = txt_BookingDate.Text.Length > 0 ? txt_BookingDate.Text : "0"; tr.Location = txt_bookingDateTo.Text.Length > 0 ? txt_bookingDateTo.Text : "0"; tr.ShowDate = txt_ShowDate.Text.Length > 0 ? txt_ShowDate.Text : "0"; tr.MobileNo = txt_ShowDateTo.Text.Length > 0 ? txt_ShowDateTo.Text : "0"; tr.Name = txt_Name.Text.Length > 0 ? txt_Name.Text : "0"; tr.AgentCode = ddlAgent.SelectedValue; DataSet ds = TransactionBOL.Select_Report_FromTransactionTable(tr); if (ds.Tables[0].Rows.Count > 0) { Btn_Excel.Enabled = true; btnPrint.Disabled = false; //for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //{ // if (ds.Tables[0].Rows[i][10].ToString() == "") // { // discountamt = discountamt + decimal.Parse(dr[2].ToString()); // } //} gv_Report.DataSource = ds.Tables[0]; lblMess.Text = ""; gv_Report.DataBind(); if (ds.Tables[1].Rows.Count > 0) { string card = ""; foreach (DataRow dr in ds.Tables[1].Rows) { Seats = Seats + int.Parse(dr[0].ToString()); totamt = totamt + decimal.Parse(dr[1].ToString()); if (dr[2].ToString() !="") { discountamt = discountamt + decimal.Parse(dr[2].ToString()); card += "<br/>Amount Received Using " + dr[3] + " : " + dr[2]; } //card += "<br/>Amount Received Using " + dr[3] + " : " + dr[2]; } lblTotSeats.Text = card; } gv_Report.FooterRow.Cells[0].Text = "Total"; gv_Report.FooterRow.Cells[1].Text = Seats.ToString(); gv_Report.FooterRow.Cells[2].Text = totamt.ToString(); gv_Report.FooterRow.Cells[3].Text = discountamt.ToString(); } else { btnPrint.Disabled = true; Btn_Excel.Enabled = false; lblMess.Text = "No Records Found!"; } }
public void Constructor3(int number, string input, string input2) { Seats = Seats + number; Manufacturer = input; CarColor = input2; Console.WriteLine(Seats.ToString()); Console.WriteLine(Manufacturer); Console.WriteLine(CarColor); }
public override void HandleBidNeeded(Seats whoseTurn, Bid lastRegularBid, bool allowDouble, bool allowRedouble) { #if syncTrace Log.Trace(2, "{0}.HandleBidNeeded: from {1}", this.Owner, whoseTurn); #endif if (this.tmc.seat != whoseTurn) { this.tmc.ChangeState(TableManagerProtocolState.WaitForOtherBid , false, false , new string[] { whoseTurn.ToString(), "Explain " } , "{0} ready for {1}'s bid", this.tmc.seat, whoseTurn); } }
public override void HandleCardNeeded(Seats controller, Seats whoseTurn, Suits leadSuit, Suits trump, bool trumpAllowed, int leadSuitLength, int trick) { if (whoseTurn != this.CurrentResult.Play.whoseTurn) { throw new ArgumentOutOfRangeException("whoseTurn", "Expected a needcard from " + this.CurrentResult.Play.whoseTurn); } if (controller == this.mySeat && this.EventBus != null) { var myCard = this.FindCard(whoseTurn, leadSuit, trump, trumpAllowed, leadSuitLength, trick); Log.Trace(3, "BridgeRobot.{2}.HandleCardNeeded: {0} plays {3}{1}", whoseTurn.ToString(), myCard.Suit.ToXML().ToLower(), this.mySeat.ToXML(), myCard.Rank.ToXML()); this.EventBus.HandleCardPlayed(whoseTurn, myCard.Suit, myCard.Rank); } }
public void Connect(Seats _seat, int _maxTimePerBoard, int _maxTimePerCard, string teamName) { this.seat = _seat; this.seatName = seat.ToString(); // Seat.ToXML(seat); this.team = teamName; this.maxTimePerBoard = _maxTimePerBoard; this.maxTimePerCard = _maxTimePerCard; this.WaitForProtocolSync = false; this.WaitForBridgeEvents = false; this.ChangeState(TableManagerProtocolState.WaitForSeated , false, false , new string[] { string.Format("{0} (\"{1}\") seated", seatName, teamName) , string.Format("{0} {1} seated", seatName, teamName) } , "Connecting \"{0}\" as {1} using protocol version {2:00}", this.team, this.seat, 18); }
public string CourseDatabaseString() { StringBuilder cdbstring = new StringBuilder(Term); cdbstring.Insert(5, Coursename); cdbstring.Insert(17, Coursetitle); cdbstring.Insert(34, Instructor); cdbstring.Insert(46, Credit.ToString()); cdbstring.Insert(52, Seats.ToString()); cdbstring.Insert(57, Times.Count); foreach (coursetime time in Times) { cdbstring.Append(time.ToString() + " "); } return(cdbstring.ToString()); }
public override void HandleCardNeeded(Seats controller, Seats whoseTurn, Suits leadSuit, Suits trump, bool trumpAllowed, int leadSuitLength, int trick) { #if syncTrace Log.Trace(2, "{0}.HandleCardNeeded", this.Owner); #endif if (whoseTurn != this.Play.whoseTurn) { throw new InvalidOperationException("whoseTurn"); } if (controller == this.tmc.seat) { if (this.Play.man == 1) { this.tmc.ChangeState(TableManagerProtocolState.WaitForLead, true, false, new string[] { string.Format("{0} to lead", this.Play.whoseTurn == this.Play.Dummy ? "Dummy" : this.Play.whoseTurn.ToXMLFull()) }, ""); } } else { #if syncTrace //Log.Trace("{0}.HandleCardNeeded from {1}", this.Owner.seat, whoseTurn); #endif this.tmc.ChangeState(TableManagerProtocolState.WaitForCardPlay , false, false , new string[] { "" } , "{0} ready for {1}'s card to trick {2}", this.tmc.seat, (this.tmc.seat == this.Play.Dummy && this.tmc.seat == whoseTurn ? "dummy" : whoseTurn.ToString()), trick); } }
public void Constructor1(int number) { Seats = Seats + number; Console.WriteLine(Seats.ToString()); }
protected override void ValidateSelf() { if (string.IsNullOrWhiteSpace(this.Quantity.ToString()) || String.IsNullOrEmpty(Quantity.ToString())) { this.ValidationErrors["Quantity"] = "Quantity cannot be empty."; } else { try { int.Parse(this.Quantity); } catch { this.ValidationErrors["Quantity"] = "Input is not a number."; } } if (string.IsNullOrWhiteSpace(this.Row.ToString()) || String.IsNullOrEmpty(Row.ToString())) { this.ValidationErrors["Row"] = "Row cannot be empty."; } else { try { int.Parse(this.Row); } catch { this.ValidationErrors["Row"] = "Input is not a number."; } } if (string.IsNullOrWhiteSpace(this.Seats.ToString()) || String.IsNullOrEmpty(Seats.ToString())) { this.ValidationErrors["Seats"] = "Seats cannot be empty."; } if (string.IsNullOrWhiteSpace(this.Ticket.ToString()) || String.IsNullOrEmpty(Ticket.ToString())) { this.ValidationErrors["Ticket"] = "Ticket cannot be empty."; } if (string.IsNullOrWhiteSpace(this.Auditorium.ToString()) || String.IsNullOrEmpty(Auditorium.ToString())) { this.ValidationErrors["Auditorium"] = "Auditorium cannot be empty."; } if (string.IsNullOrWhiteSpace(this.Theater.ToString()) || String.IsNullOrEmpty(Theater.ToString())) { this.ValidationErrors["Theater"] = "Theater cannot be empty."; } }