Click here to Skip to main content
15,567,514 members

Comments by breaker-code (Top 81 by date)

breaker-code 6-Apr-16 0:05am View    
Any One please give me the solution
breaker-code 11-Sep-15 4:02am View    
i never delete records.automatically jump auto increment Number.
breaker-code 26-Mar-15 1:25am View    
you mean this path,
C:\inetpub\wwwroot\Antron
OR
<add name="AntronERP_DBConnectionString" connectionstring="Data Source=WIN-QBTC29S7939;Initial Catalog=ERP_DB;User ID=sa;Password=h@123" providername="System.Data.SqlClient">
breaker-code 6-Feb-15 2:45am View    
Deleted
txtMAWB.Text = "";
txtMAWBDate.Text = "";
txtFlight.Text = "";
txtFlightDate.Text = "";
txtNoOfPkgs.Text = "";
txtWeight.Text = "";
lblError.Text = "";


List<string[]> testParse = null;


string[] row =null;

try
{
FileUpload1.PostedFile.SaveAs(System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "source.txt");

testParse = parseCSV(System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "source.txt", 24);

BAL.CSV_temp.newTable1 = new DataTable();
BAL.CSV_temp.newTable = new DataTable();

//HAWBDetails.DataSource = BAL.CSV_temp.newTable1;
//HAWBDetails.DataBind();

foreach (string column in testParse[0])
{
BAL.CSV_temp.newTable.Columns.Add();
BAL.CSV_temp.newTable1.Columns.Add();
}


row = testParse[0];
BAL.CSV_temp.newTable.Rows.Add(row);


txtMAWB.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(1).ToString();
txtMAWBDate.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(2).ToString();
txtFlight.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(3).ToString();
txtFlightDate.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(4).ToString();
txtNoOfPkgs.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(5).ToString();
txtWeight.Text = BAL.CSV_temp.newTable.Rows[0].ItemArray.ElementAt(6).ToString();

List<string[]> testParse1 = testParse.GetRange(1, testParse.Count - 1);


foreach (string[] row1 in testParse1)
{

BAL.CSV_temp.newTable1.Rows.Add(row1).ToString().Trim();

}

//Label3.Text = BAL.CSV_temp.newTable1.Rows[0].ItemArray.ElementAt(6).ToString();

HAWBDetails.DataSource = BAL.CSV_temp.newTable1;
HAWBDetails.DataBind();


lblError.Text = "";
}
catch (Exception ex)
{
lblError.Text = "File contents are not in the correct format";
ErrorLog el = new ErrorLog();
el.ErrorRegistry(ex, "CSV_reader.aspx", "Selecting File", "NA", "NA");
}
breaker-code 6-Feb-15 2:45am View    
After Lemon word.