• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.LinqDataSourceSelectEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.WebControls.LinqDataSourceSelectEventArgs的典型用法代码示例。如果您正苦于以下问题:C# LinqDataSourceSelectEventArgs类的具体用法?C# LinqDataSourceSelectEventArgs怎么用?C# LinqDataSourceSelectEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LinqDataSourceSelectEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了LinqDataSourceSelectEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LinqDataSourceIn_Selecting

    protected void LinqDataSourceIn_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.vw_PackTrans.Where(r => PackTransactionBLL.InTypeList.Contains(r.Type)
                                                && ucDateRange.FromDate <= r.Date
                                                && r.Date <= ucDateRange.ToDate)
            .ToList()
            .GroupBy(r => new { r.ProductCode, r.ProductDesc }, (r, sub) => new
            {
                r.ProductCode,
                r.ProductDesc,
                Total = sub.Sum(r1 => r1.Count),
                TotalInCollect = sub.Where(r1 => r1.Type == PackTransaction.TypeX.In_Collect)
                                    .Sum(r1 => r1.Count),
                TotalInProduct = sub.Where(r1 => r1.Type == PackTransaction.TypeX.In_Product)
                                    .Sum(r1 => r1.Count),
                TotalInReturn = sub.Where(r1 => r1.Type == PackTransaction.TypeX.In_Return)
                                    .Sum(r1 => r1.Count),
                BloodGroupSumary = sub.GroupBy(r1 => r1.BloodGroup, (r1, BGSub) => new
                {
                    BloodGroupDesc = BloodGroupBLL.GetDescription(r1),
                    Total = BGSub.Sum(r3 => r3.Count)
                }),
                VolumeSumary = sub.GroupBy(r1 => r1.Volume, (r1, VolSub) => new
                {
                    Volume = r1,
                    Total = VolSub.Sum(r3 => r3.Count)
                })
            })
            .OrderBy(r => r.ProductDesc);
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:34,代码来源:TransCount.aspx.cs


示例2: LinqDataSourceEnd_Selecting

    protected void LinqDataSourceEnd_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.vw_PackRemainDailies.Where(r => r.Date == ucDateRange.ToDate)
            .ToList()
            .GroupBy(r => new { r.ProductCode, r.ProductDesc }, (r, sub) => new
            {
                r.ProductCode,
                r.ProductDesc,
                Total = sub.Sum(r1 => r1.Count),
                BloodGroupSumary = sub.GroupBy(r1 => r1.BloodGroup, (r1, BGSub) => new
                {
                    BloodGroupDesc = BloodGroupBLL.GetDescription(r1),
                    Total = BGSub.Sum(r3 => r3.Count)
                }),
                VolumeSumary = sub.GroupBy(r1 => r1.Volume, (r1, VolSub) => new
                {
                    Volume = r1,
                    Total = VolSub.Sum(r3 => r3.Count)
                })
            })
            .OrderBy(r => r.ProductDesc);
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:26,代码来源:TransCount.aspx.cs


示例3: ldsForm_Selecting

    /// <summary>
    /// Fills the grid with all the forms
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ldsForm_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        GRASPEntities db = new GRASPEntities();

        var forms = (from f in db.Form
                    join fr in db.FormResponse on f.id equals fr.parentForm_id into j1
                    from j2 in j1.DefaultIfEmpty()
                    where f.finalised == 1
                    group j2 by new { f.id, f.name, f.FormCreateDate, f.owner, f.permittedGroup_path} into g
                    select new
                    {
                        Name = g.Key.name,
                        CreateDate = g.Key.FormCreateDate,
                        Owner = g.Key.owner,
                        Group = g.Key.permittedGroup_path,
                        Count = g.Count(t=>t.id !=null),
                        Id = g.Key.id
                    }).OrderByDescending(x => x.Id); //Order them by newest.

        e.Result = forms.AsEnumerable().Select(x => new
        {
            Name = x.Name,
            CreateDate = x.CreateDate.Value.ToString("dd MMM yyyy"),
            Owner = x.Owner,
            Group =x.Group,
            Responses = x.Count,
            Id = x.Id
            //Actions = (x.Count>0) ?"<a style=\"color:#0058B1\" href=\"javascript:ImportForm('" + x.Id.ToString() + "','" + x.Name + "');void(0);\"><i class=\"fa fa-upload fa-2\"></i>Import</a>"+
            //" <a style=\"margin-left: 5px;color:#0058B1\" href=\"javascript:ExportSettings('" + x.Id.ToString() + "','" + x.Name + "');void(0);\"><i class=\"fa fa-download fa-2\"></i>Export</a>"+
            //" <a style=\"margin-left: 5px;color:#0058B1\" href=\"javascript:ViewForm('" + x.Id.ToString() + "','" + x.Name + "');void(0);\"><i class=\"fa fa-eye fa-2\"></i>View</a>" : "<a style=\"color:#0058B1\" href=\"javascript:ImportForm('" + x.Id.ToString() + "','" + x.Name + "');void(0);\"><i class=\"fa fa-upload fa-2\"></i>Import</a>"
        });
    }
