示例#1
0
 /// <summary>
 /// 添加新的报价单产品明细
 /// </summary>
 /// <param name="qtprice"></param>
 public bool AddNewQtPrice(QtProduct qtprice)
 {
     using (MEMSContext db = new MEMSContext())
     {
         db.Entry <T_quotationprice>(qtprice.qp).State = EntityState.Added;
         return(db.SaveChanges() > 0 ? true : false);
     }
 }
示例#2
0
 public bool AddNewQtPrice(QtProduct qtprice)
 {
     try
     {
         ph = new ProductHelper();
         return(ph.AddNewQtPrice(qtprice));
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#3
0
 private void AddProduct2Qt(List <T_Product> products)
 {
     try
     {
         m_QtProductlst.Clear();
         foreach (var p in products)
         {
             QtProduct qtproduct = new QtProduct();
             qtproduct.qp           = new T_quotationprice();
             qtproduct.qp.productid = p.id;
             qtproduct.productCode  = p.procode;
             qtproduct.productName  = p.proname;
             qtproduct.productSpec  = p.prospecification;
             m_QtProductlst.Add(qtproduct);
         }
         gcQtprice.RefreshDataSource();
     }
     catch (Exception)
     {
         throw;
     }
 }