//if error occurs then all controls will be red so if its text changed then it'll be white private void textChange(object sender, EventArgs e) { Control ctr = sender as Control; ClassCall.textChangeFun(ctr); if (ctr.Name == "candidatelnm_TextBox" || ctr.Name == "fatherlnm_TextBox" || ctr.Name == "motherlnm_TextBox") { candidatelnm_TextBox.Text = fatherlnm_TextBox.Text = motherlnm_TextBox.Text = ctr.Text; } else if (ctr.Name == "candidatemnm_TextBox" || ctr.Name == "fatherfnm_TextBox" || ctr.Name == "mothermnm_TextBox") { candidatemnm_TextBox.Text = fatherfnm_TextBox.Text = mothermnm_TextBox.Text = ctr.Text; } }
private void coursefee_control_textChanged(object sender, EventArgs e) { if (set_fee_textBox.BackColor == Color.Pink) { ClassCall.textChangeFun(sender as Control); } if (set_fee_textBox.Text.Trim() != string.Empty) { total_fee_textBox.Text = (int.Parse(set_fee_textBox.Text) * multiply).ToString(); } else { total_fee_textBox.Text = "0"; } }
//change the color of error control private void textChange(object sender, EventArgs e) { Control ctr = sender as Control; ClassCall.textChangeFun(ctr); if (ctr.Name == "empmnm_textBox" || ctr.Name == "fatherfnm_textBox" || ctr.Name == "mothermnm_textBox") { empmnm_textBox.Text = fatherfnm_textBox.Text = mothermnm_textBox.Text = ctr.Text; } if (ctr.Name == "emplnm_textBox" || ctr.Name == "fatherlnm_textBox" || ctr.Name == "mothermnm_textBox.Name") { emplnm_textBox.Text = fatherlnm_textBox.Text = motherlnm_textBox.Text = ctr.Text; } }
private void FormCloseBtn_Click(object sender, EventArgs e) { string del = Properties.Settings.Default.DeleteIconPath; if (File.Exists(del) || !string.IsNullOrEmpty(del)) { File.Delete(Properties.Settings.Default.DeleteIconPath); Properties.Settings.Default.DeleteIconPath = string.Empty; string ext = Path.GetExtension(Properties.Settings.Default.CollegeIcon); string newName = @"..\..\Resources\icon_img" + ext; string newFileDel = Properties.Settings.Default.CollegeIcon; File.Copy(newFileDel, newName, true); Properties.Settings.Default.CollegeIcon = newName; Properties.Settings.Default.Save(); File.Delete(newFileDel); } ClassCall.openHomePage(); }
private void coursefee_textChanged(object sender, EventArgs e) { if (set_fee_TextBox.BackColor == Color.Pink) { ClassCall.textChangeFun(sender as Control); } if (set_fee_TextBox.Text.Trim() != string.Empty) { DataTable dt = Course_Methods.feeCout(select_course_comboBox3.Text); instruction_label.Text = dt.Rows[0]["durationDesc"].ToString(); instruction_label2.Text = dt.Rows[0]["feeDescription"].ToString(); int year = Convert.ToInt32(dt.Rows[0]["yearCount"]); int fees = Convert.ToInt32(set_fee_TextBox.Text); total_fee_textBox.Text = (fees * year).ToString(); } else { total_fee_textBox.Text = "0"; } }
private void view_dept_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }
private void course_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }
private void FormCloseBtn_Click(object sender, EventArgs e) { ClassCall.openHomePage(); }
private void subject_controls_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }
private void Promote_stud_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }
private void set_modify_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }
private void textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); enableUpdateButton(); }
private void educational_details_textChanged(object sender, EventArgs e) { ClassCall.textChangeFun(sender as Control); }