protected void Submit_Click(object sender, EventArgs e) { try { Oplitis myOplitis = new Oplitis(); BLayer myBlayer = new BLayer(); myOplitis.id = Convert.ToInt32(oplitisid.Text); myOplitis.metaboli = Convert.ToDateTime(metaboliDate.Text); myOplitis.asm = Int32.Parse(asm.Text); myOplitis.onoma = fname.Text; myOplitis.eponymo = lname.Text; myOplitis.loxos = loxos.Text; myOplitis.bathmos = DropDownListRank.SelectedItem.ToString(); myOplitis.paratiriseis = paratiriseis.Text; myOplitis.isxysDate = Convert.ToDateTime(isxysKatigorias.Text); if (string.IsNullOrEmpty(newKatigoria.Text)) { myOplitis.katigoria = currentKatigoria.Text; } else { myOplitis.katigoria = newKatigoria.Text; } myBlayer.updateOplitis(myOplitis); Response.Redirect("anafora_metabolis.aspx"); } catch (Exception ex) { errorMessage.Visible = true; errorMessage.Text = ex.Message.ToString(); } }
public SqlDataReader get_Katigoria_From_Change(Oplitis fantaros) { Dal myDal = new Dal(); SqlDataReader dr = myDal.getKatigoriaFromChange(fantaros); return(dr); }
public SqlDataReader get_dikaiologitika_pou_exei_proskomisei_by_id(Oplitis myOplitis) { Dal myDal = new Dal(); SqlDataReader dr = myDal.getDikaiologitikaPouExeiProskomiseiById(myOplitis); return(dr); }
public SqlDataReader get_last_payment(Oplitis myOplitis) { Dal myDal = new Dal(); SqlDataReader myDtr = myDal.getLastPayment(myOplitis); return(myDtr); }
public SqlDataReader get_pliromi_diagrammenou_opliti_by_id_opliti(Oplitis myOplitis) { Dal myDal = new Dal(); SqlDataReader dr = myDal.getPliromiDiagarammenouOplitiByIdOpliti(myOplitis); return(dr); }
public Oplitis get_last_updated_oplitis() { Dal myDal = new Dal(); Oplitis myOplitis = new Oplitis(); DataTable dt = new DataTable(); SqlDataReader dr = myDal.getLastUpdatedOplitis(); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myOplitis.id = Convert.ToInt32(row["op_id"].ToString()); myOplitis.katigoria = row["kat_name"].ToString(); myOplitis.bathmos = row["r_perigrafi"].ToString(); myOplitis.eponymo = row["op_eponymo"].ToString(); myOplitis.onoma = row["op_onoma"].ToString(); myOplitis.asm = Convert.ToInt32(row["op_asm"].ToString()); myOplitis.loxos = row["op_loxos"].ToString(); myOplitis.paratiriseis = row["op_paratiriseis"].ToString(); myOplitis.katalogisteo = Convert.ToDecimal(row["kat_katalogisteo"].ToString()); myOplitis.kratiseis = Convert.ToDecimal(row["kat_kratiseis"].ToString()); myOplitis.pliroteo = Convert.ToDecimal(row["kat_pliroteo"].ToString()); myOplitis.dXmas = Convert.ToDecimal(row["kat_dx"].ToString()); myOplitis.dPasxa = Convert.ToDecimal(row["kat_dp"].ToString()); myOplitis.metaboli = Convert.ToDateTime(row["op_metaboli"].ToString()); myOplitis.isxysDate = Convert.ToDateTime(row["c_isxys_date"].ToString()); } return(myOplitis); }
public SqlDataReader get_last_updated_oplitis_dik(Oplitis myOplitis) { Dal myDal = new Dal(); SqlDataReader dr = myDal.getLastUpdatedOplitisDik(myOplitis); return(dr); }
public void updateOplitis(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("update_oplitis", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@id", myOplitis.id); cmd.Parameters.AddWithValue("@asm", myOplitis.asm); cmd.Parameters.AddWithValue("@onoma", myOplitis.onoma); cmd.Parameters.AddWithValue("@eponymo", myOplitis.eponymo); cmd.Parameters.AddWithValue("@loxos", myOplitis.loxos); cmd.Parameters.AddWithValue("@metaboli", myOplitis.metaboli); cmd.Parameters.AddWithValue("@bathmos", myOplitis.bathmos); cmd.Parameters.AddWithValue("@katigoria", myOplitis.katigoria); cmd.Parameters.AddWithValue("@paratiriseis", myOplitis.paratiriseis); cmd.Parameters.AddWithValue("@isxysDate", myOplitis.isxysDate); try { cmd.ExecuteNonQuery(); } catch (Exception ex) { string exmsg = ex.Message.ToString(); } finally { conn.Close(); } }
public void insertOplitis(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("add_oplitis", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@asm", myOplitis.asm); cmd.Parameters.AddWithValue("@onoma", myOplitis.onoma); cmd.Parameters.AddWithValue("@eponymo", myOplitis.eponymo); cmd.Parameters.AddWithValue("@loxos", myOplitis.loxos); cmd.Parameters.AddWithValue("@eggrafi", myOplitis.eggrafi); cmd.Parameters.AddWithValue("@paratiriseis", myOplitis.paratiriseis); cmd.Parameters.AddWithValue("@bathmos", myOplitis.bathmos); cmd.Parameters.AddWithValue("@lastPayDay", myOplitis.lastPayDay); cmd.Parameters.AddWithValue("@katigoria", myOplitis.katigoria); cmd.Parameters.AddWithValue("@katigoriaFDM", myOplitis.katigoriaFDM); try { cmd.ExecuteNonQuery(); } catch (Exception ex) { string exmsg = ex.Message.ToString(); } finally { conn.Close(); } }
protected void Page_Load(object sender, EventArgs e) { BLayer myBlayer = new BLayer(); Oplitis myOplitis = myBlayer.get_last_updated_oplitis(); aa.Text = myOplitis.id.ToString(); metaboliDate.Text = myOplitis.metaboli.ToString(); asm.Text = myOplitis.asm.ToString(); rank.Text = myOplitis.bathmos.ToString(); fname.Text = myOplitis.onoma.ToString(); lname.Text = myOplitis.eponymo.ToString(); loxos.Text = myOplitis.loxos.ToString(); LabelKatigoria.Text = myOplitis.katigoria.ToString(); paratiriseis.Text = myOplitis.paratiriseis.ToString(); katalogisteo.Text = myOplitis.katalogisteo.ToString(); kratiseis.Text = myOplitis.kratiseis.ToString(); pliroteo.Text = myOplitis.pliroteo.ToString(); dx.Text = myOplitis.dXmas.ToString(); dp.Text = myOplitis.dPasxa.ToString(); isxysMetabolis.Text = myOplitis.isxysDate.ToString(); Oplitis otherOplitis = new Oplitis(); otherOplitis.id = Convert.ToInt32(aa.Text); SqlDataReader myDtr = myBlayer.get_last_updated_oplitis_dik(otherOplitis); BulletedListDikaiologitika.DataSource = myDtr; BulletedListDikaiologitika.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BLayer myBlayer = new BLayer(); Pliromi myPliromi = new Pliromi(); Oplitis myOplitis = new Oplitis(); myPliromi = myBlayer.get_Last_Pliromi(); aaPliromis.Text = myPliromi.PliromiId.ToString(); priromiDate.Text = myPliromi.PayDay.ToString(); payDate.Text = myPliromi.PayDay.ToString(); asm.Text = myPliromi.p_opasm.ToString(); rank.Text = myPliromi.bathmos.ToString(); fname.Text = myPliromi.onoma.ToString(); lname.Text = myPliromi.eponymo.ToString(); loxos.Text = myPliromi.loxos.ToString(); katigoria.Text = myPliromi.katName.ToString(); katalogisteo.Text = myPliromi.katalogisteo.ToString(); kratiseis.Text = myPliromi.kratiseis.ToString(); pliroteo.Text = myPliromi.pliroteo.ToString(); payType.Text = myPliromi.mPerigrafi.ToString(); opid.Text = myPliromi.Pliromi_opid.ToString(); posoPliromis.Text = myPliromi.Poso.ToString(); myOplitis.id = Convert.ToInt32(opid.Text); SqlDataReader myDtr = myBlayer.get_dikaiologitika_pou_exei_proskomisei_by_id(myOplitis); dikaiologitika.DataSource = myDtr; dikaiologitika.DataBind(); } }
protected void saveButton_Click(object sender, EventArgs e) { try { BLayer myBlayer = new BLayer(); Oplitis myOplitis = new Oplitis(); myOplitis.eggrafi = Convert.ToDateTime(insertDate.Text); myOplitis.asm = Int32.Parse(asm.Text); myOplitis.onoma = fname.Text; myOplitis.eponymo = lname.Text; myOplitis.loxos = loxos.Text; myOplitis.paratiriseis = paratiriseis.Text; myOplitis.bathmos = DropDownListRank.SelectedItem.ToString(); myOplitis.katigoria = TextboxKatigoria.Text; myOplitis.katigoriaFDM = Convert.ToInt32(katigoriaFDM.SelectedValue); if (string.IsNullOrEmpty(lastPayDate.Text)) { DateTime myDT = new DateTime(1 / 1 / 1753); myOplitis.lastPayDay = Convert.ToDateTime(myDT.Day.ToString() + "/" + myDT.Month.ToString() + "/" + myDT.Year.ToString()); } else { myOplitis.lastPayDay = Convert.ToDateTime(lastPayDate.Text); } myBlayer.addOplitis(myOplitis); Page.Response.Redirect("anafora_prosthikis.aspx"); } catch (Exception ex) { errorMessage.Visible = true; errorMessage.Text = ex.Message.ToString(); } }
protected void anadromikaCalculate_Click(object sender, EventArgs e) { if (logosAnadromikon.SelectedIndex == 0) { BLayer myBlayer = new BLayer(); Oplitis myOplitis = new Oplitis(); myOplitis.id = Convert.ToInt32(aa.Text); anadromika.Text = myBlayer.anadromikaCalcLogoKatigorias(myOplitis).ToString(); posoPliromis.Text = anadromika.Text; DateTime mydatetime = new DateTime(); mydatetime = DateTime.Now; priromiDate.Text = mydatetime.Day.ToString() + "/" + mydatetime.Month.ToString() + "/" + mydatetime.Year.ToString(); } else if (logosAnadromikon.SelectedIndex == 1) { BLayer myBlayer = new BLayer(); Oplitis myOplitis = new Oplitis(); myOplitis.id = Convert.ToInt32(aa.Text); decimal poso = myBlayer.anadromikaCalcLogoApousias(myOplitis); anadromika.Text = poso.ToString(); posoPliromis.Text = anadromika.Text; DateTime mydatetime = new DateTime(); mydatetime = DateTime.Now; priromiDate.Text = mydatetime.Day.ToString() + "/" + mydatetime.Month.ToString() + "/" + mydatetime.Year.ToString(); } }
protected void deletedOplitis_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") { BLayer myBlayer = new BLayer(); Oplitis myOplitis = new Oplitis(); int row = Convert.ToInt32(e.CommandArgument); int id = Convert.ToInt32(deletedOplitis.DataKeys[row].Values["do_id"].ToString()); lastDeletedPaymentsPanel.Visible = true; myOplitis.id = id; SqlDataReader myDtr = myBlayer.get_pliromi_diagrammenou_opliti_by_id_opliti(myOplitis); LastPayments.DataSource = myDtr; LastPayments.DataBind(); } }
public Oplitis getRankById(Oplitis myOplitis) { Dal myDal = new Dal(); SqlDataReader dr = myDal.getRankByID(myOplitis); DataTable dt = new DataTable(); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myOplitis.rankID = Convert.ToInt32(row["op_rid"].ToString()); } return(myOplitis); }
protected void Submit_Click(object sender, EventArgs e) { try { Oplitis myOplitis = new Oplitis(); BLayer myBlayer = new BLayer(); myOplitis.id = Convert.ToInt32(id.Text); myOplitis.diagrafi = Convert.ToDateTime(deleteDate.Text); myBlayer.deleteOplitis(myOplitis); Response.Redirect("anafora_diagrafis.aspx"); } catch (Exception ex) { error.Text = ex.Message.ToString(); } }
public decimal anadromikaCalcLogoApousias(Oplitis myOplitis) { BLayer myBlayer = new BLayer(); Katigoria category = new Katigoria(); category = myBlayer.get_Katigoria_By_Id(myOplitis); decimal poso = category.katPliroteo; Pliromi myPliromi = new Pliromi(); myPliromi = myBlayer.get_Last_Pliromi_By_Opid(myOplitis); DateTime lastPayDate = myPliromi.PayDay; DateTime currentDate = DateTime.Now; int diafora = currentDate.Month - lastPayDate.Month; decimal anadromika = diafora * poso; return(anadromika); }
public void deleteOplitis(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("delete_oplitis", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@opid", myOplitis.id); cmd.Parameters.AddWithValue("@dateDiagrafis", myOplitis.diagrafi); try { cmd.ExecuteNonQuery(); } catch (Exception ex) { string error = ex.Message.ToString(); } }
public SqlDataReader getLastUpdatedOplitisDik(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("get_last_updated_oplitis_dik", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@opid", myOplitis.id); SqlDataReader myDtr = null; try { myDtr = cmd.ExecuteReader(); } catch (Exception ex) { string exmsg = ex.Message.ToString(); } return(myDtr); }
public SqlDataReader getLastPayment(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("last_payments", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@opid", myOplitis.id); SqlDataReader myDtr = null; try { myDtr = cmd.ExecuteReader(); } catch (Exception ex) { ex.ToString(); } return(myDtr); }
public SqlDataReader getDikaiologitikaPouExeiProskomiseiById(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("get_dik_pou_exei_proskomisei_by_id", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@opid", myOplitis.id); SqlDataReader myDtr = null; try { myDtr = cmd.ExecuteReader(); } catch (Exception ex) { ex.ToString(); } return(myDtr); }
public SqlDataReader getKatigoriaById(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("get_katigoria_by_oplitis_id", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@opid", myOplitis.id); SqlDataReader myDtr = null; try { myDtr = cmd.ExecuteReader(); } catch (Exception ex) { ex.ToString(); } return(myDtr); }
public decimal anadromikaCalcLogoKatigorias(Oplitis myOplitis) { Katigoria myKatigoria = new Katigoria(); Change myChange = new Change(); BLayer myBlayer = new BLayer(); myKatigoria = myBlayer.get_diafora_posou(myOplitis); decimal poso = myKatigoria.katDiafora; myChange = myBlayer.getChangeById(myOplitis); DateTime isxysMetabolis = myChange.changeIsxysDate; DateTime metaboliDate = myChange.changeDate; int monthIsxys = isxysMetabolis.Month; int monthMetaboli = metaboliDate.Month; int diafora = monthMetaboli - monthIsxys; decimal anadromika = poso * diafora; return(anadromika); }
public SqlDataReader getPliromiDiagarammenouOplitiByIdOpliti(Oplitis myOplitis) { SqlCommand cmd = new SqlCommand("get_pliromi_diagrammenou_by_id_diagrammenou", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@doid", myOplitis.id); SqlDataReader myDtr = null; try { myDtr = cmd.ExecuteReader(); } catch (Exception ex) { string error = ex.Message.ToString(); } return(myDtr); }
public Katigoria get_diafora_posou(Oplitis myOplitis) { Dal myDal = new Dal(); Katigoria myKatigoria = new Katigoria(); SqlDataReader dr = myDal.getDiaforaPosou(myOplitis); DataTable dt = new DataTable(); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myKatigoria.katDiafora = Convert.ToDecimal(row["diafora"].ToString()); myKatigoria.katPliroteoNew = Convert.ToDecimal(row["katPliroteo_new"].ToString()); myKatigoria.katPliroteoOld = Convert.ToDecimal(row["katPliroteo_old"].ToString()); myKatigoria.newKatName = row["katName_new"].ToString(); myKatigoria.oldKatName = row["katName_old"].ToString(); } return(myKatigoria); }
public Change getChangeById(Oplitis myOplitis) { Dal myDal = new Dal(); Change myChange = new Change(); SqlDataReader dr = myDal.getChangeById(myOplitis); DataTable dt = new DataTable(); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myChange.changeId = Convert.ToInt32(row["c_id"].ToString()); myChange.changeDate = Convert.ToDateTime(row["c_date"].ToString()); myChange.changeOldKatid = Convert.ToInt32(row["kat_id_old"].ToString()); myChange.changeOpid = Convert.ToInt32(row["c_opid"].ToString()); myChange.changeIsxysDate = Convert.ToDateTime(row["c_isxysDate"].ToString()); } return(myChange); }
public Katigoria get_Katigoria_By_Id(Oplitis myOplitis) { Dal myDal = new Dal(); Katigoria myKatigoria = new Katigoria(); DataTable dt = new DataTable(); SqlDataReader dr = myDal.getKatigoriaById(myOplitis); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myKatigoria.katPerigrafi = row["kat_name"].ToString(); myKatigoria.katKatalogisteo = Convert.ToDecimal(row["kat_katalogisteo"].ToString()); myKatigoria.katKratiseis = Convert.ToDecimal(row["kat_kratiseis"].ToString()); myKatigoria.katPliroteo = Convert.ToDecimal(row["kat_pliroteo"].ToString()); myKatigoria.katDXmas = Convert.ToDecimal(row["kat_dx"].ToString()); myKatigoria.katDPasxa = Convert.ToDecimal(row["kat_dp"].ToString()); } return(myKatigoria); }
public Pliromi get_Last_Pliromi_By_Opid(Oplitis myOplitis) { Dal myDal = new Dal(); Pliromi myPliromi = new Pliromi(); DataTable dt = new DataTable(); SqlDataReader dr = myDal.getLastPliromiByOpid(myOplitis); if (dr.HasRows) { dt.Load(dr); } foreach (DataRow row in dt.Rows) { myPliromi.Pliromi_opid = Convert.ToInt32(row["op_id"].ToString()); myPliromi.PliromiId = Convert.ToInt32(row["p_id"].ToString()); myPliromi.PayDay = Convert.ToDateTime(row["p_date"].ToString()); myPliromi.p_opasm = Convert.ToInt32(row["op_asm"].ToString()); myPliromi.bathmos = row["r_perigrafi"].ToString(); myPliromi.onoma = row["op_onoma"].ToString(); myPliromi.eponymo = row["op_eponymo"].ToString(); myPliromi.loxos = row["op_loxos"].ToString(); myPliromi.katName = row["kat_name"].ToString(); myPliromi.katalogisteo = Convert.ToDecimal(row["kat_katalogisteo"].ToString()); myPliromi.kratiseis = Convert.ToDecimal(row["kat_kratiseis"].ToString()); myPliromi.pliroteo = Convert.ToDecimal(row["kat_pliroteo"].ToString()); myPliromi.mPerigrafi = row["m_perigrafi"].ToString(); if (string.IsNullOrEmpty(row["p_posoPliromis"].ToString())) { myPliromi.Poso = Convert.ToDecimal("0,00"); } else { myPliromi.Poso = Convert.ToDecimal(row["p_posoPliromis"].ToString()); } } return(myPliromi); }
protected void Page_Load(object sender, EventArgs e) { BLayer myBlayer = new BLayer(); SqlDataReader myDtr = myBlayer.get_dikaiologitika_pou_exei_proskomisei(); BulletedList1.DataSource = myDtr; BulletedList1.DataBind(); Oplitis myOplitis = myBlayer.get_Last_Inserted_Oplitis(); insertDate.Text = myOplitis.eggrafi.ToString(); asm.Text = myOplitis.asm.ToString(); rank.Text = myOplitis.bathmos.ToString(); fname.Text = myOplitis.onoma.ToString(); lname.Text = myOplitis.eponymo.ToString(); loxos.Text = myOplitis.loxos.ToString(); LabelKatigoria.Text = myOplitis.katigoria.ToString(); paratiriseis.Text = myOplitis.paratiriseis.ToString(); katalogisteo.Text = myOplitis.katalogisteo.ToString(); kratiseis.Text = myOplitis.kratiseis.ToString(); pliroteo.Text = myOplitis.pliroteo.ToString(); dx.Text = myOplitis.dXmas.ToString(); dp.Text = myOplitis.dPasxa.ToString(); fdm.Text = myOplitis.fdmDate.ToString(); }
protected void RadioButtonListMisthodType_SelectedIndexChanged(object sender, EventArgs e) { BLayer myBlayer = new BLayer(); PanelAnadromika.Visible = false; if (RadioButtonListMisthodType.SelectedValue == "1") { if (!string.IsNullOrEmpty(katigoria.Text)) { Oplitis anotherOplitis = new Oplitis(); anotherOplitis.id = Convert.ToInt32(aa.Text); Katigoria myKatigoria = new Katigoria(); myKatigoria = myBlayer.get_Katigoria_By_Id(anotherOplitis); posoPliromis.Text = myKatigoria.katPliroteo.ToString(); DateTime mydatetime = new DateTime(); mydatetime = DateTime.Now; priromiDate.Text = mydatetime.Day.ToString() + "/" + mydatetime.Month.ToString() + "/" + mydatetime.Year.ToString(); priromiDate.ReadOnly = true; } } else if (RadioButtonListMisthodType.SelectedValue == "2") { if (!string.IsNullOrEmpty(katigoria.Text)) { int year; Oplitis anotherOplitis = new Oplitis(); anotherOplitis.id = Convert.ToInt32(aa.Text); Katigoria myKatigoria = new Katigoria(); myKatigoria = myBlayer.get_Katigoria_By_Id(anotherOplitis);; posoPliromis.Text = myKatigoria.katDXmas.ToString(); year = DateTime.Now.Year; DateTime mydatetime = new DateTime(year, 12, 16); priromiDate.Text = mydatetime.Day.ToString() + "/" + mydatetime.Month.ToString() + "/" + mydatetime.Year.ToString(); priromiDate.ReadOnly = false; } } else if (RadioButtonListMisthodType.SelectedValue == "3") { if (!string.IsNullOrEmpty(katigoria.Text)) { Oplitis anotherOplitis = new Oplitis(); anotherOplitis.id = Convert.ToInt32(aa.Text); Katigoria myKatigoria = new Katigoria(); myKatigoria = myBlayer.get_Katigoria_By_Id(anotherOplitis);; posoPliromis.Text = myKatigoria.katDPasxa.ToString(); priromiDate.ReadOnly = false; } } else if (RadioButtonListMisthodType.SelectedValue == "4") { PanelAnadromika.Visible = true; error2.Visible = false; priromiDate.ReadOnly = true; try { if (!string.IsNullOrEmpty(katigoria.Text)) { Oplitis myOplitis = new Oplitis(); myOplitis.id = Convert.ToInt32(aa.Text); Katigoria category = myBlayer.get_diafora_posou(myOplitis); currentKatigoria.Text = category.newKatName; oldKatigoria.Text = category.oldKatName; Change myChange = myBlayer.getChangeById(myOplitis); if (myChange.changeId == 0) { isxysKatigorias.Text = string.Empty; metaboliDate.Text = string.Empty; error2.Visible = true; error2.Text = "Ο επιλεγμένος οπλίτης δεν έχει καμία μεταβολή!"; anadromikaCalculate.Visible = false; } else if (currentKatigoria.Text == oldKatigoria.Text) { isxysKatigorias.Text = string.Empty; metaboliDate.Text = string.Empty; error2.Visible = true; error2.Text = "Ο επιλεγμένος οπλίτης δεν δικαιούται αναδρομικά!"; anadromikaCalculate.Visible = false; } else { isxysKatigorias.Text = myChange.changeIsxysDate.ToString(); metaboliDate.Text = myChange.changeDate.ToString(); } } } catch (Exception ex) { error.Visible = true; error.Text = ex.Message.ToString(); } } }