protected void Button1_Click(object sender, EventArgs e) { DataView dv3 = (DataView)SelectTag.Select(DataSourceSelectArguments.Empty); int taggg = (int)dv3.Table.Rows[0][0]; x = Convert.ToDouble(TextBox8.Text); y = Convert.ToDouble(TextBox3.Text); if (taggg == 4) { if (x == y) { TagUpdate.Update(); } } else if (taggg == 6) { if (x == y) { TagUpdate0.Update(); } } string sttt = ""; sttt = DateTime.Now.ToLongTimeString(); if (sttt.Length == 10) { sttt = "0" + sttt; } string post = sttt.Substring(9, 2); if (post == "PM") { int h = Convert.ToInt32(sttt.Substring(0, 2)) + 12; TTime.Text = h.ToString() + sttt.Substring(2, 6); } else { TTime.Text = sttt.Substring(0, 8); } y = x - y; TextBox6.Text = y.ToString(); PaymentInsert.Insert(); TextBox5.Text = DateTime.Now.ToShortDateString(); SqlDataSource1.Update(); LinkButton1.Enabled = true; Button3.Enabled = true; RangeValidator1.Visible = false; }
protected void Button1_Click(object sender, EventArgs e) { string sttt = ""; sttt = DateTime.Now.ToLongTimeString(); if (sttt.Length == 10) { sttt = "0" + sttt; } string post = sttt.Substring(9, 2); if (post == "PM") { int h = Convert.ToInt32(sttt.Substring(0, 2)) + 12; TTime.Text = h.ToString() + sttt.Substring(2, 6); } else { TTime.Text = sttt.Substring(0, 8); } deduct.Update(); UpdateTag.Update(); UpdateDate.Insert(); PaymentInsert.Insert(); DataView dv = (DataView)AfftectedSelect.Select(DataSourceSelectArguments.Empty); int x = 0; foreach (DataRow dr in dv.Table.Rows) { Session["rr"] = (int)dv.Table.Rows[x][0]; Session["gg"] = "Event Date Already Reserved"; ccancel.Insert(); } printhead.Visible = true; Button1.Enabled = false; TextBox3.ReadOnly = true; Button2.Enabled = false; }