private void AddOrUpdate(Model.Po PO, CRUD flag) { if (flag == CRUD.Insert) { gridUtility.AddNewRow <Po>(PO); } else { gridUtility.UpdateRow <Po>(PO); } }
private void gridView1_DoubleClick(object sender, EventArgs e) { IList <Model.Product> lstProduct; Model.Po po = gridUtility.GetSelectedItem <Model.Po>() as Model.Po; if (po == null) { return; } po.Quotation = new Model.Quotation(); po.Quotation.QuotationCode = po.QuotationCode; using (IUnitOfWork uow = new UnitOfWork()) { lstProduct = uow.PoRepository.GetAllProduct(po.Quotation); uow.Commit(); } if (GetAllProduct != null) { GetAllProduct(po, lstProduct); } Close(); }