Button11
How do I use Button11
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: Form1.cs
Copy
373 public void Button11_Click(System.Object sender, System.EventArgs e)
374 {
375 string strmessage = default(string);
376 DialogResult dgrResult;
377
378 strmessage = "Are you sure you want to Delete this record?";
379 dgrResult = MessageBox.Show(strmessage, "Delete Record", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
380
381
382 if (dgrResult == System.Windows.Forms.DialogResult.Yes)
383 {
384
385 dsgrade = gradeclass.DataModule.deldata();
386
387 }
388
389
390
391 }
File name: frmSalesRecord2.cs
Copy
508 private void button11_Click(object sender, EventArgs e)
509 {
510 try{
511 Cursor = Cursors.WaitCursor;
512 timer1.Enabled = true;
513 rptSales rpt = new rptSales();
514 //The report you created.
515 cmd = new SqlCommand();
516 SqlDataAdapter myDA = new SqlDataAdapter();
517 POS_DBDataSet myDS = new POS_DBDataSet();
518 //The DataSet you created.
519 con = new SqlConnection(cs.DBConn);
520 cmd.Connection = con;
521 cmd.CommandText = "SELECT * from Customer,Invoice_Info where Customer.CustomerID=Invoice_Info.CustomerID and InvoiceDate Between @d1 and @d2 and PaymentDue > 0 order by InvoiceDate desc";
522 cmd.Parameters.Add("@d1", SqlDbType.DateTime, 30, "InvoiceDate").Value = DateTimePicker2.Value.Date;
523 cmd.Parameters.Add("@d2", SqlDbType.DateTime, 30, "InvoiceDate").Value = DateTimePicker1.Value.Date;
524 cmd.CommandType = CommandType.Text;
525 myDA.SelectCommand = cmd;
526 myDA.Fill(myDS, "Invoice_Info");
527 myDA.Fill(myDS, "Customer");
528 rpt.SetDataSource(myDS);
529 frmSalesReport frm = new frmSalesReport();
530 frm.crystalReportViewer1.ReportSource = rpt;
531 frm.Visible = true;
532 }
533 catch (Exception ex)
534 {
535 MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
536 }
537 }
File name: notepad1.cs
Copy
610 private void toolStripButton11_Click(object sender, EventArgs e)
611 {
612 FontKlyeMethod(FontStyle.Underline);
613 }
Button11 115 lượt xem
Gõ tìm kiếm nhanh...