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

C# DataClass类代码示例

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

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



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

示例1: LoadOptions

		private void LoadOptions()
		{
            DataClass clsDataClass = new DataClass();

			lblGroupID.Text = Common.Decrypt((string)Request.QueryString["groupid"],Session.SessionID);
			lblMatrixID.Text = Common.Decrypt(Request.QueryString["id"],Session.SessionID);

			ProductGroupVariations clsProductGroupVariation = new ProductGroupVariations();
			lstItem.DataSource = clsDataClass.DataReaderToDataTable(clsProductGroupVariation.List(Convert.ToInt32(lblGroupID.Text),"VariationType",SortOption.Ascending)).DefaultView;
			lstItem.DataBind();
			clsProductGroupVariation.CommitAndDispose();

            Data.Unit clsUnit = new Data.Unit();
			cboUnit.DataTextField = "UnitName";
			cboUnit.DataValueField = "UnitID";
			cboUnit.DataSource = clsUnit.ListAsDataTable(SortField: "UnitName").DefaultView;
			cboUnit.DataBind();
			cboUnit.SelectedIndex = cboUnit.Items.Count - 1;
			clsUnit.CommitAndDispose();	
	
			ProductGroup clsProductGroup = new ProductGroup();
			ProductGroupDetails clsProductGroupDetails = clsProductGroup.Details(Convert.ToInt32(lblGroupID.Text));
			cboUnit.SelectedIndex = cboUnit.Items.IndexOf(cboUnit.Items.FindByValue(clsProductGroupDetails.UnitDetails.UnitID.ToString()));
			txtProductPrice.Text = clsProductGroupDetails.Price.ToString("#,##0.#0");
			txtPurchasePrice.Text = clsProductGroupDetails.PurchasePrice.ToString("#,##0.#0");
            chkIncludeInSubtotalDiscount.Checked = clsProductGroupDetails.IncludeInSubtotalDiscount;
			txtVAT.Text = clsProductGroupDetails.VAT.ToString("#,##0.#0");
			txtEVAT.Text = clsProductGroupDetails.EVAT.ToString("#,##0.#0");
			txtLocalTax.Text = clsProductGroupDetails.LocalTax.ToString("#,##0.#0");
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:30,代码来源:_details.ascx.cs


示例2: GetSegueIdFor

		string GetSegueIdFor(DataClass type)
		{
			switch (type) {
				case DataClass.Location:
					return LocationSegueId;

				case DataClass.Motion:
					return MotionSegueId;

				case DataClass.Notifications:
				case DataClass.Calendars:
				case DataClass.Reminders:
				case DataClass.Contacts:
				case DataClass.Photos:
				case DataClass.Video:
				case DataClass.Microphone:
				case DataClass.Bluetooth:
				case DataClass.Facebook:
				case DataClass.Twitter:
				case DataClass.SinaWeibo:
				case DataClass.TencentWeibo:
				case DataClass.Advertising:
					return DefaultSegueId;

				default:
					throw new NotImplementedException ();
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:28,代码来源:PrivacyClassesTableViewController.cs


示例3: LoadOptions

		private void LoadOptions()
		{
			ProductGroup clsProductGroup = new ProductGroup();
			DataClass clsDataClass = new DataClass();
			
			cboGroup.DataTextField = "ProductGroupName";
			cboGroup.DataValueField = "ProductGroupID";
			cboGroup.DataSource = clsProductGroup.ListAsDataTable(SortField:"ProductGroupName").DefaultView;
			cboGroup.DataBind();
			cboGroup.SelectedIndex = cboGroup.Items.Count - 1;

            Data.Unit clsUnit = new Data.Unit();
			
			cboProductSubGroupUnit.DataTextField = "UnitName";
			cboProductSubGroupUnit.DataValueField = "UnitID";
			cboProductSubGroupUnit.DataSource = clsUnit.ListAsDataTable(SortField: "UnitName").DefaultView;
			cboProductSubGroupUnit.DataBind();
			cboProductSubGroupUnit.SelectedIndex = cboProductSubGroupUnit.Items.Count - 1;

			clsUnit.CommitAndDispose();		
	
			if (cboGroup.Items.Count != 0)
			{
				Int32 BaseUnitID= clsProductGroup.Details(Convert.ToInt32(cboGroup.SelectedItem.Value)).UnitDetails.UnitID;
				cboProductSubGroupUnit.SelectedIndex = cboProductSubGroupUnit.Items.IndexOf( cboProductSubGroupUnit.Items.FindByValue(BaseUnitID.ToString()));
			}
			clsProductGroup.CommitAndDispose();	
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:28,代码来源:_details.ascx.cs


示例4: LoadOptions

		private void LoadOptions()
		{
			DataClass clsDataClass = new DataClass();

			Contacts clsContact = new Contacts();

			cboContactCode.DataTextField = "ContactCode";
			cboContactCode.DataValueField = "ContactCode";
			cboContactCode.DataSource = clsContact.ListAsDataTable("ContactCode",SortOption.Ascending);
			cboContactCode.DataBind();
			cboContactCode.Items.Add( new ListItem("All Codes","0"));
			cboContactCode.SelectedIndex = cboContactCode.Items.Count - 1;

			cboContactName.DataTextField = "ContactName";
			cboContactName.DataValueField = "ContactName";
			cboContactName.DataSource = clsContact.ListAsDataTable("ContactName",SortOption.Ascending);
			cboContactName.DataBind();
			cboContactName.Items.Add( new ListItem("All Contacts","0"));
			cboContactName.SelectedIndex = cboContactName.Items.Count - 1;
			
			clsContact.CommitAndDispose();
			
			ContactGroups clsContactGroup = new ContactGroups();
			cboGroup.DataTextField = "ContactGroupName";
			cboGroup.DataValueField = "ContactGroupID";
			cboGroup.DataSource = clsDataClass.DataReaderToDataTable(clsContactGroup.List("ContactGroupName",SortOption.Ascending));
			cboGroup.DataBind();
			cboGroup.Items.Add( new ListItem("All Contact Groups","0"));
			cboGroup.SelectedIndex = cboGroup.Items.Count - 1;

			clsContactGroup.CommitAndDispose();

			cboDeleted.SelectedIndex = cboDeleted.Items.Count - 1;
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:34,代码来源:_ContactsReport.ascx.cs


示例5: LoadOptions

		private void LoadOptions()
		{
			DataClass clsDataClass = new DataClass();
			ContactGroups clsContactGroup = new ContactGroups();
			
			cboGroup.DataTextField = "ContactGroupName";
			cboGroup.DataValueField = "ContactGroupID";
			cboGroup.DataSource = clsContactGroup.ListAsDataTable(ContactGroupCategory.SUPPLIER).DefaultView;
			cboGroup.DataBind();
			cboGroup.SelectedIndex = ((int) ContactGroupCategory.SUPPLIER) - 1; //cboGroup.Items.Count - 1;

            Department clsDepartment = new Department(clsContactGroup.Connection, clsContactGroup.Transaction);
            cboDepartment.DataTextField = "DepartmentName";
            cboDepartment.DataValueField = "DepartmentID";
            cboDepartment.DataSource = clsDepartment.ListAsDataTable().DefaultView;
            cboDepartment.DataBind();
            cboDepartment.SelectedIndex = 0;

            Positions clsPosition = new Positions(clsContactGroup.Connection, clsContactGroup.Transaction);
            cboPosition.DataTextField = "PositionName";
            cboPosition.DataValueField = "PositionID";
            cboPosition.DataSource = clsPosition.ListAsDataTable("PositionName", SortOption.Ascending, 0).DefaultView;
            cboPosition.DataBind();
            cboPosition.SelectedIndex = 0;

			clsContactGroup.CommitAndDispose();			
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:27,代码来源:_Insert.ascx.cs


示例6: SetUp

		public void SetUp()
		{
			this.Data = new DataClass();
			this.Data.Data = 10;
			this.WasValueChangedCalled = false;
			this.Level = new PropertyLevel(typeof(DataClass), "Data", 150, this.ValueChanged);
			this.Level.RegisterPropertyChanged(this.Data);
		}
开发者ID:jakubfijalkowski,项目名称:Kingdoms-Clash.NET,代码行数:8,代码来源:PropertyLevelTests.cs


示例7: method_0

 internal DataClass method_0(string string_1, BigEndianReader dofusReader_0)
 {
     DataClass class2 = new DataClass { Name = this.string_0 };
     //Class17 class3 = default(Class17);
     foreach (Class17 class3 in this.list_0) {
     class2.Fields.Add(class3.string_0, RuntimeHelpers.GetObjectValue(class3.delegate0_0.Invoke(string_1, dofusReader_0)));
     }
     return class2;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:Class16.cs


示例8: SetUp

		public void SetUp()
		{
			this.Data = new DataClass { Value = 1 };

			this.Path = new OneLevelPropertyPath("Value", typeof(DataClass));
			this.Path.BeginInit();
			this.Path.Root = this.Data;
			this.Path.EndInit();
		}
开发者ID:jakubfijalkowski,项目名称:Kingdoms-Clash.NET,代码行数:9,代码来源:OneLevelPropertyPathTests.cs


示例9: SetUp

		public void SetUp()
		{
			this.Data = new DataClass();
			this.Data.DataList.Add(1);
			this.Data.DataList.Add(2);
			this.Data.DataList.Add(3);
			this.Data.DataList.Add(4);

			this.WasValueChangedCalled = false;
			this.Level = new IndexerLevel(typeof(DataClass), "0", 150, this.ValueChanged);
			this.Level.RegisterPropertyChanged(this.Data);
		}
开发者ID:jakubfijalkowski,项目名称:Kingdoms-Clash.NET,代码行数:12,代码来源:IndexerLevelTests.cs


示例10: sellStock

        public void sellStock(int amount, DataClass sellDetails)
        {
            if (possesion.Count > 0)
            {
                balance = balance * sellDetails.closingPrice / possesion.Last().closingPrice;
                Console.WriteLine("Current balance " + balance.ToString());

                possesion.RemoveAt(0);

                OnStockSold(new TradeEventArgs(balance, sellDetails));
            }
        }
开发者ID:JoelNordh,项目名称:StockApplication,代码行数:12,代码来源:StockTrader.cs


示例11: LoadOptions

		private void LoadOptions()
		{
            AccountClassifications clsAccountClassification = new AccountClassifications();
            DataClass clsDataClass = new DataClass();

            cboAccountClassification.DataTextField = "AccountClassificationName";
            cboAccountClassification.DataValueField = "AccountClassificationID";
            cboAccountClassification.DataSource = clsAccountClassification.ListAsDataTable().DefaultView;
            cboAccountClassification.DataBind();
            cboAccountClassification.SelectedIndex = 1;
            clsAccountClassification.CommitAndDispose();		
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:12,代码来源:_Update.ascx.cs


示例12: buyStock

        public void buyStock(int amount, DataClass buyDetails)
        {
            if(possesion.Count > 0)
            {
                return;
            }

            DataClass purchase = buyDetails;

            possesion.Add(buyDetails);

            balance = balance * 0.99;

            OnStockBought(new TradeEventArgs(balance, buyDetails));
        }
开发者ID:JoelNordh,项目名称:StockApplication,代码行数:15,代码来源:StockTrader.cs


示例13: LoadOptions

		private void LoadOptions()
		{
			DataClass clsDataClass = new DataClass();
			lblProductGroupID.Text = Common.Decrypt((string)Request.QueryString["groupid"],Session.SessionID);

			ProductGroupVariations clsVariation = new ProductGroupVariations();
			
			cboVariationType.DataTextField = "VariationType";
			cboVariationType.DataValueField = "VariationID";
			cboVariationType.DataSource = clsDataClass.DataReaderToDataTable(clsVariation.AvailableVariations(Convert.ToInt32(lblProductGroupID.Text), "VariationType",SortOption.Ascending)).DefaultView;
			cboVariationType.DataBind();
			cboVariationType.SelectedIndex = cboVariationType.Items.Count - 1;

			clsVariation.CommitAndDispose();	
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:15,代码来源:_Insert.ascx.cs


示例14: Initialize

 public void Initialize()
 {
     mockContext = new Mock<ICalculationDataContext>();
     mockContext
         .Setup(context => context.CostCodeValid(It.IsAny<string>()))
         .Returns(true);
     entry = new DataClass
         {
             EndDate = DateTime.Now.AddDays(1),
             Money = 0,
             StartDate = DateTime.Now,
             CostCode = string.Empty,
             UserName = string.Empty,
             Options = StringSplitOptions.RemoveEmptyEntries,
             StringValue = string.Empty
         };
 }
开发者ID:Warrenn,项目名称:Carbon.MVC,代码行数:17,代码来源:CalculationBaseUnitTest.cs


示例15: LoadList

		private void LoadList()
		{	
			ProductGroupCharges clsProductGroupCharge = new ProductGroupCharges();
			DataClass clsDataClass = new DataClass();

			if (Request.QueryString["Search"]==null)
			{
				PageData.DataSource = clsDataClass.DataReaderToDataTable(clsProductGroupCharge.List(Convert.ToInt64(lblGroupID.Text),"ChargeType",SortOption.Ascending)).DefaultView;
			}
			else
			{						
				string SearchKey = Common.Decrypt((string)Request.QueryString["search"],Session.SessionID);
				PageData.DataSource = clsDataClass.DataReaderToDataTable(clsProductGroupCharge.Search(Convert.ToInt64(lblGroupID.Text),SearchKey, "ChargeType", SortOption.Ascending)).DefaultView;
			}

			clsProductGroupCharge.CommitAndDispose();

			int iPageSize = Convert.ToInt16(Session["PageSize"]) ;
			
			PageData.AllowPaging = true;
			PageData.PageSize = iPageSize;
			try
			{
				PageData.CurrentPageIndex = Convert.ToInt16(cboCurrentPage.SelectedItem.Value) - 1;				
				lstItem.DataSource = PageData;
				lstItem.DataBind();
			}
			catch
			{
				PageData.CurrentPageIndex = 1;
				lstItem.DataSource = PageData;
				lstItem.DataBind();
			}			
			
			cboCurrentPage.Items.Clear();
			for (int i=0; i < PageData.PageCount;i++)
			{
				int iValue = i + 1;
				cboCurrentPage.Items.Add(new ListItem(iValue.ToString(),iValue.ToString()));
				if (PageData.CurrentPageIndex == i)
				{	cboCurrentPage.Items[i].Selected = true;}
				else
				{	cboCurrentPage.Items[i].Selected = false;}
			}
			lblDataCount.Text = " of " + " " + PageData.PageCount;
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:46,代码来源:_List.ascx.cs


示例16: LoadOptions

		private void LoadOptions()
		{
			PromoType clsPromoType= new PromoType();
			DataClass clsDataClass = new DataClass();
			
			cboPromoType.DataTextField = "PromoTypeCode";
			cboPromoType.DataValueField = "PromoTypeID";
			cboPromoType.DataSource = clsPromoType.ListAsDataTable().DefaultView;
			cboPromoType.DataBind();
			cboPromoType.SelectedIndex = cboPromoType.Items.Count - 1;

			clsPromoType.CommitAndDispose();

            txtStartDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
            txtStartTime.Text = "00:00";
            txtEndDate.Text = DateTime.Now.AddDays(30).ToString("yyyy-MM-dd");
            txtEndTime.Text = "23:59";
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:18,代码来源:_Insert.ascx.cs


示例17: ExtendedPickerPage

        public ExtendedPickerPage()
        {
            InitializeComponent ();
            BindingContext = this;
            myPicker = new ExtendedPicker (){DisplayProperty = "FirstName"};
            myPicker.SetBinding(ExtendedPicker.ItemsSourceProperty,new Binding("MyDataList",BindingMode.TwoWay));
            myPicker.SetBinding(ExtendedPicker.SelectedItemProperty,new Binding("TheChosenOne",BindingMode.TwoWay));
            myStackLayout.Children.Add (new Label{ Text = "Code Created:" });
            myStackLayout.Children.Add (myPicker);

            TheChosenOne = new DataClass(){ FirstName = "Jet", LastName = "Li" };
            MyDataList = new ObservableCollection<object> () {
                new DataClass(){FirstName="Jack",LastName="Doe"},
                TheChosenOne,
                new DataClass(){FirstName="Matt",LastName="Bar"},
                new DataClass(){FirstName="Mic",LastName="Jaggery"},
                new DataClass(){FirstName="Michael",LastName="Jackon"}
            };
        }
开发者ID:DavidStrickland0,项目名称:Xamarin-Forms-Samples,代码行数:19,代码来源:ExtendedPickerPage.xaml.cs


示例18: LoadOptions

		private void LoadOptions()
		{
			DataClass clsDataClass = new DataClass();

			lblSubGroupID.Text = Common.Decrypt((string)Request.QueryString["subgroupid"],Session.SessionID);
			lblMatrixID.Text = Common.Decrypt(Request.QueryString["id"],Session.SessionID);

			ProductSubGroupVariations clsProductSubGroupVariation = new ProductSubGroupVariations();
			lstItem.DataSource = clsDataClass.DataReaderToDataTable(clsProductSubGroupVariation.List(Convert.ToInt32(lblSubGroupID.Text),"VariationType",SortOption.Ascending)).DefaultView;
			lstItem.DataBind();
			clsProductSubGroupVariation.CommitAndDispose();

            Data.Unit clsUnit = new Data.Unit();
			cboUnit.DataTextField = "UnitName";
			cboUnit.DataValueField = "UnitID";
			cboUnit.DataSource = clsUnit.ListAsDataTable(SortField:"UnitName").DefaultView;
			cboUnit.DataBind();
			cboUnit.SelectedIndex = cboUnit.Items.Count - 1;
			clsUnit.CommitAndDispose();	
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:20,代码来源:_details.ascx.cs


示例19: SetupFixture

        public void SetupFixture()
        {
            DataClass dataObject = new DataClass();

            dataObject.String1 = "blabla1";
            dataObject.Int1 = 123;

            _context.AddType("Math", typeof(Math));
            _context.Set("Data", dataObject);
            _context.AddType("DataClass", typeof(DataClass));
            _context.Set("Func", new Converter<int, int>(Func));
            _context.AddFunction("Max", typeof(Math), "Max");
            _context.AddFunction("fmt", typeof(String), "Format");
            _context.Set("Value10", 10, typeof(int));
            _context.Set("NullableValue5", 5, typeof(int?));
            _context.Set("NullableValueNull", null, typeof(int?));
            _context.Set("MyArray", new int[] { 1, 2, 4, 8, 16 });
            _context.Set("MyArray2", new int[,] { { 1, 2 }, { 2, 4 }, { 4, 8 }, { 8, 16 }, { 16, 32 } });

            _parser.DefaultContext = _context;
        }
开发者ID:Niels-R,项目名称:core,代码行数:21,代码来源:CSharpParserFixture.cs


示例20: Parse

    IEnumerator Parse(string url)
    {
        WWW www = new WWW(prefix + url);
        yield return www;

        if (string.IsNullOrEmpty(www.error))
        {
            this.status = url;

            if (url == simpleUrl)
            {
                DataClass unpackData = new DataClass();
                using (MemoryStream mem = new MemoryStream(www.bytes))
                {
                    Unpacker unpacker = Unpacker.Create(mem);
                    unpackData.UnpackFromMessage(unpacker);
                }

                unpackData.Dump();

        //				MessagePackSerializer<DataClass> mps = MessagePackSerializer.Create<DataClass>();
        //				DataClass ret = mps.UnpackSingleObject(www.bytes);
        //
        //				ret.Dump();
            }

            if (url == testUrl)
            {
                MessagePackSerializer<BaseClass> mps = MessagePackSerializer.Create<BaseClass>();
                BaseClass ret = mps.UnpackSingleObject(www.bytes);

                ret.Dump();
            }
        }
        else
        {
            this.status = www.error;
        }
    }
开发者ID:JingxuanWang,项目名称:UnityMessagePackTest,代码行数:39,代码来源:MessagePackTest.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DataClasses1DataContext类代码示例发布时间:2022-05-24
下一篇:
C# DataCache类代码示例发布时间: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