开发者ID:WFPVAM,项目名称:GRASPReporting,代码行数:37,代码来源:Surveys.aspx.cs


示例4: ldsForm_Selecting

    /// <summary>
    /// Populates the grid with all the forms and their properties
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ldsForm_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        GRASPEntities db = new GRASPEntities();

        var forms = from f in db.Form
                    where f.finalised == 1
                    select new
                    {
                        Name = f.name,
                        CreateDate = f.FormCreateDate,
                        Owner = f.owner,
                        Group = f.permittedGroup_path,
                        Id = f.id
                        //Actions = "<a style=\"color:#0058B1\" href=\"/Admin/Data_Entry/DataEntry.aspx?formID=" + SqlFunctions.StringConvert(f.id).TrimStart() + "\"><i class=\"fa fa-pencil-square-o\"></i> New Data</a>"
                    };

        e.Result = forms.AsEnumerable().Select(x => new
        {
            Name = x.Name,
            CreateDate = x.CreateDate,
            Owner = x.Owner,
            Group = x.Group,
            Actions = "<a style=\"color:#0058B1\" href=\"DataEntryWebForm.aspx?formID=" + x.Id.ToString() + "\"><i class=\"fa fa-pencil-square-o\"></i> New Data</a>"
        });
    }
开发者ID:WFPVAM,项目名称:GRASPReporting,代码行数:30,代码来源:Data_Entry.aspx.cs


示例5: AutoCompleteBoxHNDataSource_Selecting

        protected void AutoCompleteBoxHNDataSource_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = GetData();
              var result = data.Select(c => new { c.HeatNumber }).Distinct();

              e.Result = result;
        }
开发者ID:dennis-vl,项目名称:dennis-vl,代码行数:7,代码来源:DeliveryDetails.aspx.cs


示例6: LinqDataSource1_Selecting

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.vw_ProductCounts.Where(r => r.Status == Pack.StatusX.Product)
            .ToList()
            .GroupBy(r => new { r.ProductCode, r.ProductDesc, r.Status }, (r, sub) => new
            {
                r.ProductCode,
                r.ProductDesc,
                r.Status,
                Total = sub.Sum(r1 => r1.Count),
                TotalExpired = sub.Where(r1 => r1.ExpirationDate.Value.Expired())
                                    .Sum(r1 => r1.Count).ToStringRemoveZero(),
                TotalExpiredInDays = sub.Where(r1 => r1.ExpirationDate.Value.ExpiredInDays(ExpiredInDays))
                                    .Sum(r1 => r1.Count).ToStringRemoveZero(),
                TotalTRNA = sub.Where(r1 => r1.TestResultStatus == Donation.TestResultStatusX.Non)
                                .Sum(r1 => r1.Count).ToStringRemoveZero(),
                TotalTRNeg = sub.Where(r1 => r1.TestResultStatus == Donation.TestResultStatusX.Negative)
                                .Sum(r1 => r1.Count).ToStringRemoveZero(),
                TotalTRPos = sub.Where(r1 => r1.TestResultStatus == Donation.TestResultStatusX.Positive)
                                .Sum(r1 => r1.Count).ToStringRemoveZero(),
                BloodGroupSumary = sub.GroupBy(r1 => r1.BloodGroup, (r1, BGSub) => new
                {
                    BloodGroupDesc = BloodGroupBLL.GetDescription(r1),
                    Total = BGSub.Sum(r3 => r3.Count)
                }),
                VolumeSumary = sub.GroupBy(r1 => r1.Volume, (r1, VolSub) => new
                {
                    Volume = r1.HasValue ? r1.Value.ToString() : "_",
                    Total = VolSub.Sum(r3 => r3.Count)
                })
            })
            .OrderBy(r => r.ProductDesc);
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:35,代码来源:Count.aspx.cs


