Exemple #1
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.LocationMaster)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtLeaseReference.Text      = criteria.StringOption1;
                        txtLine.Text                = criteria.LineName;
                        txtLocation.Text            = criteria.Location;
                        gvwLeaseReference.PageIndex = criteria.PageIndex;
                        gvwLeaseReference.PageSize  = criteria.PageSize;
                        ddlPaging.SelectedValue     = criteria.PageSize.ToString();
                        isCriteriaExists            = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.AssignCustomer)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        gvwList.PageIndex       = criteria.PageIndex;
                        gvwList.PageSize        = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #3
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.CustomerMaster)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtCustName.Text        = criteria.CustomerName;
                        txtGrComp.Text          = criteria.GroupName;
                        txtLoc.Text             = criteria.LocAbbr;
                        txtExec.Text            = criteria.ExecutiveName;
                        gvwCust.PageIndex       = criteria.PageIndex;
                        gvwCust.PageSize        = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.Booking)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtSettlementNo.Text       = criteria.BookingNo;
                        txtEdgeBLNo.Text           = criteria.BLNo;
                        txtLine.Text               = criteria.LineName;
                        txtLocation.Text           = criteria.LocName;
                        gvwContainerTran.PageIndex = criteria.PageIndex;
                        gvwContainerTran.PageSize  = criteria.PageSize;
                        ddlPaging.SelectedValue    = criteria.PageSize.ToString();
                        isCriteriaExists           = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #5
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.ImportBL)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        //txtContainerNo.Text = criteria.ContainerNo;
                        txtCustomer.Text           = criteria.Customer;
                        txtJobNo.Text              = criteria.JobNo;
                        ddlJobStatus.SelectedValue = criteria.JobType;
                        //txtJobType.Text = criteria.JobType;
                        txtOpControl.Text = criteria.OperationalControl;
                        txtLine.Text      = criteria.LineName;

                        gvImportBL.PageIndex    = criteria.PageIndex;
                        gvImportBL.PageSize     = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }

                    if (_userLocation != 0)
                    {
                        criteria.Location = new BookingBLL().GetLocation(_userId);
                    }
                    else
                    {
                        criteria.Location = txtOpControl.Text.Trim();
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.SlotMaster)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtSlotOperator.Text  = criteria.SlotOperatorName;
                        ddlLine.SelectedValue = criteria.LineName;
                        txtPOD.Text           = criteria.POD;
                        txtPOL.Text           = criteria.POL;
                        //ddlChargeType.SelectedIndex = ddlChargeType.Items.IndexOf(ddlChargeType.Items.FindByValue(criteria.ChargeType.ToString()));

                        //if (criteria.Date.HasValue)
                        //    txtEfectDate.Text = criteria.Date.Value.ToString("dd/MM/yyyy");
                        //ddlLocation.SelectedValue = criteria.Location;


                        gvwCharge.PageIndex     = criteria.PageIndex;
                        gvwCharge.PageSize      = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.ImportBL)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        //txtContainerNo.Text = criteria.ContainerNo;
                        txtIGMBLNo.Text         = criteria.IGMBLNo;
                        txtLineBLNo.Text        = criteria.LineBLNo;
                        txtPOD.Text             = criteria.POD;
                        txtPOL.Text             = criteria.POL;
                        txtVessel.Text          = criteria.Vessel;
                        txtVoyageNo.Text        = criteria.Voyage;
                        txtSLocation.Text       = criteria.Location;
                        txtSLine.Text           = criteria.LineName;
                        ddlStatus.SelectedIndex = criteria.IntegerOption1;

                        gvImportBL.PageIndex    = criteria.PageIndex;
                        gvImportBL.PageSize     = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.ExportBL)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtBookingNo.Text       = criteria.BookingNo;
                        txtEdgeBLNo.Text        = criteria.EdgeBLNumber;
                        txtRefBLNo.Text         = criteria.RefBLNumber;
                        txtPOL.Text             = criteria.POL;
                        txtLine.Text            = criteria.LineName;
                        txtLocation.Text        = criteria.Location;
                        ddlStatus.SelectedIndex = criteria.IntegerOption1;

                        gvExportBL.PageIndex    = criteria.PageIndex;
                        gvExportBL.PageSize     = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #9
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.Booking)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtBookingNo.Text       = criteria.BookingNo;
                        txtLine.Text            = criteria.LineName;
                        txtBookingRef.Text      = criteria.StringOption1;
                        txtCustomer.Text        = criteria.StringOption2;
                        txtLocation.Text        = criteria.Location;
                        txtVoyage.Text          = criteria.Voyage;
                        txtVessel.Text          = criteria.Vessel;
                        gvBooking.PageIndex     = criteria.PageIndex;
                        gvBooking.PageSize      = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        ddlStatus.SelectedIndex = criteria.IntegerOption1;
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #10
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.Invoice)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        //txtContainerNo.Text = criteria.ContainerNo;
                        txtInvoiceNo.Text = criteria.InvoiceNo;
                        txtBLNo.Text      = criteria.BLNo;
                        txtBookingNo.Text = criteria.BookingNo;
                        txtImpExp.Text    = criteria.ImportExport;

                        gvInvoice.PageIndex     = criteria.PageIndex;
                        gvInvoice.PageSize      = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #11
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.DeliveryOrder)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        txtBookingNo.Text       = criteria.BookingNo;
                        txtDONo.Text            = criteria.DONumber;
                        txtLine.Text            = criteria.LineName;
                        txtLocation.Text        = criteria.Location;
                        txtBookingRef.Text      = criteria.BookingRef;
                        gvwList.PageIndex       = criteria.PageIndex;
                        gvwList.PageSize        = criteria.PageSize;
                        ddlPaging.SelectedValue = criteria.PageSize.ToString();
                        isCriteriaExists        = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #12
