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


C# System.Collections.ObjectModel.ObservableCollection.Count方法代码示例

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


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

示例1: LoadData

        private void LoadData()
        {
            int pageCount = 0;
            string filter = "";
            System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();

            //filter += "[email protected]" + paras.Count().ToString();
            //paras.Add(Convert.ToInt32(CheckStates.Approved).ToString());

            TextBox txtEmpName = Utility.FindChildControl<TextBox>(expander, "txtEmpName");
            if (!string.IsNullOrEmpty(txtEmpName.Text))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "[email protected]" + paras.Count().ToString();
                paras.Add(txtEmpName.Text.Trim());
            }
            //LoginUserInfo info = new LoginUserInfo();
            //info.companyID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            //info.userID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
            //client.GetWelfarePaymentDetailsInfosAsync(dataPager.PageIndex, dataPager.PageSize, "welfareDetailsViews.CREATEDATE", filter, new object[]{},
            //    pageCount, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
        }
开发者ID:JuRogn,项目名称:OA,代码行数:25,代码来源:WelfarePaymentDetails.xaml.cs

示例2: PlayAlbum

 private void PlayAlbum()
 {
     var tracks = new System.Collections.ObjectModel.ObservableCollection<Track>(this.Album.Tracks);
     if (tracks != null && tracks.Count() > 0)
     {
         this.PlayTracks(tracks);
     }
 }
开发者ID:uwe-e,项目名称:BSE.Tunes,代码行数:8,代码来源:AlbumDetailPageViewModel.cs

示例3: btnExport_Click

        private void btnExport_Click(object sender, RoutedEventArgs e)
        {
           // ispaging = false;
            dialog.Filter = "MS csv Files|*.csv";
            dialog.FilterIndex = 1;
            result = dialog.ShowDialog();
            if (result.Value == true)
            {
                loadbar.Start();
                int pageCount = 0;
                string filter = "";
                System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();

                if (sType == "Company")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                if (sType == "Department")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                if (sType == "Post")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                personClient.ExportEmployeesIntimeAsync(dataPager.PageIndex, dataPager.PageSize, "DepartmentName",
                    filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            }

        }
开发者ID:JuRogn,项目名称:OA,代码行数:33,代码来源:EmployeeInfoRealTime.xaml.cs

示例4: LoadData

        void LoadData()
        {
            loadbar.Start();
            int pageCount = 0;
            string filter = "";
            System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();

            if (sType == "Company")
            {
                filter += " [email protected]" + paras.Count().ToString();
                paras.Add(sValue);
            }
            if (sType == "Department")
            {
                filter += " [email protected]" + paras.Count().ToString();
                paras.Add(sValue);
            }
            if (sType == "Post")
            {
                filter += " [email protected]" + paras.Count().ToString();
                paras.Add(sValue);
            }

            //personClient.GetEmployeesIntimeAsync(dataPager.PageIndex, dataPager.PageSize, "EMPLOYEECNAME",
            //   filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            personClient.GetEmployeesIntimeAsync(dataPager.PageIndex, dataPager.PageSize, "DepartmentName",
                filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
        }
开发者ID:JuRogn,项目名称:OA,代码行数:28,代码来源:EmployeeInfoRealTime.xaml.cs

示例5: btnExport_Click

        private void btnExport_Click(object sender, RoutedEventArgs e)
        {
            // ispaging = false;
            dialog.Filter = "MS csv Files|*.xls";
            dialog.FilterIndex = 1;
            result = dialog.ShowDialog();
            if (result.Value == true)
            {

                
                string filter = "";
                System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();

                if (sType == "Company")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                if (sType == "Department")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                if (sType == "Post")
                {
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }
                if (string.IsNullOrEmpty(sType))
                {
                    sType = "Company";
                    sValue = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(sValue);
                }

                

                loadbar.Start();
                
            }

        }
开发者ID:JuRogn,项目名称:OA,代码行数:43,代码来源:ReportInfos.xaml.cs

示例6: client_GetEmployeeAddSumBatchByIDCompleted

        void client_GetEmployeeAddSumBatchByIDCompleted(object sender, GetEmployeeAddSumBatchByIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                EmployeeAddSumBatch = new T_HR_EMPLOYEEADDSUMBATCH();
                if (e.Result != null)
                {
                    EmployeeAddSumBatch = e.Result as T_HR_EMPLOYEEADDSUMBATCH;
                    txtBalanceYear.Text = EmployeeAddSumBatch.BALANCEYEAR.ToString();
                    nudBalanceMonth.Value = Convert.ToDouble(EmployeeAddSumBatch.BALANCEMONTH.ToString());
                    CheckState = EmployeeAddSumBatch.CHECKSTATE;
                    cbxkAssignedObjectType.SelectedIndex = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectType = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectValue = EmployeeAddSumBatch.BALANCEOBJECTID;
                    BindAssignObjectLookup();

                    string filter = "";
                    int pageCount = 0;
                    DateTime? starttimes = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), 1);
                    DateTime? endtimes = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), DateTime.DaysInMonth(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH)));
                    System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>();

                    filter += " [email protected]" + paras.Count().ToString();
                    paras.Add(EmployeeAddSumBatch.MONTHLYBATCHID);

                    client.GetEmployeeAddSumAuditPagingAsync(dataPager.PageIndex, dataPager.PageSize, "ADDSUMID", filter, paras, pageCount, Convert.ToDateTime(starttimes), Convert.ToDateTime(endtimes), userID, EmployeeAddSumBatch.CHECKSTATE, Convert.ToInt32(EmployeeAddSumBatch.BALANCEOBJECTTYPE), EmployeeAddSumBatch.BALANCEOBJECTID);
                    this.DataContext = EmployeeAddSumBatch;
                    RefreshUI(RefreshedTypes.AuditInfo);
                    SetToolBar();
                }

            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }
开发者ID:JuRogn,项目名称:OA,代码行数:38,代码来源:EmployeeAddSumMassAudit.xaml.cs


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