示例7: LinqDataSource1_Selecting

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        var cCoupons = drvvv.drvvvSettings.GetDataContextInstance().Coupons.Where(x => x.Active && x.EndDate >= DateTime.Now );

        switch (drvvv.drvvvSettings.GetSite())
        {
            case drvvv.Sites.FrancoDeals:
                cCoupons = cCoupons.Where(x => x.TitleFr != null);
                break;
            case drvvv.Sites.ZebraDeals:
                cCoupons = cCoupons.Where(x => x.TitleDefault != null);
                break;
            default:
                cCoupons = cCoupons.Where(x => x.TitleEn != null);
                break;
        }

        int cityID, categoryID;
        //if (!string.IsNullOrEmpty(Request.QueryString["Catgory"]))
        //    cCoupons = cCoupons.Where(x => !x.CategoryID.HasValue || x.Category.ID == int.Parse(Request.QueryString["Catgory"]));

        if (int.TryParse(DropDownListCity.SelectedValue, out cityID))
            cCoupons = cCoupons.Where(x => x.CityID.HasValue && (x.CityID == cityID || x.City.FromID.Value == cityID));

        if (int.TryParse(DropDownListCategory.SelectedValue, out categoryID))
            cCoupons = cCoupons.Where(x => x.CategoryID.HasValue && x.CategoryID == categoryID);

        if (!string.IsNullOrEmpty(Request.QueryString["CouponID"]))
            cCoupons = cCoupons.Where(x => x.ID == int.Parse(Request.QueryString["CouponID"]));
        e.Result = cCoupons.OrderByDescending(x => x.Priority).OrderByDescending(x => x.ID);
    }
开发者ID:yschulmann,项目名称:Anglodeals,代码行数:31,代码来源:DealsDay.aspx.cs


示例8: AutoCompleteBoxCRDataSource_Selecting

        protected void AutoCompleteBoxCRDataSource_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = GetData();
              var result = data.Select(c => new { c.customerReference }).Distinct();

              e.Result = result;
        }
开发者ID:dennis-vl,项目名称:dennis-vl,代码行数:7,代码来源:DeliveryDetails.aspx.cs


示例9: LinqDataSourceStart_Selecting

    protected void LinqDataSourceStart_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.Campaigns.Where(r => r.Type == Campaign.TypeX.Short_run && ucDateRange.FromDate <= r.Date
                                                && r.Date <= ucDateRange.ToDate)
            .ToList()
                                                .GroupBy(r => new { r.CoopOrg.Geo1 }, (r, sub) => new
            {
                Province = r.Geo1.Fullname,
                Url = RedBloodSystem.Url4CollectRpt11
                    + "ProvinceID=" + r.Geo1.ID.ToString()
                    + "&from=" + ucDateRange.FromDate.Value.Date.ToShortDateString()
                    + "&to=" + ucDateRange.ToDate.Value.Date.ToShortDateString(),
                Total = sub.Sum(r1 => r1.CollectedDonations.Count()),
                Total450 = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.Pack.Volume == 450).Count()).ToStringRemoveZero(),
                Total350 = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.Pack.Volume == 350).Count()).ToStringRemoveZero(),
                Total250 = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.Pack.Volume == 250).Count()).ToStringRemoveZero(),
                TotalXXX = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.Pack.Volume != 250 && r2.Pack.Volume != 350 && r2.Pack.Volume != 450).Count()).ToStringRemoveZero(),
                TotalPos = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Positive).Count()).ToStringRemoveZero(),
                TotalNeg = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Negative).Count()).ToStringRemoveZero(),
                TotalNon = sub.Sum(r1 => r1.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Non).Count()).ToStringRemoveZero(),
                TotalMiss = sub.Sum(r1 => r1.Donations.Where(r2 => r2.Pack == null).Count()).ToStringRemoveZero()
            })
            .OrderBy(r => r.Province);
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:28,代码来源:Rpt1.aspx.cs


