title: How to merge two datatable containing different column based on condition?
body: <p>I have two datatable , first contain </p>
  
  <pre><code> DataTable  dtMaterialStatement = new DataTable();
                      dtMaterialStatement.Columns.Add(new DataColumn("MaterialNo", Type.GetType("System.String")));
                      dtMaterialStatement.Columns.Add(new DataColumn("MaterialId", Type.GetType("System.String")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Qty", Type.GetType("System.Double")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Unit", Type.GetType("System.String")));
                      dtMaterialStatement.Columns.Add(new DataColumn("SinglePrice", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("PricePerPack", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("UnitsPerPack", Type.GetType("System.String")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Discount1", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Discount2", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Discount3", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("SalesPrice", Type.GetType("System.Decimal")));
                      dtMaterialStatement.Columns.Add(new DataColumn("Exist", Type.GetType("System.Boolean")));
  </code></pre>
  
  <p>Second contain:-</p>
  
  <pre><code>"MaterialNo"
    Qty
   "Unit"
   "SinglePrice"
   "PricePerPack"
   "UnitsPerPack"
   "Discount1"
    "Discount2"
   "Discount3"
   "SalesPrice"
  </code></pre>
  
  <p>and come extra column ,</p>
  
  <p>I want to merge both table , if MaterialNo of first tabel is same with second table MaterialNo column , then take common column field value from second table to update value of first value corresponding columns.
  else insert a new row in first table with using column of table first but taking value from second table.</p>