private void btnUploadData_Click(object sender, EventArgs e) { try { bool check = validationUpload(); if (check == false) { // MessageBox.Show("invalid entry"); return; } else { string connectionstring = "Data Source=10.10.5.251;Initial Catalog=Demo;User ID=dev;Password=SamDev@2020"; DapperPlusManager.Entity<UploadSBAPayment>().Table("UploadSBAPayment"); List<UploadSBAPayment> SBAPayment = uploadSBAPaymentBindingSource.DataSource as List<UploadSBAPayment>; if (SBAPayment != null) { using (SqlConnection con = new SqlConnection(connectionstring)) { con.Open(); con.BulkInsert(SBAPayment); con.Close(); } } } MessageBox.Show("Data Upload Successfully"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)