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

C# Select类代码示例

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

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



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

示例1: FillElement

        protected void FillElement(IWebElement element, object value)
        {
            if (value == null)
            {
                return;
            }

            if (IsInput(element))
            {
                String inputType = element.GetAttribute("type");
                if (inputType == null || inputType == TextInputType || inputType == PasswordInputType)
                {
                    element.SendKeys(value.ToString());
                }
                else if (inputType == CheckboxType)
                {
                    CheckBox checkBox = new CheckBox(element);
                    checkBox.Set(bool.Parse(value.ToString()));
                }
                else if (inputType == RadioType)
                {
                    Radio radio = new Radio(element);
                    radio.SelectByValue(value.ToString());
                }
            }
            else if (IsSelect(element))
            {
                Select select = new Select(element);
                select.SelectByValue(value.ToString());
            }
            else if (IsTextArea(element))
            {
                element.SendKeys(value.ToString());
            }
        }
开发者ID:kool79,项目名称:htmlelements-dotnet,代码行数:35,代码来源:Form.cs


示例2: Delete

 public Delete(string table, Select select, bool allowMultiple)
 {
     Table.Name = table;
     AllowMultiple = allowMultiple;
     Select = select;
     Filter = FilterType.Select;
 }
开发者ID:mikeobrien,项目名称:Gribble,代码行数:7,代码来源:Delete.cs


示例3: SelectionElement

 public SelectionElement(string myAlias, Select.EdgeList myEdgeList, bool myIsGroupedOrAggregated, IDChainDefinition myRelatedIDChainDefinition, IAttributeDefinition myElement = null)
     : this(myAlias, myRelatedIDChainDefinition)
 {
     EdgeList = myEdgeList;
     IsGroupedOrAggregated = myIsGroupedOrAggregated;
     Element = myElement;
 }
开发者ID:anukat2015,项目名称:sones,代码行数:7,代码来源:SelectionElement.cs


