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


C# DataClass类代码示例

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


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


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