0
        private void RetrieveSearchCriteria()
        {
            bool isCriteriaExists = false;

            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria criteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(criteria, null))
                {
                    if (criteria.CurrentPage != PageName.UserMaster)
                    {
                        criteria.Clear();
                        SetDefaultSearchCriteria(criteria);
                    }
                    else
                    {
                        this.txtInvoiceNo.Text    = criteria.StringOption1;
                        this.txtBLNo.Text         = criteria.StringOption2;
                        this.txtMoneyReceipt.Text = criteria.StringOption3;
                        this.drpDwnExportImport.SelectedItem.Text = criteria.IntegerOption1.ToString();

                        gvwMoneyReceipts.PageIndex = criteria.PageIndex;
                        gvwMoneyReceipts.PageSize  = criteria.PageSize;
                        ddlPaging.SelectedValue    = criteria.PageSize.ToString();
                        isCriteriaExists           = true;
                    }
                }
            }

            if (!isCriteriaExists)
            {
                SearchCriteria newcriteria = new SearchCriteria();
                SetDefaultSearchCriteria(newcriteria);
            }
        }
Exemple #13
0
		public override void OnResponse( GameClient sender, RelayInfo info )
		{
			if ( info.ButtonID != 0 )
			{
				// Always update name
				m_Criteria.Name = info.GetTextEntry( 1 ).Text;
			}

			switch ( info.ButtonID )
			{
				case 0: // Cancel
					{
						break;
					}
				case 1: // Search
					{
						if ( m_Criteria.Count == 0 )
						{
							Resend( 1154586 ); // Please select some criteria to search for.
							break;
						}

						StartSearch( m_Mobile, m_Criteria, 0 );

						break;
					}
				case 2: // Clear search criteria
					{
						m_Criteria.Clear();
						Resend();

						break;
					}
				case 3: // Submit price criteria
					{
						m_Criteria.MinPrice = Utility.ToInt32( info.GetTextEntry( 2 ).Text );
						m_Criteria.MaxPrice = Utility.ToInt32( info.GetTextEntry( 3 ).Text );
						Resend();

						break;
					}
				case 4: // Reset Item Name
					{
						m_Criteria.Name = "";
						Resend();

						break;
					}
				case 5: // Reset Item Price
					{
						m_Criteria.MinPrice = SearchCriteria.DefaultMinPrice;
						m_Criteria.MaxPrice = SearchCriteria.DefaultMaxPrice;
						Resend();

						break;
					}
				default:
					{
						if ( info.ButtonID < 100 )
						{
							int criterionIdx = ( info.ButtonID - 50 );

							if ( criterionIdx >= 0 && criterionIdx < m_SelectedCriteria.Length )
							{
								SearchCriterion criterion = m_SelectedCriteria[criterionIdx];
								m_Criteria.Remove( criterion );
							}
						}
						else
						{
							if ( m_Criteria.Count >= SearchCriteria.MaxCount )
							{
								Resend( 1154681 ); // You may not add any more search criteria items.
								break;
							}

							int categoryIdx = ( info.ButtonID / 100 ) - 1;
							int criterionIdx = ( info.ButtonID % 100 );

							var categories = SearchCriteriaCategory.AllCategories;

							if ( categoryIdx >= 0 && categoryIdx < categories.Length )
							{
								SearchCriteriaCategory category = categories[categoryIdx];

								if ( criterionIdx >= 0 && criterionIdx < category.Criteria.Length )
								{
									SearchCriterionEntry entry = category.Criteria[criterionIdx];

									SearchCriterion sc = entry.Criterion.Clone();

									if ( sc is ValuedSearchCriterion )
										( (ValuedSearchCriterion) sc ).Value = Utility.ToInt32( info.GetTextEntry( info.ButtonID ).Text );

									m_Criteria.Add( sc );
								}
							}
						}

						Resend();

						break;
					}
			}
		}
Exemple #14
0
 public void Clear()
 {
     SearchCriteria.Clear();
     SelectEntities();
 }
Exemple #15
0
 public void Clear()
 {
     SearchCriteria?.Clear();
     ApplySearchCriteria();
 }
Exemple #16
0
 private void DoClear(object parametr)
 {
     SearchCriteria.Clear();
     LoadData(LoadingType.ChangedSearchCriteria);
 }