⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultcs.aspx.cs

📁 Telerik是很大的第三方软件制造商
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using Telerik.WebControls;
using Telerik.WebControls.RadUploadUtils;

namespace Telerik.UploadExamplesCSharp.OnlineJobEngine
{
	public class DefaultCS : Telerik.QuickStart.XhtmlPage
	{
		protected Panel pnlJobApplicationForm;
		protected TextBox txtFirstName;
		protected RequiredFieldValidator firstNameRequiredValidator;
		protected TextBox txtLastName;
		protected RequiredFieldValidator lastNameRequiredValidator;
		protected TextBox txtAddress;
		protected TextBox txtPhone;
		protected RadUpload uploadCV;
		protected Label lblNoCV;
		protected Label lblInvalidCV;
		protected RadUpload uploadPhoto;
		protected Label lblNoPhoto;
		protected Label lblInvalidPhoto;
		protected RadUpload uploadReferences;
		protected Repeater rptInvalidReferences;
		protected RadUpload uploadWorkSamples;
		protected Repeater rptInvalidWorkSamples;
		protected RadUploadProgressArea progressArea1;
		protected Button btnSubmit;
		protected Label lblApplicationSent;

		private void Page_Load(object sender, System.EventArgs e)
		{
		}

		private void btnSubmit_Click(object sender, System.EventArgs e)
		{
			BindResults();
		}

		private void BindResults()
		{
			bool isFormValid = true;
			if (uploadCV.UploadedFiles.Count == 0)
			{
				lblNoCV.Visible = true;
				isFormValid = false;
			}
			if (uploadCV.InvalidFiles.Count > 0)
			{
				lblInvalidCV.Visible = true;
				isFormValid = false;
			}
			if (uploadPhoto.InvalidFiles.Count > 0)
			{
				lblInvalidPhoto.Visible = true;
				isFormValid = false;
			}
			if (uploadPhoto.UploadedFiles.Count == 0)
			{
				lblNoPhoto.Visible = true;
				isFormValid = false;
			}
			if (uploadReferences.InvalidFiles.Count > 0)
			{
				rptInvalidReferences.Visible = true;
				rptInvalidReferences.DataSource = uploadReferences.InvalidFiles;
				rptInvalidReferences.DataBind();
				isFormValid = false;
			}
			if (uploadWorkSamples.InvalidFiles.Count > 0)
			{
				rptInvalidWorkSamples.Visible = true;
				rptInvalidWorkSamples.DataSource = uploadWorkSamples.InvalidFiles;
				rptInvalidWorkSamples.DataBind();
				isFormValid = false;
			}
			if (isFormValid)
			{
				pnlJobApplicationForm.Visible = false;
				lblApplicationSent.Visible = true;
			}

		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			InitializeComponent();
			base.OnInit(e);
		}
		
		private void InitializeComponent()
		{    
			this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -