Пример #1
0
		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";
		}
Пример #2
0
		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();
		}