Esempio n. 1
0
 public static tblMaterial GetMaterial(string materialID)
 {
     using (LinqtoNewAgeDataContext dc = new LinqtoNewAgeDataContext())
     {
         return((from ord in dc.GetTable <tblMaterial>()
                 where ord.MaterialID == materialID
                 select ord).SingleOrDefault <tblMaterial>());
     }
 }
Esempio n. 2
0
 public static tblLengthCost GetLengthPricePerMeter(String materialID)
 {
     using (LinqtoNewAgeDataContext dc = new LinqtoNewAgeDataContext())
     {
         return((from ord in dc.GetTable <tblLengthCost>()
                 where ord.MaterialID == materialID
                 select ord).SingleOrDefault <tblLengthCost>());
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Return single Record
 /// </summary>
 /// <param name="frameType"></param>
 /// <param name="materialID"></param>
 /// <returns></returns>
 public static tblAtlanticCanvasLength GetAtlanticLength(int frameType, String materialID)
 {
     using (LinqtoNewAgeDataContext dc = new LinqtoNewAgeDataContext())
     {
         return((from ord in dc.GetTable <tblAtlanticCanvasLength>()
                 join m in dc.tblMaterials
                 on ord.MaterialID equals m.MaterialID
                 where ord.FrameID == frameType && ord.MaterialID == materialID
                 select ord).SingleOrDefault <tblAtlanticCanvasLength>());
     }
 }