protected void Button2_Click(object sender, EventArgs e) { TextBox6.Text = GridView1.Rows[0].Cells[0].Text; TextBox5.Text = GridView1.Rows[0].Cells[5].Text; TextBox7.Text = GridView1.Rows[0].Cells[4].Text; if (TextBox2.Text == "12345") { Esoda_update_metaf.Update(); Kin_Logariasmon.Delete(); Kin_Logariasmon.Insert(); Kin_Logariasmon.Update(); Emvasmata_delete.Delete(); Exoda_Del.Delete(); GR_for_Delete.Delete(); Metafora_GR_Del.Update(); Metafora_GR_Del.Delete(); Metafora_Passport_3y.Update(); if (GridView1.Rows[0].Cells[7].Text == "12") { if (Convert.ToInt16(GridView1.Rows[0].Cells[8].Text) > 1) { O_C_Xrisi.Delete(); O_C_Xrisi.Update(); O_C_Xrisi.Insert(); Emvasmata_update_xrisi.Update(); Del_GR_leitoyrgikwn_Xrisi.Update(); Del_GR_leitoyrgikwn_Xrisi.Delete(); Del_GR_leitoyrgikwn_Xrisi.Insert(); } else { O_C_Xrisi_LT_1.Update(); O_C_Xrisi_LT_1.Delete(); O_C_Xrisi_LT_1.Insert(); } O_C_Xrisi_ALL.Update(); } ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Λάθος Κωδικός Διαγραφής !!!!');", true); } }
protected void Button2_Click(object sender, EventArgs e) { if (TextBox4.Text.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Δεν έχει επιλεγεί δαπάνη !!!!');", true); } else { if (TextBox2.Text == "12345") { Kin_Logariasmon.Delete(); Exoda_Del.Delete(); if (TextBox5.Text == "1.00") { Update_O_C.Update(); } if (TextBox5.Text == "2.00") { Exoda_Leit_O_C.Insert(); Exoda_Leit_O_C.Update(); } ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Λάθος Κωδικός Διαγραφής !!!!');", true); } } }