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


C# EntityManager.Search方法代码示例

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


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

示例1: btnfinalize_Click

        protected void btnfinalize_Click(object sender, EventArgs e)
        {
            Dictionary<int, int> cartItems1 = (Dictionary<int, int>)Session["ShoppingCart"];
            int prodid1;
            int prodqty1;

            foreach (KeyValuePair<int, int> productidQty in cartItems1)
            {
                prodid1 = productidQty.Key;
                prodqty1 = productidQty.Value;

                EntityManager<ProductListing> pcat = new EntityManager<ProductListing>();
                ProductListing procat = new ProductListing();
                procat.ProductID = prodid1;
                List<ProductListing> prodcatID = pcat.Search(procat);

            }

               // ShoppingCrt.
            //EntityManager<ShippingAddress> pcat = new EntityManager<ShippingAddress>();
            //ShippingAddress procat = new ShippingAddress();
            //procat.CustomerID = 10;
            //procat.AddressLine1 = "sdfag";

            //List<ShippingAddress> prodcatID = pcat.Insert(procat);
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T2,代码行数:26,代码来源:Checkout.aspx.cs

示例2: btn_Checkout_Click

        protected void btn_Checkout_Click(object sender, EventArgs e)
        {
            string abc = "";
               // Response.Redirect("Checkout.aspx");
            int customerid = Convert.ToInt32(Session["customerid"].ToString());

            EntityManager<ShippingAddress> pcat = new EntityManager<ShippingAddress>();
            ShippingAddress procat = new ShippingAddress();
            procat.CustomerID = customerid;
            List<ShippingAddress> prodcatID = pcat.Search(procat);
            if (prodcatID.Count != 0)
            {
                abc = prodcatID[0].AddressLine1;
            }
            if (abc == "")
            {
                addressedit.Visible = true;
            }
            else
            {

                addressview.Visible = true;
            }
            btnfindis.Visible = true;
            btn_Checkout.Visible = false;
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T2,代码行数:26,代码来源:Checkout.aspx.cs

示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary<int, int> myDictionary = (Dictionary<int, int>)Session["shoppingCart"];
                // foreach (var my in myDictionary) { }
                EntityManager<ProductListing> object1 = new EntityManager<ProductListing>();
                ProductListing mgr_productListing = new ProductListing();
                List<ProductListing> list2 = new List<ProductListing>();
                // myDictionary.Add(984, 1);

                foreach (var pair in myDictionary)
                {

                    mgr_productListing.ProductID = pair.Key;
                    List<ProductListing> list3 = new List<ProductListing>();
                    list3 = object1.Search(mgr_productListing);
                    list4.Add(pair.Value);
                    list2.AddRange(list3);
                }
                if (!IsPostBack)
                {
                    GridView1.DataSource = list2;
                    GridView1.DataBind();
                    lblTotalValue.Text = totalvalue.ToString();
                }
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:25,代码来源:ShoppingCart.ascx.cs

示例4: refreshdata

 public void refreshdata()
 {
     EntityManager<Address> mgrProduct = new EntityManager<Address>();
     Address obj = new Address();
     obj.AddressID = 9;
     List<Address> list2 = mgrProduct.Search(obj);
     lbl.Text = list2[0].AddressLine1;
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:8,代码来源:UCAddressView.ascx.cs

示例5: refreshdata_edit

 public void refreshdata_edit(int val)
 {
     EntityManager<Address> mgrProduct = new EntityManager<Address>();
     Address obj = new Address();
     obj.AddressID = val;
     List<Address> list2 = mgrProduct.Search(obj);
     string x = list2[0].AddressLine1;
     lbEdit.Text = x;
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:9,代码来源:UCAddressEdit.ascx.cs

示例6: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     EntityManager<Address> mgrProduct = new EntityManager<Address>();
     Address obj = new Address();
     obj.AddressID = 9;
     List<Address> list2 = mgrProduct.Search(obj);
     GridView2.DataSource = list2[0].AddressLine1;
     GridView2.DataBind();
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:9,代码来源:UCAddressView.ascx.cs

示例7: refreshdata_desc

        public void refreshdata_desc(int val)
        {
            EntityManager<ProductListing> object1 = new EntityManager<ProductListing>();
               ProductListing mgr_productListing = new ProductListing  ();
               mgr_productListing.ProductID = val;

            List<ProductListing> list2 = object1.Search(mgr_productListing);
            Label1.Text = list2[0].Description;
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:9,代码来源:ProductDescription.ascx.cs

示例8: ProductDescription1

 public ProductDescription1(int val)
 {
     EntityManager<ProductDescription> mgrproduct = new EntityManager<ProductDescription>();
     ProductDescription p_dd = new ProductDescription();
     //p_d.ProductDescriptionID = 4;
     p_dd.ProductDescriptionID = val;
     List<ProductDescription> list1 = mgrproduct.Search(p_dd);
     Textbox1.Text = list1[0].Description.ToString();
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:9,代码来源:ProductDescription.ascx.cs

示例9: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                createtable();

                Dictionary<int, int> cartItems = (Dictionary<int, int>)Session["ShoppingCart"];
                int prodid;
                int prodqty;
                decimal grandtotal = 0;
                // List<cartitem> crtitem = new List<cartitem>();

                foreach (KeyValuePair<int, int> productidQty in cartItems)
                {
                    prodid = productidQty.Key;
                    prodqty = productidQty.Value;

                    EntityManager<ProductListing> pcat = new EntityManager<ProductListing>();
                    ProductListing procat = new ProductListing();
                    procat.ProductID = prodid;
                    List<ProductListing> prodcatID = pcat.Search(procat);

                    int ID = prodid;
                    string Name = prodcatID[0].Name;
                    string ProductNumber = prodcatID[0].ProductNumber;
                    string Description = prodcatID[0].Description;
                    string Color = prodcatID[0].Color;
                    decimal ListPrice = prodcatID[0].ListPrice;
                    string CategoryName = prodcatID[0].CategoryName;
                    string ModelName = prodcatID[0].ModelName;
                    int Quantity = prodqty;
                    decimal Totalprice = prodqty * prodcatID[0].ListPrice;
                    grandtotal = grandtotal + Totalprice;

                    tb = (DataTable)ViewState["table1"];
                    dr = tb.NewRow();
                    dr["Product Name"] = Name;
                    dr["Number"] = ProductNumber;
                    dr["Description"] = Description;
                    dr["color"] = Color;

                    dr["List Price"] = ListPrice;
                    dr["Category Name"] = CategoryName;
                    dr["Model Name"] = ModelName;

                    dr["Quantity"] = Quantity;
                    dr["Total Price"] = Totalprice;
                    tb.Rows.Add(dr);
                    Gv1.DataSource = tb;
                    Gv1.DataBind();

                }

                lbl_GrandTotal.Text = "Grand Total of your cart Items =" + grandtotal.ToString();
            }
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T2,代码行数:56,代码来源:ShoppingCart.ascx.cs

示例10: refreshdata

        public void refreshdata(int val)
        {
            EntityManager<ProductListing> object1 = new EntityManager<ProductListing>();
               ProductListing mgr_productListing = new ProductListing  ();
               mgr_productListing.ProductID = val;

            List<ProductListing> list2 = object1.Search(mgr_productListing);
            GridView1.DataSource = list2;
            GridView1.DataBind();
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:10,代码来源:ProductOrder.ascx.cs

示例11: GetDesc

        public void GetDesc(int ProductDescriptionId)
        {
            EntityManager<ProductListing> pcat = new EntityManager<ProductListing>();
            ProductListing procat = new ProductListing();
            procat.ProductID = ProductDescriptionId;
            List<ProductListing> prodcatID = pcat.Search(procat);
            Label2.Text = prodcatID[0].Description;

            //int id = ProductDescriptionId;
            //Label2.Text = ProductDescriptionId.ToString();
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T2,代码行数:11,代码来源:ProductDescription.ascx.cs

示例12: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            int customerid = Convert.ToInt32(Session["customerid"].ToString());

            EntityManager<Order1> pcat = new EntityManager<Order1>();
            Order1 procat = new Order1();
            procat.CustomerID = customerid;
            List<Order1> prodcatID = pcat.Search(procat);

            gv_Product.DataSource = prodcatID;
            gv_Product.DataBind();
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T2,代码行数:12,代码来源:MyOrders.aspx.cs

示例13: refreshdata

 public void refreshdata()
 {
     EntityManager<Address> mgrProduct = new EntityManager<Address>();
     Address obj = new Address();
     obj.AddressID = Convert.ToInt32(Session["AddressId"]);
     List<Address> list2 = mgrProduct.Search(obj);
     lbl.Text = list2[0].AddressLine1;
     lblCity.Text = list2[0].City;
     lblState.Text = list2[0].StateProvince;
     lblCountry.Text = list2[0].CountryRegion;
     lblZip.Text = list2[0].PostalCode;
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:12,代码来源:UCAddressView.ascx.cs

示例14: refreshdata_edit

 public void refreshdata_edit(int val)
 {
     EntityManager<Address> mgrProduct = new EntityManager<Address>();
     Address obj = new Address();
     obj.AddressID = val;
     List<Address> list2 = mgrProduct.Search(obj);
     txtStreet.Text = list2[0].AddressLine1;
     txtCity.Text = list2[0].City;
     txtState.Text = list2[0].StateProvince;
     txtCountry.Text = list2[0].CountryRegion;
     txtZip.Text = list2[0].PostalCode;
 }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:12,代码来源:UCAddressEdit.ascx.cs

示例15: refreshdata

        public void refreshdata(int val)
        {
            global_productId = val;
            EntityManager<ProductListing> object1 = new EntityManager<ProductListing>();
            ProductListing mgr_productListing = new ProductListing  ();
            mgr_productListing.ProductID = val;

            List<ProductListing> list2 = object1.Search(mgr_productListing);
            GridView1.DataSource = list2;

            GridView1.DataBind();
            GridView1.Columns[2].ItemStyle.Width = Unit.Pixel(400);
        }
开发者ID:vgopu2,项目名称:BISummer2015-P1-T1,代码行数:13,代码来源:ProductOrder.ascx.cs


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