static void Main(string[] args) { string file = @"C:\Users\Priyank Kapadia\BankInformation\Batch\batch.txt"; TParser parse = new TParser(file); TransactionBuilder build = new TransactionBuilder(); int BatchId = parse.Parse(build); TransactionQueue queue = build.SetBatch(BatchId); TransactionService service = new TransactionService(); service.Start(queue); }
protected void Button1_Click(object sender, EventArgs e) { //{ // SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); // conn.Open(); // string insertQuery = "insert into [Table] ([name],[account],[amount]) values (@name1,@account1,@amount1)"; // SqlCommand com = new SqlCommand(insertQuery, conn); // com.Parameters.AddWithValue("@name1", TextBox3.Text); // com.Parameters.AddWithValue("@account1", TextBox1.Text); // com.Parameters.AddWithValue("@amount1", TextBox2.Text); // com.ExecuteNonQuery(); // Response.Redirect("manage.aspx"); // Response.Write("Transfer Successfull"); // conn.Close(); //} //catch (Exception ex) //{ // Response.Write("Error:"+ex.ToString()); //} if (FileUpload1.HasFile) { try { string filename = Path.GetFileName(FileUpload1.FileName); FileUpload1.SaveAs(Server.MapPath("~/") + filename); STATUS.Text = "Upload status: File uploaded!"; if (Session["AdminFlag"] != null) { VIEW_STATUS.Visible = Visible; VIEW_STATUS.Text = "View All Transactions"; } else { VIEW_STATUS.Visible = Visible; } System.Diagnostics.Debug.WriteLine("Transfer Operation"); System.Diagnostics.Debug.WriteLine("UserName:"******"New"].ToString()); System.Diagnostics.Debug.WriteLine("User GUID:" + Session["SESSIONID"].ToString()); System.Diagnostics.Debug.WriteLine("Session ID:" + HttpContext.Current.Session.SessionID); string file = Server.MapPath("~/ ") + filename; TParser parse = new TParser(file); TransactionBuilder build = new TransactionBuilder(); int BatchId = parse.Parse(build); TransactionQueue queue = build.SetBatch(BatchId); TransactionService service = new TransactionService(); service.Start(queue); } catch (Exception ex) { STATUS.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message; } } }
static void Main(string[] args) { string file = @"C:\Users\Priyank Kapadia\BankInformation\Batch\batch.txt"; TParser parse = new TParser(file); TransactionBuilder build = new TransactionBuilder(); int BatchId = parse.Parse(build); TransactionQueue queue = build.SetBatch(BatchId); TransactionService service = new TransactionService(); service.Start(queue); }