示例4: Acc_Exec_AggregateAvg

        public void Acc_Exec_AggregateAvg()
        {
            const double expected = 28.8664;

            // overload #1
            double result = new
                Select(Aggregate.Avg("UnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #2
            result = new
                Select(Aggregate.Avg(Product.UnitPriceColumn))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #3
            result = new
                Select(Aggregate.Avg("UnitPrice", "AverageUnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #4
            result = new
                Select(Aggregate.Avg(Product.UnitPriceColumn, "AverageUnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);
        }
开发者ID:RyanDansie,项目名称:SubSonic-2.0,代码行数:32,代码来源:AggregateTests.cs


示例5: Start

 // Use this for initialization
 void Start()
 {
     posicionAPuntador = new Vector3 (transform.position.x,transform.position.y+5,0);
     seleccionador = new Select ();
     seleccionador = GameObject.FindGameObjectWithTag("Select").GetComponent<Select>();
     escogido = false;
 }
开发者ID:cesarpa,项目名称:FastAttention,代码行数:8,代码来源:People.cs


示例6: Start

    // Use this for initialization
    void Start()
    {
        IModule mountainTerrain = new RidgedMulti();
        IModule baseFlatTerrain = new Billow();
        ((Billow)baseFlatTerrain).Frequency = 2.0;
        IModule flatTerrain = new ScaleBias(baseFlatTerrain, 0.125, -0.75);
        IModule terrainType = new Perlin();
        ((Perlin)terrainType).Frequency = 0.5;
        ((Perlin)terrainType).Persistence = 0.25;
        IModule terrainSelector = new Select(flatTerrain, mountainTerrain, terrainType);
        ((Select)terrainSelector).SetBounds(0.0, 1000.0);
        ((Select)terrainSelector).SetEdgeFallOff(0.125);
        IModule finalTerrain = new Turbulence(terrainSelector);
        ((Turbulence)finalTerrain).Frequency = 4.0;
        ((Turbulence)finalTerrain).Power = 0.125;

        NoiseMapBuilderPlane heightMapBuilder = new NoiseMapBuilderPlane(256, 256);
        heightMapBuilder.SetBounds(6.0, 10.0, 1.0, 5.0);
        heightMapBuilder.Build(finalTerrain);
        RendererImage render = new RendererImage();
        render.SourceNoiseMap = heightMapBuilder.Map;
        render.ClearGradient ();
        render.AddGradientPoint(-1.0000, new Color32(32, 160, 0, 255));
        render.AddGradientPoint(-0.2500, new Color32(224, 224, 0, 255));
        render.AddGradientPoint(0.2500, new Color32(128, 128, 128, 255));
        render.AddGradientPoint(1.0000, new Color32(255, 255, 255, 255));
        render.IsLightEnabled = true;
        render.LightContrast = 3.0;
        render.LightBrightness = 2.0;
        render.Render();

        tex = render.GetTexture();
    }
开发者ID:pboechat,项目名称:VoxelEngine,代码行数:34,代码来源:Tutorial6.cs


示例7: BarcodeExist

 private bool BarcodeExist()
 {
     try
     {
         int count = 1;
         switch (SysPara.AutoGenerateBarcode)
         {
             case 0:
             case 1:
                 count = new Select().From(TTestInfo.Schema).Where(TTestInfo.Columns.Barcode).IsEqualTo(txtBarcode.Text.Trim()).
                     And(TTestInfo.Columns.PatientId).IsNotEqualTo(vPatient_ID).GetRecordCount();
                 break;
             case 2:
                 count = new Select().From(TTestInfo.Schema).Where(TTestInfo.Columns.TestTypeId).IsEqualTo(vTestType_ID).
                 And(TTestInfo.Columns.Barcode).IsEqualTo(txtBarcode.Text.Trim()).GetRecordCount();
                 break;
         }
         if (count > 0) return true;
         else return false;
     }
     catch (Exception ex)
     {
         return true;
     }
 }
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:25,代码来源:frmInput_Update_Barcode.cs


示例8: Exec_AggregateMax

        public void Exec_AggregateMax()
        {
            const double expected = 100.00;

            // overload #1
            double result = new
                Select(Aggregate.Max("UnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #2
            result = new
                Select(Aggregate.Max(Product.UnitPriceColumn))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #3
            result = new
                Select(Aggregate.Max("UnitPrice", "MostExpensive"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);

            // overload #4
            result = new
                Select(Aggregate.Max(Product.UnitPriceColumn, "MostExpensive"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            Assert.AreEqual(expected, result);
        }
开发者ID:howgoo,项目名称:SubSonic-2.0,代码行数:32,代码来源:AggregateTests.cs


示例9: Start

	void Start() 
	{
		// STEP 1
		// Gradient is set directly on the object
		var mountainTerrain = new RidgedMultifractal();
		RenderAndSetImage(mountainTerrain);

		// Stop rendering if we're only getting as far as this tutorial
		// step. It saves me from doing multiple files.
		if (_tutorialStep <= 1) return;

		// STEP 2
		var baseFlatTerrain = new Billow();
		baseFlatTerrain.Frequency = 2.0;
		RenderAndSetImage(baseFlatTerrain);


		if (_tutorialStep <= 2) return;

		// STEP 3
		var flatTerrain = new ScaleBias(0.125, -0.75, baseFlatTerrain);
		RenderAndSetImage(flatTerrain);

		if (_tutorialStep <= 3) return;

		// STEP 4
		var terrainType = new Perlin();
		terrainType.Frequency = 0.5;
		terrainType.Persistence = 0.25;

		var finalTerrain = new Select(flatTerrain, mountainTerrain, terrainType);
		finalTerrain.SetBounds(0, 1000);
		finalTerrain.FallOff = 0.125;
		RenderAndSetImage(finalTerrain);
	}
开发者ID:Andros-Spica,项目名称:LibNoiseTutorials,代码行数:35,代码来源:Tutorial5.cs


示例10: Exec_AggregateAvg

        public void Exec_AggregateAvg()
        {
            const double expected = 55.5922077922078; //55.5922;

            // overload #1
            double result = new
                Select(Aggregate.Avg("UnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            //Assert.AreEqual(expected, result);
            Assert.AreEqual(Math.Round(expected, 8), Math.Round(result, 8));  // [[55.5922]]!=[[55.5922077922078]]

            // overload #2
            result = new
                Select(Aggregate.Avg(Product.UnitPriceColumn))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            //Assert.AreEqual(expected, result);
            Assert.AreEqual(Math.Round(expected, 8), Math.Round(result, 8));
            // overload #3
            result = new
                Select(Aggregate.Avg("UnitPrice", "AverageUnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            //Assert.AreEqual(expected, result);
            Assert.AreEqual(Math.Round(expected, 8), Math.Round(result, 8));
            // overload #4
            result = new
                Select(Aggregate.Avg(Product.UnitPriceColumn, "AverageUnitPrice"))
                .From(Product.Schema)
                .ExecuteScalar<double>();
            //Assert.AreEqual(expected, result);
            Assert.AreEqual(Math.Round(expected, 8), Math.Round(result, 8));
        }
开发者ID:howgoo,项目名称:SubSonic-2.0,代码行数:34,代码来源:AggregateTests.cs


示例11: bind_chart

    //databind to total orders by eta and company id
    protected void bind_chart(Int32 companyid)
    {
        try
        {
            int _countopen = 0;

            //total open orders for this company or total open orders for company = -1
            if (companyid > -1)
            {
                _countopen = new Select(OrderTable.OrderIDColumn).From<OrderTable>().Where(OrderTable.CompanyIDColumn).IsEqualTo(companyid).
                    And(OrderTable.JobClosedColumn).IsEqualTo(false).GetRecordCount();
            }
            else
            {
                _countopen = new Select(OrderTable.OrderIDColumn).From<OrderTable>().Where(OrderTable.JobClosedColumn).IsEqualTo(false).GetRecordCount();
            }
            //bind to gauge
            this.dxgaugeSumopen.Value = _countopen.ToString();
        }
        catch (Exception ex)
        {
            this.dxlblerr1.Text = ex.Message.ToString();
            this.dxlblerr1.Visible = true;
        }
    }
开发者ID:Publiship,项目名称:WWI_CRM_folders,代码行数:26,代码来源:Pod_Count_Open.ascx.cs


示例12: SelectTests

        public SelectTests()
        {
            context = new TestingContext();
            select = new Select<Role>(context.Set<Role>());

            context.DropData();
            SetUpData();
        }
开发者ID:NonFactors,项目名称:MVC6.Template,代码行数:8,代码来源:SelectTests.cs


示例13: SelectTests

        public SelectTests()
        {
            context = new TestingContext();
            select = new Select<Role>(context.Set<Role>());

            context.Set<Role>().Add(ObjectFactory.CreateRole());
            context.DropData();
        }
开发者ID:NonFactors,项目名称:MVC5.Template,代码行数:8,代码来源:SelectTests.cs


示例14: HuyXacNhanPhieuTraLaiKho

        /// <summary>
        /// hàm thực hiện việc xác nhận thông tin 
        /// </summary>
        /// <param name="objPhieuNhap"></param>
        /// <returns></returns>
        public ActionResult HuyXacNhanPhieuTraLaiKho(TPhieuNhapxuatthuoc objPhieuNhap)
        {
            HisDuocProperties objHisDuocProperties = PropertyLib._HisDuocProperties;
            string errorMessage = "";
            try
            {
                using (var Scope = new TransactionScope())
                {
                    using (var dbScope = new SharedDbConnectionScope())
                    {
                        SqlQuery sqlQuery = new Select().From(TPhieuNhapxuatthuocChitiet.Schema)
                            .Where(TPhieuNhapxuatthuocChitiet.Columns.IdPhieu).IsEqualTo(objPhieuNhap.IdPhieu);
                        TPhieuNhapxuatthuocChitietCollection objPhieuNhapCtCollection =
                            sqlQuery.ExecuteAsCollection<TPhieuNhapxuatthuocChitietCollection>();

                        foreach (TPhieuNhapxuatthuocChitiet objPhieuNhapCt in objPhieuNhapCtCollection)
                        {
                            //Kiểm tra ở kho nhập xem thuốc đã sử dụng chưa
                            ActionResult _Kiemtrathuochuyxacnhan = Kiemtrathuochuyxacnhan(objPhieuNhap, objPhieuNhapCt);
                            if (_Kiemtrathuochuyxacnhan != ActionResult.Success) return _Kiemtrathuochuyxacnhan;
                            int id_thuockho = -1;
                            StoredProcedure sp = SPs.ThuocNhapkhoOutput(objPhieuNhapCt.NgayHethan, objPhieuNhapCt.GiaNhap, objPhieuNhapCt.GiaBan,
                                                                      objPhieuNhapCt.SoLuong, Utility.DecimaltoDbnull(objPhieuNhapCt.Vat),
                                                                      objPhieuNhapCt.IdThuoc, objPhieuNhap.IdKhonhap, objPhieuNhapCt.MaNhacungcap,
                                                                      objPhieuNhapCt.SoLo, objPhieuNhapCt.SoDky, objPhieuNhapCt.SoQdinhthau, -1, id_thuockho,
                                                                      objPhieuNhap.NgayXacnhan, objPhieuNhapCt.GiaBhyt, objPhieuNhapCt.GiaPhuthuDungtuyen, objPhieuNhapCt.GiaPhuthuTraituyen, objPhieuNhapCt.KieuThuocvattu);
                            sp.Execute();
                            sp = SPs.ThuocXuatkho(objPhieuNhap.IdKhoxuat, objPhieuNhapCt.IdThuoc,
                                                          objPhieuNhapCt.NgayHethan, objPhieuNhapCt.GiaNhap,objPhieuNhapCt.GiaBan,
                                                          Utility.DecimaltoDbnull(objPhieuNhapCt.Vat),
                                                          Utility.Int32Dbnull(objPhieuNhapCt.SoLuong), objPhieuNhapCt.IdThuockho, objPhieuNhapCt.MaNhacungcap, objPhieuNhapCt.SoLo, objHisDuocProperties.XoaDulieuKhiThuocDaHet ? 1 : 0, errorMessage);

                            sp.Execute();
                            errorMessage = Utility.sDbnull(sp.OutputValues[0]);

                        }
                        //Xóa toàn bộ chi tiết trong TBiendongThuoc
                        new Delete().From(TBiendongThuoc.Schema)
                            .Where(TBiendongThuoc.IdPhieuColumn).IsEqualTo(objPhieuNhap.IdPhieu).Execute();
                        new Update(TPhieuNhapxuatthuoc.Schema)
                            .Set(TPhieuNhapxuatthuoc.Columns.IdNhanvien).EqualTo(null)
                            .Set(TPhieuNhapxuatthuoc.Columns.NguoiXacnhan).EqualTo(null)
                            .Set(TPhieuNhapxuatthuoc.Columns.NgayXacnhan).EqualTo(null)
                            .Set(TPhieuNhapxuatthuoc.Columns.TrangThai).EqualTo(0)
                            .Where(TPhieuNhapxuatthuoc.Columns.IdPhieu).IsEqualTo(objPhieuNhap.IdPhieu).Execute();
                    }
                    Scope.Complete();
                    return ActionResult.Success;
                }
            }
            catch (Exception exception)
            {
                log.Error("Loi ban ra tu sp :{0}", errorMessage);
                log.Error("Loi trong qua trinh xac nhan don thuoc :{0}", exception);
                return ActionResult.Error;
            }
        }
开发者ID:vmshis2015,项目名称:VMSPharmacy,代码行数:62,代码来源:PhieuTralaiThuocKhoaVeKho.cs


示例15: Exec_Simple

 public void Exec_Simple()
 {
     //string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"MyApplication\Northwind.db3");
     //DataService.Providers["Northwind"].DefaultConnectionString =
     //    String.Format(@"Data Source={0};Version=3;New=False;Connection Timeout=3", dbPath);
     
     int records = new Select("productID").From("Products").GetRecordCount();
     Assert.IsTrue(records == 77);
 }
开发者ID:howgoo,项目名称:SubSonic-2.0,代码行数:9,代码来源:SelectTests.cs


示例16: SelectTests

        public SelectTests()
        {
            context = new TestingContext();
            select = new Select<TestModel>(context.Set<TestModel>());

            context.Set<TestModel>().RemoveRange(context.Set<TestModel>());
            context.Set<TestModel>().Add(ObjectFactory.CreateTestModel());
            context.SaveChanges();
        }
开发者ID:zarinbal,项目名称:MVC5.Template,代码行数:9,代码来源:SelectTests.cs


示例17: can_render_options_from_enumerable_of_simple_objects

		public void can_render_options_from_enumerable_of_simple_objects()
		{
			var optionNodes = new Select("foo.Bar").Options(new[] { 1, 2 }).ToString()
				.ShouldHaveHtmlNode("foo_Bar")
				.ShouldHaveChildNodesCount(2);

			optionNodes[0].ShouldBeUnSelectedOption("1", "1");
			optionNodes[1].ShouldBeUnSelectedOption("2", "2");
		}
开发者ID:haithemaraissia,项目名称:MVCContribute,代码行数:9,代码来源:SelectTests.cs


示例18: UxSelectWithDataSource

    public static MvcHtmlString UxSelectWithDataSource(this HtmlHelper htmlHelper, DataSource dataSource, string selectedValue = null, SelectAppearanceType appearance = null, bool liveSearch = false, bool showTick = false, bool showArrow = false, bool autoWidth = true, string width = null, bool disabled = false, string header = null, string container = null, string clientId = null)
    {
        var select = new Select(selectedValue, dataSource, appearance, liveSearch, showTick, showArrow, autoWidth, width, disabled, header, container, clientId);

        MvcHtmlString start = htmlHelper.Partial("ControlTemplates/" + select.ViewTemplate + "Start", select);
        MvcHtmlString end = htmlHelper.Partial("ControlTemplates/" + select.ViewTemplate + "End", select);

        return MvcHtmlString.Create(start.ToHtmlString() + end.ToHtmlString());
    }
开发者ID:renhammington,项目名称:UxFoundation,代码行数:9,代码来源:UxSelectWithDataSource.cs


示例19: Main

        static void Main(string[] args)
        {
            Select select = new Select();

            Authentication auth = new Authentication();
            auth.version = "1.1";   // Specify which Select API Version (1.0 or 1.1)

            PropertyFile rb = PropertyFile.getBundle("Environment");
            select.Url = rb.get("soap_url");
            auth.login = rb.get("soap_login");
            auth.password = rb.get("soap_password");

            // ProdTest
            //select.Url = "https://soap.prodtest.sj.vindicia.com/v1.0/soap.pl";
            //select.Url = "https://soap.prodtest.sj.vindicia.com/soap.pl";
            //auth.login = "xxx_soap";
            //auth.password = "";

            // Staging:
            //select.Url = https://soap.staging.sj.vindicia.com/soap.pl
            //auth.login = xxx_soap
            //auth.password = "";

            // Production:
            //select.Url = https://soap.vindicia.com/soap.pl
            //auth.login = xxx_soap
            //auth.password = "";

            Console.WriteLine("soapVersion=" + SEL001BillSelect.getSelectVersion(auth));
            Console.WriteLine();
            Console.WriteLine("Using version=" + auth.version);
            Console.WriteLine("soapURL=" + select.Url);
            Console.WriteLine("soapLogin=" + auth.login);

            Boolean bBill = true;
            Boolean bFetch = true;

            if (bBill)
            {
                SEL001BillSelect bill = new SEL001BillSelect();

                string startMerchantTransactionId = "FAILED" + DateTime.Now.DayOfYear + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second;
                string soapId = bill.run(select, auth, startMerchantTransactionId);

                Console.WriteLine("billTransactions soapId=" + soapId + "\n");
            }

            if (bFetch)
            {
                SEL002FetchSelect.run(select, auth);

                Console.WriteLine("fetchBillingResults completed.\n");
            }

            Console.ReadLine();
        }
开发者ID:Thapelo11,项目名称:CashBoxAPISamples,代码行数:56,代码来源:Program.cs


示例20: GetTaigaNoise

 public ModuleBase GetTaigaNoise()
 {
     if (TaigaNoise == null)
     {
         TaigaNoise = new Select(0, 1, 1, StandartNoise, 
             new ScaleBias(0.5, 0, new Perlin(1, 2, 0.25, 4, DataBaseHandler.DataBase.Seed, QualityMode.High)), 
             new BiomeTranslator(Biomes, BiomeTypes.Taiga, Bounds.left, Bounds.top, Bounds.width, Bounds.height));
     }
     return TaigaNoise;
 }
开发者ID:hybrid1969,项目名称:UCN-Sem5-2014,代码行数:10,代码来源:NoiseHelper.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# SelectCommand类代码示例发布时间:2022-05-24
下一篇:
C# Segment类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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