private void setButton_Click(object sender, EventArgs e) { if (this.Text == "درخواست کمک متفرقه فردی") { var newform = new searchHelpForm("ثبت درخواست کمک متفرقه فردی"); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک متفرقه فردی") { var newform = new searchHelpForm("بررسی درخواست کمک متفرقه فردی"); newform.ShowDialog(this); } else if (this.Text == "درخواست کمک درمان") { var newform = new searchHelpForm("ثبت درخواست کمک درمان"); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک درمان") { var newform = new searchHelpForm("بررسی درخواست کمک درمان"); newform.ShowDialog(this); } else if (this.Text == "درخواست کمک ازدواج") { var newform = new searchHelpForm("ثبت درخواست کمک ازدواج"); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک ازدواج") { var newform = new searchHelpForm("بررسی درخواست کمک ازدواج"); newform.ShowDialog(this); } else if (this.Text == "تعریف کمک تحصیلی") { var newform = new studyHelpForm(); newform.ShowDialog(this); } }
private void setButton_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(this.connection); con.Open(); if (this.Text == "ویرایش کمک جمعی با مصوبه") { var newform = new globalHelpEnactmentForm("ویرایش کمک جمعی با مصوبه", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش کمک جمعی اتفاقی") { var newform = new globalHelpsSuddenForm("ویرایش کمک جمعی اتفاقی", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ارائه کمک جمعی") { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش فایلهای ارائه کمک جمعی") { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش ارائه کمک جمعی"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک جمعی") { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "تایید کمک جمعی"); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک جمعی") { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک جمعی"); newform.ShowDialog(this); } else if (this.Text == "ویرایش کمک تحصیلی") { var newform = new studyHelpForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش کمک تحصیلی"); newform.ShowDialog(this); } else if (this.Text == "ارائه کمک تحصیلی") { string type = ""; SqlCommand cmd = new SqlCommand("select type from StudyHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } if (type == "معرفینامه") { var newform = new helpPresentationEduIntroductionForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ارائه کمک تحصیلی"); newform.ShowDialog(this); } } else if (this.Text == "ویرایش فایلهای ارائه کمک تحصیلی") { string type = ""; SqlCommand cmd = new SqlCommand("select type from StudyHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } if (type == "معرفینامه") { var newform = new helpPresentationEduIntroductionForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش فایلهای معرفینامه تحصیلی"); newform.ShowDialog(this); } else { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش ارائه کمک تحصیلی"); newform.ShowDialog(this); } } else if (this.Text == "تایید کمک تحصیلی") { string type = ""; SqlCommand cmd = new SqlCommand("select type from StudyHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } if (type == "معرفینامه") { var newform = new helpPresentationEduIntroductionForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "تایید معرفینامه تحصیلی"); newform.ShowDialog(this); } else { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "تایید کمک تحصیلی"); newform.ShowDialog(this); } } else if (this.Text == "ویرایش تایید کمک تحصیلی") { string type = ""; SqlCommand cmd = new SqlCommand("select type from StudyHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } if (type == "معرفینامه") { var newform = new helpPresentationEduIntroductionForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید معرفینامه تحصیلی"); newform.ShowDialog(this); } else { var newform = new helpPresentationForm3(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک تحصیلی"); newform.ShowDialog(this); } } else if (this.Text == "ثبت درخواست کمک ازدواج") { var newform = new marryHelpReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش درخواست کمک ازدواج") { var newform = new marryHelpReqForm("", "ویرایش درخواست کمک ازدواج", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک ازدواج") { var newform = new marryHelpCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک ازدواج تاییدشده") { var newform = new marryHelpCheckReqForm("", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک ازدواج ردشده") { var newform = new marryHelpCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "", "رد"); newform.ShowDialog(this); } else if (this.Text == "ارسال معرفینامه جهیزیه") { var newform = new marrySendIntroForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش ارسال معرفینامه جهیزیه") { var newform = new marrySendIntroForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), this.Text); newform.ShowDialog(this); } else if (this.Text == "دریافت نتیجه معرفینامه جهیزیه") { var newform = new marryResForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش نتیجه معرفینامه جهیزیه") { if (rad) { var newform = new marryResForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), this.Text, "رد"); newform.ShowDialog(this); } else { var newform = new marryResForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), this.Text); newform.ShowDialog(this); } } else if (this.Text == "ارائه کمک ازدواج") { string type = ""; SqlCommand cmd = new SqlCommand("select type from MarryHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } var newform = new marryHelpPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), type); newform.ShowDialog(this); } else if (this.Text == "ویرایش ارائه کمک ازدواج") { string type = ""; SqlCommand cmd = new SqlCommand("select type from MarryHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } var newform = new marryHelpPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), type, "ویرایش ارائه کمک ازدواج"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک ازدواج") { string type = ""; SqlCommand cmd = new SqlCommand("select type from MarryHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } var newform = new marryHelpConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), type); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک ازدواج") { string type = ""; SqlCommand cmd = new SqlCommand("select type from MarryHelps where id = @id;", con); cmd.Parameters.AddWithValue("@id", ExtensionFunction.PersianToEnglish(idTextbox.Text)); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { type = reader.GetString(0); } } var newform = new marryHelpConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), type, "ویرایش تایید کمک ازدواج"); newform.ShowDialog(this); } else if (this.Text == "ثبت درخواست کمک درمان") { var newform = new healHelpReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش درخواست کمک درمان") { var newform = new healHelpReqForm("", "ویرایش درخواست کمک درمان", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک درمان") { var newform = new healHelpCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک درمان تاییدشده") { var newform = new healHelpCheckReqForm("", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک درمان ردشده") { var newform = new healHelpCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "", "رد"); newform.ShowDialog(this); } else if (this.Text == "ارائه کمک درمان") { var newform = new healHelpPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش ارائه کمک درمان") { var newform = new healHelpPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش ارائه کمک درمان"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک درمان") { var newform = new healHelpConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک درمان") { var newform = new healHelpConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک درمان"); newform.ShowDialog(this); } if (this.Text == "ویرایش کمک متفرقه گروهی") { var newform = new otherHelpGlobalForm("ویرایش کمک متفرقه گروهی", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ارائه کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش فایلهای ارائه کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش ارائه کمک متفرقه گروهی"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "تایید کمک متفرقه گروهی"); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک متفرقه گروهی"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "تایید کمک متفرقه گروهی"); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک متفرقه گروهی") { var newform = new otherHelpGlobalPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک متفرقه گروهی"); newform.ShowDialog(this); } else if (this.Text == "ثبت درخواست کمک متفرقه فردی") { var newform = new otherHelpIndivReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش درخواست کمک متفرقه فردی") { var newform = new otherHelpIndivReqForm("", "ویرایش درخواست کمک متفرقه فردی", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "بررسی درخواست کمک متفرقه فردی") { var newform = new otherHelpIndivCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک متفرقه فردی تاییدشده") { var newform = new otherHelpIndivCheckReqForm("", ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش بررسی درخواست کمک متفرقه فردی ردشده") { var newform = new otherHelpIndivCheckReqForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "", "رد"); newform.ShowDialog(this); } else if (this.Text == "ارائه کمک متفرقه فردی") { var newform = new otherHelpIndivPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش ارائه کمک متفرقه فردی") { var newform = new otherHelpIndivPresentForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش ارائه کمک متفرقه فردی"); newform.ShowDialog(this); } else if (this.Text == "تایید کمک متفرقه فردی") { var newform = new otherHelpIndivConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text)); newform.ShowDialog(this); } else if (this.Text == "ویرایش تایید کمک متفرقه فردی") { var newform = new otherHelpIndivConfirmForm(ExtensionFunction.PersianToEnglish(idTextbox.Text), "ویرایش تایید کمک متفرقه فردی"); newform.ShowDialog(this); } con.Close(); idTextbox.Text = ""; setButton.Enabled = false; }