protected void Button1_Click(object sender, EventArgs e) { Proig_Xrisis.DataBind(); Calc_Sum_Poig_Metaf.DataBind(); TextBox2.Text = GridView2.Rows[0].Cells[0].Text; TextBox5.Text = GridView2.Rows[0].Cells[1].Text; Session["Calc_SUM_GR_Etos"] = TextBox2.Text; }
protected void Page_Load(object sender, EventArgs e) { // if (!string.IsNullOrEmpty((string)Session["Del_GR_Etos"])) // { // TextBox1.Text = (string)Session["Del_GR_Etos"]; // } TextBox4.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia().ToString(); if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() == 1) { TextBox5.Visible = true; } else { TextBox5.Visible = false; } if (!string.IsNullOrEmpty((string)Session["Last_GR_Etos"])) { Int32 ConLast; ConLast = Convert.ToInt32((string)Session["Last_GR_Etos"]); TextBox1.Text = Convert.ToString(ConLast - 1); string Xrisi = TextBox1.Text; string strConn1; strConn1 = WebConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; SqlConnection Conn = new SqlConnection(strConn1); Conn.Open(); string sqltitle1; sqltitle1 = "SELECT ISNULL(MAX(Int1),1) FROM Xrisi"; sqltitle1 += " WHERE (Etos ='" + Xrisi + "')"; SqlCommand com = new SqlCommand(sqltitle1, Conn); Int32 CurrentQty2; CurrentQty2 = Convert.ToInt32(com.ExecuteScalar()); TextBox3.Text = Convert.ToString(CurrentQty2); Proig_Xrisis.DataBind(); Calc_Sum_Poig_Metaf.DataBind(); } }