private void Find_Vendor(object sender, EventArgs e)
 {
     using (VendorListForm frm = new VendorListForm())
     {
         frm.ShowDialog();
         if (frm.vendorSelected != null)
         {
             //_view.vendorName = frm.vendorSelected.VendorName;
             Filter(null, null);
         }
     }
 }
        private void Find_Vendor(object sender, EventArgs e)
        {
            using (VendorListForm frm = new VendorListForm())
            {
                frm.VendorNumber = _view.headSeleted.VendorCode;
                frm.ShowDialog();
                if (frm.vendorSelected != null)
                {
                    POReceiptHeaderModel rcv = _view.headSeleted;
                    rcv.VendorId   = frm.vendorSelected.VendorId;
                    rcv.VendorCode = frm.vendorSelected.VendorNumber;
                    rcv.VendorName = frm.vendorSelected.VendorName;

                    _view.headSeleted = rcv;
                }
            }
        }
 private void Set_Vendor(object sender, EventArgs e)
 {
     using (VendorListForm frm = new VendorListForm())
     {
         frm.ShowDialog();
         if (frm.vendorSelected != null)
         {
             //_view.vendorNum = frm.vendorSelected.VendorNumber;
             MetroGrid grd = sender as MetroGrid;
             if (grd.SelectedRows.Count > 0)
             {
                 DialogResult dialogResult = MessageBox.Show("Are you sure to set this vendor.", "Please confirm.", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                 if (dialogResult == DialogResult.Yes)
                 {
                     foreach (DataGridViewRow dgr in grd.SelectedRows)
                     {
                         //RequisitionLineModel curr = (RequisitionLineModel)_view.bindingLine.Current;
                         RequisitionLineModel curr = (RequisitionLineModel)dgr.DataBoundItem;
                         try
                         {
                             if (!curr.RejectFlag)
                             {
                                 curr.VendorId   = frm.vendorSelected.VendorId;
                                 curr.VendorName = frm.vendorSelected.VendorName;
                                 _repository.UpdatePRLine(curr);
                             }
                         }
                         catch
                         {
                         }
                     }
                     //_view.RefreshLinesGird();
                     Filter(null, null);
                 }
             }
         }
     }
 }