示例10: LinqDataSource1_Selecting

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.Packs.Where(r => r.Status == Pack.StatusX.Product && r.ProductCode == ProductCode
            && (TR == Donation.TestResultStatusX.All || r.Donation.TestResultStatus == TR)
            )
            //.ToList()
            .Select(r => new
            {
                r.DIN,
                r.Donation.TestResultStatus,
                r.Donation.BloodGroup,
                r.Volume,
                r.ExpirationDate,
            })
            .ToList()
            .Select(r => new
            {
                r.DIN,
                r.TestResultStatus,
                BloodGroupDesc = BloodGroupBLL.GetDescription(r.BloodGroup),
                r.Volume,
                ExpirationDate = r.ExpirationDate.ToStringVN_Hour(),
                Expired = r.ExpirationDate.Value.Expired() ? "X" : "",
                ExpiredInDays = r.ExpirationDate.Value.ExpiredInDays(ExpiredInDays) ? "X" : ""
            })
            .OrderBy(r => r.TestResultStatus).ThenBy(r => r.DIN);
    }
开发者ID:ghostnguyen,项目名称:daccf960-44f9-4f95-91c4-b1aba37effe1,代码行数:29,代码来源:CountList.aspx.cs


示例11: LinqDataSourceRpt_Selecting

    protected void LinqDataSourceRpt_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.Campaigns.Where(r => ucDateRange.FromDate <= r.Date && r.Date <= ucDateRange.ToDate)
            .ToList()
            .Select(r => new
            {
                r.ID,
                Url = RedBloodSystem.Url4CollectRpt920
                   + "CampaignID=" + r.ID.ToString(),
                r.Name,
                r.Date,
                Total = r.CollectedDonations.Count(),
                HostName = r.HostOrg.Name,
                CoopName = r.CoopOrg.Name,
                TestResultPos = RedBloodSystem.checkingInfection.Select(r1 => new
                {
                    r1.Name,
                    Total = r.Donations.Where(r2 => r1.Decode(r2.InfectiousMarkers) == TR.pos.Name).Count()
                }).Where(r1 => r1.Total > 0),
                TestResultNA = RedBloodSystem.checkingInfection.Select(r1 => new
                {
                    r1.Name,
                    Total = r.Donations.Where(r2 => r1.Decode(r2.InfectiousMarkers) == TR.na.Name).Count()
                }).Where(r1 => r1.Total > 0),
                BloodGroupSumary = r.Donations.GroupBy(r1 => r1.BloodGroup, (r2, BGSub) => new
                {
                    BloodGroupDesc = BloodGroupBLL.GetDescription(r2),
                    Total = BGSub.Count()
                })
            });
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:35,代码来源:Rpt910.aspx.cs


示例12: LinqDataSourceEnd_Selecting

    protected void LinqDataSourceEnd_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        var packBLL = new PackBLL();

        e.Result = packBLL.GetRemainByDate(ucDateRange.ToDate.Value)
            .Select(r => new { r.ProductCode, r.Donation.BloodGroup, r.Volume })
            .ToList()
            .GroupBy(r => new { r.ProductCode }, (r, sub) => new
            {
                r.ProductCode,
                ProductDesc = ProductBLL.GetDesc(r.ProductCode),
                Total = sub.Count(),
                BloodGroupSumary = sub.GroupBy(r1 => r1.BloodGroup, (r1, BGSub) => new
                {
                    BloodGroupDesc = BloodGroupBLL.GetDescription(r1),
                    Total = BGSub.Count(),
                    Order = BloodGroupBLL.GetOrder(r1),
                }).OrderBy(r1 => r1.Order).ThenBy(r1 => r1.BloodGroupDesc),
                VolumeSumary = sub.GroupBy(r1 => r1.Volume, (r1, VolSub) => new
                {
                    Volume = r1,
                    Total = VolSub.Count()
                })
            })
            .OrderBy(r => r.ProductDesc);
    }
