public void RaisePostBackEvent(string eventArgument) { string[] args = eventArgument.Split('_'); if (args[0] == "gvQueue") { hdnSelectedQueueRow.Text = args[1]; hdnSelectedQueueID.Text = gvQueue.DataKeys[Int32.Parse(hdnSelectedQueueRow.Text)]["schedule_id"].ToString(); btnQueueDelete.Visible = true; txtName.Text = ""; tsTime.Text = ""; foreach (ListItem li in rbScheduleType.Items) { li.Selected = false; } foreach (ListItem li in rblAction.Items) { li.Selected = false; } chkSunday.Checked = false; chkSaturday.Checked = false; chkMonday.Checked = false; chkTuesday.Checked = false; chkWednesday.Checked = false; chkThursday.Checked = false; chkFriday.Checked = false; loadDDLs(); } else if (args[0] == "gvRecurring" && txtName.Text != "") { hdnSelectedRecurringRow.Text = args[1]; hdnSelectedRecurringID.Text = gvRecurring.DataKeys[Int32.Parse(hdnSelectedRecurringRow.Text)]["recurring_id"].ToString(); hdnSelectedRecurringName.Text = gvRecurring.DataKeys[Int32.Parse(hdnSelectedRecurringRow.Text)]["schedule_name"].ToString(); btnUpdate.Visible = true; btnDelete.Visible = true; loadDetails(); alert.Visible = false; txtExportSchedule.Text = OSAEScheduleManager.ScheduleExport(hdnSelectedRecurringName.Text); } else if (args[0] == "gvRecurring" && txtName.Text == "") { hdnSelectedRecurringRow.Text = args[1]; hdnSelectedRecurringID.Text = gvRecurring.DataKeys[Int32.Parse(hdnSelectedRecurringRow.Text)]["recurring_id"].ToString(); hdnSelectedRecurringName.Text = gvRecurring.DataKeys[Int32.Parse(hdnSelectedRecurringRow.Text)]["schedule_name"].ToString(); btnUpdate.Visible = false; btnDelete.Visible = true; loadDetails(); alert.Visible = false; } }
protected void Page_PreRender(object sender, EventArgs e) { if (hdnSelectedQueueRow.Text != "") { gvQueue.Rows[Int32.Parse(hdnSelectedQueueRow.Text)].Attributes.Remove("onmouseout"); gvQueue.Rows[Int32.Parse(hdnSelectedQueueRow.Text)].Style.Add("background", "lightblue"); } if (hdnSelectedRecurringRow.Text != "") { gvRecurring.Rows[Int32.Parse(hdnSelectedRecurringRow.Text)].Attributes.Remove("onmouseout"); gvRecurring.Rows[Int32.Parse(hdnSelectedRecurringRow.Text)].Style.Add("background", "lightblue"); } txtPickedDate.Text = txtPickedDate.Text; txtExportSchedule.Text = OSAEScheduleManager.ScheduleExport(hdnSelectedRecurringName.Text); }