private void ConBtn_Click(object sender, EventArgs e) { string name = Fname.Text; string lastname = Lname.Text; string mobileNumber = numeric.Value.ToString(); string Email = mail.Text; string DOB = dob.Value.ToString("yyyy-MM-dd"); string sqlupdate = "update customer " + "set cname = '" + comboBox1.Text + name + " " + lastname + "', phone_number = " + mobileNumber + ", dob = '" + DOB + "' " + "where cus_email = '" + Email + "' and pass = "******"; "; if (name != "" && lastname != "" && Email != "") { if (!Main.Instance.Pnl.Controls.ContainsKey("PaymentControl")) { PaymentControl pay = new PaymentControl(sqlupdate, rcheck, bids1, bids2, comboBox1.Text + name + " " + lastname, cost, Email, Main.Instance.password); pay.Dock = DockStyle.Fill; Main.Instance.Pnl.Controls.Add(pay); } Main.Instance.Pnl.Controls["PaymentControl"].BringToFront(); Main.Instance.BackBtn.Visible = true; } else { MessageBox.Show("Please Input Details"); } }
public async Task <CreatePaymentControlCreated> Handle(CreatePaymentControlCommand request, CancellationToken cancellationToken) { var license = await db.Licenses.FindAsync(request.LicenceId); if (license == null) { throw new NotFoundException(nameof(License), request.LicenceId); } var client = await db.Clients.FindAsync(license.ClientId); if (client == null) { throw new NotFoundException(nameof(Client), request.LicenceId); } var configuration = db.Configuration.FirstOrDefault(); if (configuration == null) { throw new NotFoundException(nameof(Configuration), Guid.Empty); } string location = paymentTool.generatePaymentControl(client.Description, license.Name, request.ExpirationDate, configuration.GeneratedPaymentControlPath); var ent = new PaymentControl() { Id = Guid.NewGuid(), GeneratedDate = DateTime.Now, ExpirationDate = request.ExpirationDate, LicenceId = request.LicenceId, Localization = location, Public = request.Public, SendByEmail = request.SendByEmail, SentByEmail = false, SentByEmailDate = DateTime.Now }; await db.PaymentControls.AddAsync(ent); await db.SaveChangesAsync(); return(mapper.Map <CreatePaymentControlCreated>(ent)); }
private void MenuSelectControl_OnPaymentControlStatusRecieved(object sender, int tableNum) { PaymentControl.SetTable(tableNum); PaymentControl.Visibility = Visibility.Visible; }