foreach (DataRow row in table.Rows) { string stock = row["stocksum_id"].ToString(); string product = row["prod_name"].ToString(); string packing = row["conversion_factor"].ToString(); string mfg = row["manufacturer_id"].ToString(); string batch = row["batchno"].ToString(); string expiry = row["expiry_date"].ToString().Substring(0, 10); string mrp = row["mrp"].ToString(); string totq = row["current_stock"].ToString(); string[] mrpvalue = row["purchase_price"].ToString().Split('.'); string barcode = row["scan_code"].ToString(); string prodGrade = row["prod_grade"].ToString(); if (totq.Contains(".")) { totq = totq.Substring(0, 3); }
if (totq.Contains(".") && totq.Length>3) { totq = totq.Substring(0,3); }
decimal.Round(totq, 1, MidpointRounding.AwayFromZero);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)