Пример #1
0
        protected void LinqDataSourceRadGridDataSource_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = EsmHelper.GetData(portalDc, this.itemFilter);

            RadDataPager radDataPager = RadListViewItem.FindControl("RadDataPagerItem") as RadDataPager;

            vw_item vwItem = data.ToList()[pageIndex];

            var query = from c in portalDc.purchaseOrderLines
                        where c.itemId == vwItem.itemId && c.purchaseOrder.company.companyCode == vwItem.companyCode
                        select new { c.openQuantity, c.uomCode, c.deliveryDate, c.purchaseOrder.businessPartner.bpName, c.purchaseOrder.businessPartner.country.description };

            e.Result = query;
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            portalDc = new DALPortalDataContext();

            this.itemFilter = (ItemFilter)Session["itemFilter"];

            if (!IsPostBack)
            {
                this.selectedItemId      = Convert.ToInt32(Session["selectedItemId"]);
                this.selectedCompanyCode = Session["selectedCompanyCode"].ToString();

                IQueryable <vw_item> data = EsmHelper.GetData(portalDc, this.itemFilter);

                int index = data.ToList().FindIndex(c => c.itemId.Equals(selectedItemId) && c.companyCode.Equals(selectedCompanyCode));

                RadDataPager radDataPager = RadListViewItem.FindControl("RadDataPagerItem") as RadDataPager;
                radDataPager.FireCommand("Page", (index).ToString());
            }
        }
Пример #3
0
        protected void LinqDataSourceAcbOutsideDiameter3_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = EsmHelper.GetData(portalDc, this.itemFilter);

            e.Result = data.Select(c => new { c.outsideDiameter3 }).Distinct();
        }
Пример #4
0
        protected void LinqDataSourceAcbDescription_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = EsmHelper.GetData(portalDc, this.itemFilter);

            e.Result = data.Select(c => new { c.description }).Distinct();
        }
Пример #5
0
 protected void DataSourceRadGrid_Selecting(object sender, LinqDataSourceSelectEventArgs e)
 {
     e.Result = EsmHelper.GetData(portalDc, this.itemFilter);
 }
Пример #6
0
        protected void LinqDataSourceAcbWallThickness2_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            var data = EsmHelper.GetData(portalDc, this.itemFilter);

            e.Result = data.Select(c => new { c.wallThickness2 }).Distinct();
        }