Exemplo n.º 1
0
 public AddNewVendorFrm(UniEnums.VendorType vendorType)
 {
     InitializeComponent();
     _vendor = new VendorDetail() { VendorType = vendorType.ToString(), ProcessedDate = DateTime.Now.Date };
     _isNewRecord = true;
     _vendorType = vendorType;
 }
Exemplo n.º 2
0
        public VendorDetailsFrm(UniEnums.VendorType vendorType)
        {
            InitializeComponent();

            _vendorType = vendorType;
            _reportForm = new ReportForm<VendorDetail>(bindingNavigator1, dataGridView1,
                                                      bindingNavigatorPositionItem.TextBox, lblReportStatus);
        }
Exemplo n.º 3
0
        public AddNewVendorFrm(long srNo, UniEnums.VendorType vendorType)
        {
            InitializeComponent();

            _vendorType = vendorType;
            _vendor = _uniDb.VendorDetails.Single(x => x.SrNo == srNo
                                                       && x.VendorType == vendorType.ToString());
            _isNewRecord = false;
        }
Exemplo n.º 4
0
        private IQueryable<VendorDetail> GetFiterQuery()
        {
            if (_vendorType != UniEnums.VendorType.VisitingCard)
                _vendorType = (UniEnums.VendorType)Enum.Parse(typeof(UniEnums.VendorType), cbType.Text);

            return _reportForm.UniDb.VendorDetails
                              .Where(x => x.VendorType == _vendorType.ToString()
                                          && x.CompanyName.Contains(txtCompanyName.Text)
                                          && x.ContactPerson.Contains(txtContactPerson.Text)
                                          && x.MobileNo.Contains(txtMobileNo.Text)
                                          && x.BusinessType.Contains(cmbBusinessType.Text)
                                          && x.Sector.Contains(cmbSector.Text)
                                          && x.Expert.Contains(cmbExpert.Text)
                                          && x.OfficeAddress.Contains(txtLocation.Text)
                                          && (!cbNetworking.Checked || x.Networking == cbNetworking.Checked)
                                          && !x.IsDeleted
                                          && (!cbSearchByDate.Checked
                                              || (x.ProcessedDate.Date >= dtpDateFrom.Value.Date
                                                  && x.ProcessedDate.Date <= dtpDateTo.Value.Date)));
        }