private void LoadData()
        {
            ImportHaulageEntity oImportHaulage = (ImportHaulageEntity)ImportHaulageBLL.GetImportHaulage(Convert.ToInt32(hdnHaulageChrgID.Value));

            //ddlFromLocation.SelectedIndex = Convert.ToInt32(ddlFromLocation.Items.IndexOf(ddlFromLocation.Items.FindByValue(oImportHaulage.LocationFrom)));
            hdnFromLocation.Value = oImportHaulage.LocationFrom.Substring(oImportHaulage.LocationFrom.IndexOf('|') + 1);
            txtFromLocation.Text  = oImportHaulage.LocationFrom.Substring(0, oImportHaulage.LocationFrom.IndexOf('|'));
            //ddlToLocation.SelectedIndex = Convert.ToInt32(ddlToLocation.Items.IndexOf(ddlToLocation.Items.FindByValue(oImportHaulage.LocationTo)));

            hdnToLocation.Value   = oImportHaulage.LocationTo.Substring(oImportHaulage.LocationTo.IndexOf('|') + 1);
            txtToLocation.Text    = oImportHaulage.LocationTo.Substring(0, oImportHaulage.LocationTo.IndexOf('|'));
            ddlLine.SelectedValue = oImportHaulage.LinerID.ToString();

            ddlContainerSize.SelectedIndex = Convert.ToInt32(ddlContainerSize.Items.IndexOf(ddlContainerSize.Items.FindByText(oImportHaulage.ContainerSize)));


            txtWFrom.Text = Convert.ToString(oImportHaulage.WeightFrom);
            txtWTo.Text   = Convert.ToString(oImportHaulage.WeightTo);
            txtRate.Text  = Convert.ToString(oImportHaulage.HaulageRate);

            if (oImportHaulage.EffectDate >= Convert.ToDateTime("01/01/1950"))
            {
                txtEffectDate.Text = oImportHaulage.EffectDate.ToString("dd/MM/yyyy");
            }
        }
예제 #2
0
        private void LoadImportHaulage()
        {
            if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null))
            {
                SearchCriteria searchCriteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA];

                if (!ReferenceEquals(searchCriteria, null))
                {
                    BuildSearchCriteria(searchCriteria);
                    CommonBLL commonBll = new CommonBLL();

                    gvwImportHaulage.PageIndex = searchCriteria.PageIndex;
                    if (searchCriteria.PageSize > 0)
                    {
                        gvwImportHaulage.PageSize = searchCriteria.PageSize;
                    }

                    gvwImportHaulage.DataSource = ImportHaulageBLL.GetImportHaulage(searchCriteria, 0);
                    gvwImportHaulage.DataBind();
                }
            }
        }