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

📄 personalinfo.aspx.cs

📁 electronic CURRICULUM VITAE
💻 CS
📖 第 1 页 / 共 2 页
字号:
            if (ToDateB.Text.Trim() != "")
                Calendar5.SelectedDate = Convert.ToDateTime(ToDateB.Text);
        }
        catch
        { }
        Calendar5.Visible = true;  //showing the calendar.
    }
    protected void ToDate_TextChanged(object sender, EventArgs e)
    {

    }
    protected void Calendar5_SelectionChanged(object sender, EventArgs e)
    {
        ToDate.Text = Calendar5.SelectedDate.ToString();
        Calendar5.Visible = false; //hiding the calendar.
    }
    protected void CountryDropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void Submit_Click(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [Experience]( CVId,InstitutionName,ExpFromDate,ExpToDate,JobTitle,Country,EmploymentStatus)
						values( IDENT_CURRENT('cvTable1'),@InstitutionName,@ExpFromDate,@ExpToDate,@JobTitle,@Country,@EmploymentStatus)";

            command.Parameters.Add("@InstitutionName", SqlDbType.NChar, 100).Value = InstitutionName.Text;
            command.Parameters.Add("@ExpFromDate", SqlDbType.SmallDateTime).Value = fromDate.Text;
            command.Parameters.Add("@ExpToDate", SqlDbType.SmallDateTime).Value = ToDate.Text;
            command.Parameters.Add("@JobTitle", SqlDbType.NChar, 50).Value = jobTitle.Text;
            command.Parameters.Add("@Country", SqlDbType.NChar, 40).Value = Country.SelectedItem.Text;
            command.Parameters.Add("@EmploymentStatus", SqlDbType.NChar, 20).Value = EmploymentStatusDropDownList2.SelectedItem.Text;

            command.Connection.Open();
            command.ExecuteNonQuery();
            /* InstitutionName.Text="";
             fromDate.Text="";
             ToDate.Text="";
             jobTitle.Text="";
             jobTitle.Text="";
             Country.SelectedIndex=0;
             EmploymentStatusDropDownList2.SelectedIndex=0;*/
        }
    }

    protected void PersonalInfoSubmit_Click1(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            // Guid id = Guid.NewGuid();
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [cvTable1]( FirstName,MidName,LastName,DOB, Fax, Gender, Country, MobileNum, Email, MaritalStatus, Emirate, City)
						values(@FirstName,@MidName,@LastName, @DOB, @Fax, @Gender, @Country, @MobileNum, @Email, @MaritalStatus, @Emirate, @City)";
            //@"insert into [CareerObjInterestOther](CVId, CareerObj, Interests, Others)
            //		values(@CVId,@CareerObj, @Interests, @Others)";
            //command.Parameters.Add("@CVId", SqlDbType.UniqueIdentifier).Value = id;
            command.Parameters.Add("@FirstName", SqlDbType.NVarChar, 50).Value = FNTextBox.Text;
            command.Parameters.Add("@MidName", SqlDbType.NVarChar, 50).Value = MNTextBox.Text;
            command.Parameters.Add("@LastName", SqlDbType.NVarChar, 50).Value = FamilyNTextBox1.Text;
            // int sYear = int.Parse(TextBox2.Text);
            //int sMo = int.Parse(TextBox1.Text);
            //int sDay = int.Parse(TextBox3.Text);
            //command.Parameters.Add("@DOB", SqlDbType.DateTime).Value = new DateTime(sYear, sMo, sDay);
            command.Parameters.Add("@DOB", SqlDbType.SmallDateTime).Value = DoBTextBox.Text;
            command.Parameters.Add("@Fax", SqlDbType.Int).Value = FaxTextBox4.Text;
            command.Parameters.Add("@Gender", SqlDbType.NChar, 50).Value = GenderDropDownList1.SelectedItem.Text;
            command.Parameters.Add("@Country", SqlDbType.NVarChar, 50).Value = CountryList.SelectedItem.Text;
            command.Parameters.Add("@MobileNum", SqlDbType.Int).Value = MobileTextBox5.Text;
            command.Parameters.Add("@Email", SqlDbType.VarChar, 100).Value = EmailTextBox3.Text;
            command.Parameters.Add("@MaritalStatus", SqlDbType.NChar, 10).Value = MaritalStatusDropDownList2.SelectedItem.Text;
            command.Parameters.Add("@Emirate", SqlDbType.NChar, 10).Value = EmirateDropDownList1.SelectedItem.Text;
            command.Parameters.Add("@City", SqlDbType.VarChar, 50).Value = CityTextBox2.Text;

            command.Connection.Open();
            command.ExecuteNonQuery();



        }
    }
    protected void ResetPersonalInfo_Click1(object sender, EventArgs e)
    {
        FNTextBox.Text = "";
        MNTextBox.Text = "";
        FamilyNTextBox1.Text = "";
        DoBTextBox.Text = "";
        FaxTextBox4.Text = "";
        GenderDropDownList1.SelectedIndex = 0;
        CountryList.SelectedIndex = 0;
        MobileTextBox5.Text = "";
        EmailTextBox3.Text = "";
        MaritalStatusDropDownList2.SelectedIndex = 0;
        EmirateDropDownList1.SelectedIndex = 0;
        CityTextBox2.Text = "";
    }
    protected void Reset_Click(object sender, EventArgs e)
    {
        InstitutionName.Text = "";
        fromDate.Text = "";
        ToDate.Text = "";
        jobTitle.Text = "";
        Country.SelectedIndex = 0;
        EmploymentStatusDropDownList2.SelectedIndex = 0;
    }
    protected void Calendar6_SelectionChanged(object sender, EventArgs e)
    {
        RewardDatetxt.Text = Calendar6.SelectedDate.ToString();
        Calendar6.Visible = false; //hiding the calendar.
    }
    protected void RewardDateB_Click(object sender, EventArgs e)
    {
        try
        {
            if (RewardDateB.Text.Trim() != "")
                Calendar6.SelectedDate = Convert.ToDateTime(RewardDateB.Text);
        }
        catch
        { }
        Calendar6.Visible = true;  //showing the calendar.
    }
    protected void RewardSubmit_Click(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [Rewards](CVId,RewardTitle,RewardDate)
						values(IDENT_CURRENT('cvTable1'), @RewardTitle,@RewardDate)";

            command.Parameters.Add("@RewardTitle", SqlDbType.NChar, 100).Value = RewardTitletxt.Text;
            command.Parameters.Add("@RewardDate", SqlDbType.SmallDateTime).Value = RewardDatetxt.Text;
            command.Connection.Open();
            command.ExecuteNonQuery();
            /*RewardTitletxt.Text="";
             RewardDatetxt.Text="";*/
        }
    }
    protected void RewardReset_Click(object sender, EventArgs e)
    {
        RewardTitletxt.Text = "";
        RewardDatetxt.Text = "";
    }
    protected void SkillSubmit_Click(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [Skills](CVId,SkillType,SkillName)
						values(IDENT_CURRENT('cvTable1'),@SkillType,@SkillName)";

            command.Parameters.Add("@SkillType", SqlDbType.NChar, 15).Value = SkillTypeDropDownList1.SelectedItem.Text;
            command.Parameters.Add("@SkillName", SqlDbType.NChar, 50).Value = SkillNametxt.Text;
            command.Connection.Open();
            command.ExecuteNonQuery();
            /* SkillTypeDropDownList1.SelectedIndex=0;
             SkillNametxt.Text="";*/

        }
    }
    protected void SkillReset_Click(object sender, EventArgs e)
    {
        SkillTypeDropDownList1.SelectedIndex = 0;
        SkillNametxt.Text = "";
    }
    protected void RefSubmit_Click(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [References](CVId,ReferenceName,InstitutionName, Address, JobTitle, Email, Phone)
						values(IDENT_CURRENT('cvTable1'),@ReferenceName,@InstitutionName, @Address, @JobTitle, @Email, @Phone)";

            command.Parameters.Add("@ReferenceName", SqlDbType.NChar, 50).Value = RefNametxt.Text;
            command.Parameters.Add("@InstitutionName", SqlDbType.NChar, 50).Value = instNametxt.Text;
            command.Parameters.Add("@Address", SqlDbType.NChar, 100).Value = Addtxt.Text;
            command.Parameters.Add("@JobTitle", SqlDbType.NChar, 70).Value = RefJobTitletxt.Text;
            command.Parameters.Add("@Email", SqlDbType.NChar, 50).Value = RefEmailtxt.Text;
            command.Parameters.Add("@Phone", SqlDbType.Int).Value = RefPhonetxt.Text;
            command.Connection.Open();
            command.ExecuteNonQuery();
            /* RefNametxt.Text = "";
             instNametxt.Text = "";
             Addtxt.Text = "";
             RefJobTitletxt.Text = "";
             RefEmailtxt.Text = "";
             RefPhonetxt.Text = "";*/
        }
    }
    protected void RefReset_Click(object sender, EventArgs e)
    {

        RefNametxt.Text = "";
        instNametxt.Text = "";
        Addtxt.Text = "";
        RefJobTitletxt.Text = "";
        RefEmailtxt.Text = "";
        RefPhonetxt.Text = "";
    }
    protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
    {

    }
    protected void MNTextBox_TextChanged(object sender, EventArgs e)
    {

    }
    protected void DoBTextBox_TextChanged(object sender, EventArgs e)
    {

    }
    protected void CountryList_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        using (SqlCommand command = new SqlCommand())
        {
            command.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            command.CommandText = @"insert into [CareerObjInterestOther](CVId, CareerObj, Interests, Others)
						values(IDENT_CURRENT('cvTable1'),@CareerObj, @Interests, @Others)";

            //string quer@"select CVId from cvTable1" 
            // System.Data.IDataReader aReader1= getCVID();
            //command.Parameters.Add("@CVId", SqlDbType.Int).Value = 
            command.Parameters.Add("@CareerObj", SqlDbType.NChar, 1000).Value = CareerTextBox.Text;
            command.Parameters.Add("@Interests", SqlDbType.NChar, 1000).Value = Interests.Text;
            command.Parameters.Add("@Others", SqlDbType.NChar, 1000).Value = OtherTextBox3.Text;
            command.Connection.Open();
            command.ExecuteNonQuery();

        }
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        CareerTextBox.Text = "";
        Interests.Text = "";
        OtherTextBox3.Text = "";
    }

}

⌨️ 快捷键说明

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