开发者ID:ghostnguyen,项目名称:daccf960-44f9-4f95-91c4-b1aba37effe1,代码行数:28,代码来源:TransCount.aspx.cs


示例13: autoCompleteBox_Selecting

        protected void autoCompleteBox_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = GetData();
            var result = data.Select(c => new { c.bpName }).Distinct();

            e.Result = result;
        }
开发者ID:dennis-vl,项目名称:dennis-vl,代码行数:7,代码来源:CustomerAccounts.aspx.cs


示例14: LinqDataSourcePack_Selecting

        protected void LinqDataSourcePack_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            if (CampaignDetail1.CampaignID > 0)
            {
                e.Result =
                    DonationBLL.GetUnLock(CampaignDetail1.CampaignID)
                    .Select(r => new
                    {
                        r.DIN,
                        r.Status,
                        r.People.Name,
                        CollectedDate = r.CollectedDate.ToStringVN_Hour(),
                        r.BloodGroup,
                        r.BloodGroupDesc,
                        ABOLog = r.DonationTestLogs.Where(r1 => r1.Type == DonationTestLog.TypeX.BloodGroup)
                        .Select(r1 => new
                        {
                            BloodGroupDesc = BloodGroupBLL.GetDescription(r1.Result),
                            Date = r1.Date.ToStringVN_Hour()
                        })

                    });
            }
            else
            {
                e.Cancel = true;
            }
        }
开发者ID:ghostnguyen,项目名称:daccf960-44f9-4f95-91c4-b1aba37effe1,代码行数:28,代码来源:BloodGroup.aspx.cs


示例15: LinqDataSource1_Selecting

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        List<Donation> list = DonationBLL.Get(CampaignDetail1.CampaignID).ToList();
        e.Result = list;

        Summary(list.ToList());
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:7,代码来源:CollectDetailRpt.aspx.cs


示例16: AllChangesLinq_Selected

 protected void AllChangesLinq_Selected(object sender, LinqDataSourceSelectEventArgs e)
 {
     DataClasses1DataContext con = new DataClasses1DataContext();
     var changes = from chang in con.ChangeLog
                   let tableName = chang.TableName
                   let status = chang.TableProperty
                   let allStates = con.OrderStatus
                   let myOrder = con.Order
                   let myOrderItem=con.OrderItem
                   let Ref = (!chang.ReferenceId.HasValue)?Guid.Empty: chang.ReferenceId.Value
                   where chang.TableName == "Order" || chang.TableName == "OrderItem"
                   select new OrderLogging
                   {
                       LogId = chang.Expr1,
                       TableName = tableName,
                       Name = chang.Name,
                       FirstName = chang.FirstName,
                       Login = chang.Login,
                       Type= tableName=="Order" ? "Auftrag":"Auftragsposition",
                       Date = chang.Date,
                       ReferenceId = (!chang.ReferenceId.HasValue)?Guid.Empty: chang.ReferenceId.Value,
                       TranslatedText = TranslatedText(status,chang.Text, allStates),
                       OrderNumber = tableName == "Order" ? myOrder.FirstOrDefault(q => q.Id == Ref).Ordernumber : myOrderItem.FirstOrDefault(q => q.Id == Ref).Order.Ordernumber
                   };
     changes = changes.OrderByDescending(q=>q.OrderNumber);
     e.Result = changes;
 }
开发者ID:HedinRakot,项目名称:KVS,代码行数:27,代码来源:OrderHistory.aspx.cs


