public void ImportIPO_NewApplication_MoneyTransactionRequest() { Web2014DataImportBAL bal = new Web2014DataImportBAL(); DataTable dt = new DataTable(); try { bal.Connect_SMS(); bal.Connect_Web(); dt = bal.GetDataWeb_IPOApplicationMoneyTransRequest_UITransApplied(); bal.InsertData_WebReceiveAll_UITransApplied(dt); bal.UpdateWebSyncFlagWeb_IPOApplicationMoneyTransRequest_UITransApplied(dt); bal.Commit_Web(); bal.Commit_SMS(); } catch (Exception ex) { bal.Rollback_Web(); bal.Rollback_SMS(); throw new Exception(ex.Message); } finally { bal.CloseConnection_Web(); bal.CloseConnection_SMS(); } }
private void button5_Click(object sender, EventArgs e) { Web2014DataImportBAL bal = new Web2014DataImportBAL(); DataTable dt = new DataTable(); try { bal.Connect_SMS(); bal.Connect_Web(); dt = bal.GetDataWeb_IPOApplicationMoneyTransRequest_UITransApplied(); bal.InsertData_WebReceiveAll_UITransApplied(dt); bal.UpdateWebSyncFlagWeb_IPOApplicationMoneyTransRequest_UITransApplied(dt); bal.Commit_Web(); bal.Commit_SMS(); MessageBox.Show("Upload Successfully"); } catch (Exception ex) { bal.Rollback_Web(); bal.Rollback_SMS(); MessageBox.Show(ex.Message); } finally { bal.CloseConnection_Web(); bal.CloseConnection_SMS(); } }