当前位置: 首页>>代码示例>>C#>>正文


C# BrightPlatformEntities.FIGetImportLists方法代码示例

本文整理汇总了C#中BrightPlatformEntities.FIGetImportLists方法的典型用法代码示例。如果您正苦于以下问题:C# BrightPlatformEntities.FIGetImportLists方法的具体用法?C# BrightPlatformEntities.FIGetImportLists怎么用?C# BrightPlatformEntities.FIGetImportLists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BrightPlatformEntities的用法示例。


在下文中一共展示了BrightPlatformEntities.FIGetImportLists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetImportLists

        /// <summary>
        /// Get import files
        /// </summary>
        public static List<CTImportList> GetImportLists()
        {
            List<CTImportList> _items = null;
            using (BrightPlatformEntities _objBrightPlatformEntity = new BrightPlatformEntities(UserSession.EntityConnection)) {
                _objBrightPlatformEntity.CommandTimeout = 0;
                _items = _objBrightPlatformEntity.FIGetImportLists().ToList();
            }

            return _items;
            //m_objBrightPlatformEntity.CommandTimeout = 0;
            //var objImportLists =
            //    from objImportList in m_objBrightPlatformEntity.imported_files
            //    join objCustomer in m_objBrightPlatformEntity.customers on objImportList.customer_id equals objCustomer.id
            //    join objUser in m_objBrightPlatformEntity.users on objImportList.created_by equals objUser.id
            //    join objCampaign in m_objBrightPlatformEntity.campaigns on objImportList.campaign_id equals objCampaign.id
            //    join objTCountry in m_objBrightPlatformEntity.countries on objImportList.country_id equals objTCountry.id into objTCountry
            //    from objCountry in objTCountry.DefaultIfEmpty()
            //    orderby objImportList.active descending, objImportList.id descending
            //    select new ImportListInstance
            //    {
            //        id = objImportList.id,
            //        active = (objImportList.active == null? false: (bool) objImportList.active),
            //        profiled = (objImportList.profiled == null? false: (bool) objImportList.profiled),
            //        matched_by_account = (objImportList.matched_by_account == null? false: (bool) objImportList.matched_by_account),
            //        matched_by_contact = (objImportList.matched_by_contact == null? false: (bool) objImportList.matched_by_contact),
            //        improved_master_data = (objImportList.improved_master_data == null? false: (bool) objImportList.improved_master_data),
            //        country = "",
            //        import_list_name = objImportList.list_name,
            //        date_and_time = (DateTime) objImportList.created_date,
            //        customer_name = objCustomer.customer_name,
            //        imported_by = objUser.fullname,
            //        customer_id = objCustomer.id,
            //        campaign_id = objImportList.campaign_id,
            //        campaign_name = objCampaign.campaign_name,
            //        country_id = objImportList.country_id == null? 0: (int) objImportList.country_id,
            //        country_name = objCountry.name,
            //        source_file_name = objImportList.source_file_name
            //    };

            ////m_objBrightPlatformEntity.Connection.Close();
            //return objImportLists.ToList();
        }
开发者ID:,项目名称:,代码行数:45,代码来源:

示例2: PopulateImportListView

        public void PopulateImportListView(int ImportFileId = 0)
        {
            if (Convert.ToInt32(tbxMaxRow.Text) < 1) {
                NotificationDialog.Warning("Bright Sales", "Invalid max row setting.");
                return;
            }

            try {
                if (ImportFileId > 0)
                    m_SelectedImportFileId = ImportFileId;

                m_IsLoading = true;
                lblImportFileTotalRecords.Text = "Total Records: 0";
                using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection) { CommandTimeout = 0 }) {
                    gcImportRecord.BeginUpdate();
                    gcImportFile.BeginUpdate();
                    gcImportRecord.DataSource = null;
                    gcImportFile.DataSource = null;
                    gcImportFile.DataSource = _efDbContext.FIGetImportLists(Convert.ToInt32(tbxMaxRow.Text)).ToList();
                    gvImportFile.BestFitColumns();
                    gcImportRecord.EndUpdate();
                    gcImportFile.EndUpdate();
                }

                //gcImportFile.DataSource = DataImportUtility.GetImportLists();
                //lblImportFileTotalRecords.Text = "Total Records: " + gvImportFile.RowCount.ToString();
                //gvImportFile.BestFitColumns();
                this.SetDefaultSelectedRow();
                m_IsLoading = false;
            }
            catch (Exception ex) {
                MessageBox.Show("Error: " + ex.InnerException.Message, "Bright Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:,项目名称:,代码行数:34,代码来源:


注:本文中的BrightPlatformEntities.FIGetImportLists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。