示例17: LinqDataSource1_Selecting

		protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
		{
			IQueryable<Unit> r = Global.Db.Units.Where(u => u.GameID == GameID);
			if (!string.IsNullOrEmpty(tbCode.Text)) r = r.Where(u => u.Code == tbCode.Text);
			if (!string.IsNullOrEmpty(tbName.Text)) r = r.Where(u => u.Name.Contains(tbName.Text));
			if (!string.IsNullOrEmpty(tbDescription.Text)) r = r.Where(u => u.Description.Contains(tbDescription.Text));
			if (!string.IsNullOrEmpty(tbParent.Text)) r = r.Where(u => u.ParentCode == tbParent.Text);
			if (!string.IsNullOrEmpty(ddLicense.SelectedValue)) r = r.Where(u => u.LicenseType == int.Parse(ddLicense.SelectedValue));

			r = r.OrderBy(x => x.OverallProgress);

			e.Result = from x in r select new
			           		{
			           			x.UnitID,
			           			x.Name,
			           			x.Code,
			           			x.CurrentStatus,
			           			x.LicenseType,
			           			x.ModelProgress,
			           			x.TextureProgress,
			           			x.ScriptProgress,
			           			x.OverallProgress,
			           			LastChanged = x.User.Login,
								CandidateCount = x.Candidates.Count
			           		};
		}
开发者ID:GoogleFrog,项目名称:Zero-K-Infrastructure,代码行数:26,代码来源:Units.aspx.cs


示例18: sourceClient_Selecting

 protected void sourceClient_Selecting(object sender, LinqDataSourceSelectEventArgs e)
 {
     if (!User.IsInRole(RSMTenon.ReportGenerator.ReportGenerator.AdminGroup)) {
         string where = String.Format(@"UserID = ""{0}""", User.Identity.Name);
         sourceClient.Where = where;
     }
 }
开发者ID:garsiden,项目名称:Report-Generator,代码行数:7,代码来源:index.aspx.cs


示例19: LinqDataSource1_Selecting

 protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
 {
     var kelAngg = from k in dc.viewKelAnggaranCodeCombineNames
                   //select new { k.KA_CODE, k.KaCodeName };
                   select k;
     e.Result = kelAngg;
 }
开发者ID:trogalko,项目名称:Rscm_Bku,代码行数:7,代码来源:TransaksiKasAdd.aspx.cs


示例20: LinqDataSource1_Selecting

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        ucDateRange.Validated();

        RedBloodDataContext db = new RedBloodDataContext();

        e.Result = db.Campaigns.Where(r => r.Type == Campaign.TypeX.Short_run && ucDateRange.FromDate <= r.Date
                                    && r.Date <= ucDateRange.ToDate
                                    && r.CoopOrg.GeoID1 == ProvinceID)
                                .ToList()
                                .Select(r => new
                                                {
                                                    CoopOrg = r.CoopOrg.Name,
                                                    HostOrg = r.HostOrg.Name,
                                                    r.Date,
                                                    Total = r.CollectedDonations.Count(),
                                                    Total450 = r.CollectedDonations.Where(r2 => r2.Pack.Volume == 450).Count().ToStringRemoveZero(),
                                                    Total350 = r.CollectedDonations.Where(r2 => r2.Pack.Volume == 350).Count().ToStringRemoveZero(),
                                                    Total250 = r.CollectedDonations.Where(r2 => r2.Pack.Volume == 250).Count().ToStringRemoveZero(),
                                                    TotalXXX = r.CollectedDonations.Where(r2 => r2.Pack.Volume != 250 && r2.Pack.Volume != 350 && r2.Pack.Volume != 450).Count().ToStringRemoveZero(),
                                                    TotalPos = r.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Positive).Count().ToStringRemoveZero(),
                                                    TotalNeg = r.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Negative).Count().ToStringRemoveZero(),
                                                    TotalNon = r.CollectedDonations.Where(r2 => r2.TestResultStatus == Donation.TestResultStatusX.Non).Count().ToStringRemoveZero(),
                                                    TotalMiss = r.Donations.Where(r2 => r2.Pack == null).Count().ToStringRemoveZero()
                                                })
            .OrderBy(r => r.Date);
    }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:27,代码来源:Rpt11.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.ListBox类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.LinkButton类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap