Esempio n. 1
0
        protected override DataTable GetData()
        {
            var dt = FileTypeDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile, SessionVariables.ApplicationMode);

            return(dt);
        }
Esempio n. 2
0
        private void SetupDropdown()
        {
            var isTesting = SessionVariables.IsTesting;

            var fileTypeData = FileTypeDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(fileTypeData, drpFileTypeList, StandardDataModel.StandardDataColumns.Name, FileTypeDataModel.DataColumns.FileTypeId);

            var batchFileSetData = Framework.Components.Import.BatchFileSetDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(batchFileSetData, drpBatchFileSetList, StandardDataModel.StandardDataColumns.Name, BatchFileSetDataModel.DataColumns.BatchFileSetId);

            var batchFileStatusData = Framework.Components.Import.BatchFileStatusDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(batchFileStatusData, drpBatchFileStatusList, StandardDataModel.StandardDataColumns.Name, BatchFileStatusDataModel.DataColumns.BatchFileStatusId);

            var systemEntityTypeData = Framework.Components.Core.SystemEntityTypeDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(systemEntityTypeData, drpSystemEntityTypeList, SystemEntityTypeDataModel.DataColumns.EntityName, SystemEntityTypeDataModel.DataColumns.SystemEntityTypeId);

            if (isTesting)
            {
                drpSystemEntityTypeList.AutoPostBack = true;
                drpBatchFileSetList.AutoPostBack     = true;
                drpBatchFileStatusList.AutoPostBack  = true;
                drpFileTypeList.AutoPostBack         = true;
                if (drpSystemEntityTypeList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtSystemEntityTypeId.Text.Trim()))
                    {
                        drpSystemEntityTypeList.SelectedValue = txtSystemEntityTypeId.Text;
                    }
                    else
                    {
                        txtSystemEntityTypeId.Text = drpSystemEntityTypeList.SelectedItem.Value;
                    }
                }
                if (drpFileTypeList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtFileTypeId.Text.Trim()))
                    {
                        drpFileTypeList.SelectedValue = txtFileTypeId.Text;
                    }
                    else
                    {
                        txtFileTypeId.Text = drpFileTypeList.SelectedItem.Value;
                    }
                }
                if (drpBatchFileSetList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtBatchFileSetId.Text.Trim()))
                    {
                        drpBatchFileSetList.SelectedValue = txtBatchFileSetId.Text;
                    }
                    else
                    {
                        txtBatchFileSetId.Text = drpBatchFileSetList.SelectedItem.Value;
                    }
                }
                if (drpBatchFileStatusList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtBatchFileStatusId.Text.Trim()))
                    {
                        drpBatchFileStatusList.SelectedValue = txtBatchFileStatusId.Text;
                    }
                    else
                    {
                        txtBatchFileStatusId.Text = drpBatchFileStatusList.SelectedItem.Value;
                    }
                }
                txtSystemEntityTypeId.Visible = true;
                txtFileTypeId.Visible         = true;
                txtBatchFileSetId.Visible     = true;
                txtBatchFileStatusId.Visible  = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtSystemEntityTypeId.Text.Trim()))
                {
                    drpSystemEntityTypeList.SelectedValue = txtSystemEntityTypeId.Text;
                }
                if (!string.IsNullOrEmpty(txtFileTypeId.Text.Trim()))
                {
                    drpFileTypeList.SelectedValue = txtFileTypeId.Text;
                }
                if (!string.IsNullOrEmpty(txtBatchFileSetId.Text.Trim()))
                {
                    drpBatchFileSetList.SelectedValue = txtBatchFileSetId.Text;
                }
                if (!string.IsNullOrEmpty(txtBatchFileStatusId.Text.Trim()))
                {
                    drpBatchFileStatusList.SelectedValue = txtBatchFileStatusId.Text;
                }
            }
        }