public void TestGetOrder() { Checkout checkout = new Checkout(); // checkout.BuerId =new Guid("2D3455F8-C7B5-4949-814A-A02A00DE271E"); checkout.PriceType = PriceType.PayOnline; List<OrderDetail> details = new List<OrderDetail>(); OrderDetail detail = new OrderDetail(); detail.Quantity =5; Ticket t = new BLLTicket().GetTicket(1); TicketPrice tp = t.TicketPrice.Single<TicketPrice>(x => x.PriceType == PriceType.PayOnline); detail.TicketPrice = tp; for (int i = 0; i < detail.Quantity; i++) { TicketAssign ta = new TicketAssign(); ta.IdCard = "idcard1"; ta.IsUsed = false; ta.Name = "namei"; detail.TicketAssignList.Add(ta); } // new BLLOrderDetail().SaveOrUpdateOrderDetail(detail); details.Add(detail); checkout.Details = details; checkout.MakeOrder(); }
public bool IsCurrentScenicTicket(Ticket t) { t = new BLLTicket().GetTicket(t.Id); if (t.Scenic.Id == bllMember.GetScenicAdmin((Guid)CurrentUser.ProviderUserKey).Scenic.Id) return true; else return false; }
public bool IsCurrentScenicTicket(Ticket t) { t = new BLLTicket().GetTicket(t.Id); if (t.Scenic.Id == Master.Scenic.Id) return true; else return false; }
public form1() { _bllTicket = new BLLTicket(); _tickets = new List<Ticket>(); _oldTickets = new List<Ticket>(); InitializeComponent(); UpdateGridView(); }
/// <summary> /// 通过 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnPass_Click(object sender, EventArgs e) { UpdateStatus(CheckStatus.Pass, ScenicModule.SellOnLine); checkprogress = bllScenic.GetStatus(scenic.Id, ScenicModule.SellOnLine); LoadOnLineCheck(); //更改该景区票的状态为释放 Ticket ticket = new BLLTicket().GetTicketByscId(scenic.Id)[0]; ticket.Lock = false; new BLLTicket().SaveOrUpdateTicket(ticket); //Response.Redirect("ScenicPrice.aspx?id=" + Request["id"] + ""); }
public bool IsCurrentScenicTp(Ticket t) { t = new BLLTicket().GetTicket(t.Id); BLLScenicTicket bllscenicticket = new BLLScenicTicket(); List<Scenic> list = bllscenicticket.GetScenicByTicket(t.Id).ToList(); foreach (Scenic item in list) { if (item.Id == bllMember.GetScenicAdmin((Guid)CurrentUser.ProviderUserKey).Scenic.Id) { return true; } } return false; }
public bool IsCurrentScenicTp(Ticket t) { t = new BLLTicket().GetTicket(t.Id); BLLScenicTicket bllscenicticket = new BLLScenicTicket(); List<Scenic> list = bllscenicticket.GetScenicByTicket(t.Id).ToList(); foreach (Scenic item in list) { if (item.Id == Master.Scenic.Id) { return true; } } return false; }
public void EnsureTicket() { var iticket = MockRepository.GenerateStub<DAL.DALTicket>(); int scid = 1; IList<Model.Ticket> tickets = new List<Model.Ticket>(); Model.Ticket ticket = new Model.TicketNormal() { Name = "test" }; tickets.Add(ticket); iticket.Stub(x => x.GetTicketByscId(scid)).Return(tickets); BLL.BLLTicket bllticket = new BLL.BLLTicket(); bllticket.Iticket = iticket; // Assert.AreNotEqual(ticket, bllticket.EnsureTicket(scid)); }
protected void BindCart() { IList<Ticket> ts = new BLLTicket().GetTicketsFromCart(); if (ts.Count == 0) { rptPopCart.Visible = false; pnlEmpty.Visible = true; } else { rptPopCart.Visible = true; pnlEmpty.Visible = false; } rptPopCart.DataSource = new BLLTicket().GetTicketsFromCart(); rptPopCart.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { _bllTicket = new BLLTicket(); Control div = Master.FindControl("divLogout"); div.Visible = true; Label lblAdmin = Master.FindControl("lblAdmin") as Label; lblAdmin.Text = "" + Session["Admin"]; int ticketId = Convert.ToInt32(Request.QueryString["TicketId"]); _tick = _bllTicket.GetTicketById(ticketId); if (_tick != null) { PopulateLabels(); PopulateCommentBox(); NewCommentControls(); BottomButtons(); } }
public void Run() { Console.WriteLine("Searching for tickets with high priority, which haven't been notified about and have been set in the last 90-120min."); BLLTicket bll = new BLLTicket(); List<Ticket> tickets = bll.GetTickets().Where(t => t.IsDone == false).Where(t1 => t1.SeverityLevelId == bll.GetPriorities()[0].SeverityLevel).Where(t3 => t3.Notified == false).ToList(); if (tickets.Count > 0) { Console.WriteLine("Sending a mail..."); string str = "Disse ticket(s) kræver øjeblikkelig handling:<br/><br/>"; foreach (Ticket t in tickets) { str += "\nTicket ref: <b>" + t.Id + "</b>, "; str += "Virksomhed: <b>" + t.User.Company.Name + "</b>, "; str += "Fornavn: <b>" + t.User.Firstname + "</b>, "; str += "Efternavn: <b>" + t.User.Lastname + "</b>, "; str += "Fejl Resumé: <b>" + t.IssueSummary + "</b>, "; str += "Alvorlighed: <b>" + t.Priority.Name + "</b>, "; str += "Date: <b>" + t.Created + "</b><br/>"; t.Notified = true; } MailMe.SendMail("Vigtig!!!", str, "*****@*****.**"); foreach (Ticket t in tickets) bll.UpdateOldTicket(t); Console.WriteLine("A mail was send"); Console.WriteLine("_______________________________________"); } else { Console.WriteLine("Nothing was send..."); Console.WriteLine("_______________________________________"); } if (ThreadDone != null) ThreadDone(this, EventArgs.Empty); }
protected void Button2_Click(object sender, EventArgs e) { BLLTicket bllticket = new BLLTicket(); Label1.Text= bllticket.BuyTicket(null, 1, "微博送票参与者", txtIdcard.Text, "", 1); }
protected void Page_Init(object sender, EventArgs e) { _bllTicket = new BLLTicket(); }