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


C# BrightPlatformEntities.FIClearUserReuests方法代码示例

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


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

示例1: btnPreview_Click

        private void btnPreview_Click(object sender, EventArgs e)
        {
            btnPreview.Enabled = false;
            if (Convert.ToInt32(cboReports.EditValue) < 1) {
                NotificationDialog.Information("Bright Sales", "Please select a report to preview.");
                return;
            }

            WaitDialog.Show("Sending web service request ...");
            List<int> _SubCampaignIds = new List<int>();
            _SubCampaignIds.Add(m_BrightSalesProperty.CommonProperty.SubCampaignId);

            using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
                _efDbContext.FIClearUserReuests(UserSession.CurrentUser.UserId);
                Guid _RequestId = Guid.NewGuid();
                serverside_report_requests _eftRequest = new serverside_report_requests() {
                    id = _RequestId,
                    calling_environment = (short)ReportsUtility.eCallingEnvironment.BrightSales_SendEmail,
                    display_mode = (short)ReportsUtility.eDisplayMode.AccountsContacts_WithDialogData,
                    campaign_info = string.Format("{0}>{1}>{2}",
                        m_BrightSalesProperty.CommonProperty.CustomerName,
                        m_BrightSalesProperty.CommonProperty.CampaignName,
                        m_BrightSalesProperty.CommonProperty.SubCampaignName
                    ),
                    sub_campaign_ids = string.Join(",", _SubCampaignIds),
                    view_config_id = Convert.ToInt32(cboReports.EditValue),
                    account_id = m_BrightSalesProperty.CommonProperty.CurrentWorkedAccountId,
                    requested_by = UserSession.CurrentUser.UserId,
                    requested_on = DateTime.Now
                };
                _efDbContext.serverside_report_requests.AddObject(_eftRequest);
                _efDbContext.SaveChanges();
                _efDbContext.Detach(_eftRequest);
                ReportsUtility.SendReportRequest(_RequestId.ToString());
            }
            WaitDialog.Close();
            System.Threading.Thread.Sleep(2000);
            btnPreview.Enabled = true;

            //if (Convert.ToInt32(cboReports.EditValue) < 1) {
            //    NotificationDialog.Information("Bright Sales", "Please select a report to preview.");
            //    return;
            //}

            //m_SendEmailButtonPressed = false;
            //this.Cursor = Cursors.WaitCursor;
            //WaitDialog.Show("Loading report preview ...");
            //m_Reports = new ReportsUtility() {
            //    CampaignInfo = string.Format("{0}>{1}>{2}",
            //        m_BrightSalesProperty.CommonProperty.CustomerName,
            //        m_BrightSalesProperty.CommonProperty.CampaignName,
            //        m_BrightSalesProperty.CommonProperty.SubCampaignName
            //    ),
            //    LSubCampaignData = new List<ReportsUtility.SubcampaignData>(),
            //    CallingEnvironment = ReportsUtility.eCallingEnvironment.BrightSales_SendEmail,
            //    DisplayMode = ReportsUtility.eDisplayMode.AccountsContacts_WithDialogData,
            //    AccountId = m_BrightSalesProperty.CommonProperty.CurrentWorkedAccountId
            //};
            //List<int> _SubCampaignIds = new List<int>();
            //_SubCampaignIds.Add(m_BrightSalesProperty.CommonProperty.SubCampaignId);
            //m_Reports.OnReportPageCompleted += m_Reports_OnReportPageCompleted;
            //DevExpress.XtraTab.XtraTabControl _DummyTab = new DevExpress.XtraTab.XtraTabControl();
            //m_Reports.GenerateReportPages(ref _DummyTab, _SubCampaignIds.ToArray(), Convert.ToInt32(cboReports.EditValue));
        }
开发者ID:,项目名称:,代码行数:64,代码来源:

示例2: btnShowReport_Click

            private void btnShowReport_Click(object sender, EventArgs e)
            {
                WaitDialog.Show("Sending web service request ...");
                List<int> _SubCampaignIds = new List<int>();
                _SubCampaignIds.Add(m_SubCampaignId);

                using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
                    _efDbContext.FIClearUserReuests(UserSession.CurrentUser.UserId);
                    m_eftConfigData = _efDbContext.view_configuration.FirstOrDefault(i => i.id == m_ViewConfigId);
                    m_eftSubCampaign = _efDbContext.subcampaigns.FirstOrDefault(i => i.id == m_eftConfigData.subcampaign_id);
                    m_eftCampaign = _efDbContext.campaigns.FirstOrDefault(i => i.id == m_eftSubCampaign.campaign_id);
                    m_eftCustomer = _efDbContext.customers.FirstOrDefault(i => i.id == m_eftCampaign.customer_id);

                    _efDbContext.Detach(m_eftConfigData);
                    _efDbContext.Detach(m_eftSubCampaign);
                    _efDbContext.Detach(m_eftCampaign);
                    _efDbContext.Detach(m_eftCustomer);

                    Guid _RequestId = Guid.NewGuid();
                    string _GridSortInfo = this.GetSerializedSortInfo(gridView1.SortInfo);
                    string _ColumnsInfo = this.GetSerializedColumnsInfo();

                    serverside_report_requests _eftRequest = new serverside_report_requests() {
                        id = _RequestId,
                        calling_environment = (short)m_CallingEnvironment,
                        display_mode = (short)m_ViewType,
                        //calling_environment = (short)ReportsUtility.eCallingEnvironment.BrightSales_ViewDisplay,
                        //display_mode = (short)ReportsUtility.eDisplayMode.AccountsContacts_WithDialogData,
                        campaign_info = string.Format("{0}>{1}>{2}",
                            m_eftCustomer.customer_name,
                            m_eftCampaign.campaign_name,
                            m_eftSubCampaign.title
                        ),
                        sub_campaign_ids = string.Join(",", _SubCampaignIds),
                        view_config_id = m_ViewConfigId,
                        account_id = 0,
                        active_filter_string = gridView1.ActiveFilterString,
                        sort_info = _GridSortInfo,
                        columns_info = _ColumnsInfo,
                        requested_by = UserSession.CurrentUser.UserId,
                        requested_on = DateTime.Now
                    };
                    _efDbContext.serverside_report_requests.AddObject(_eftRequest);
                    _efDbContext.SaveChanges();
                    _efDbContext.Detach(_eftRequest);
                    ReportsUtility.SendReportRequest(_RequestId.ToString());
                }
                WaitDialog.Close();

                //WaitDialog.Show("Sending web service request ...");
                //using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
                //    serverside_report_requests _eftRequest = new serverside_report_requests() {
                //        calling_environment = (short)ReportsUtility.eCallingEnvironment.BrightSales_ViewDisplay,
                //        display_mode = (short)ReportsUtility.eDisplayMode.AccountsContacts_WithDialogData,
                //        campaign_info = m_CampaignInfo,
                //        //sub_campaign_ids = string.Join(",", pSubCampaignIds),
                //        view_config_id = m_ViewConfigId,
                //        account_id = 0,
                //        requested_by = UserSession.CurrentUser.UserId,
                //        requested_on = DateTime.Now
                //    };
                //    _efDbContext.serverside_report_requests.AddObject(_eftRequest);
                //    string _RequestId = _eftRequest.id.ToString();
                //    _efDbContext.Detach(_eftRequest);
                //    this.SendReportRequest(_RequestId);
                //}
                //WaitDialog.Close();

                //WaitDialog.Show("Loading report preview ...");
                //this.ReportPagePreview();
                //WaitDialog.Close();
            }
开发者ID:,项目名称:,代码行数:72,代码来源:


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