public void ddlPerformancesload(int engmntid) { if (ddlPerformance.SelectedIndex > -1) { string ddlval = ddlPerformance.SelectedItem.Value; dtperformancelist = new DataTable(); ofcobj = new BoxOfficeData(); DataTable ds = new DataTable(); ds = ofcobj.LoadDiscountdata(Convert.ToInt32(hdn_engagementid.Value), Convert.ToInt32(ddlPerformance.SelectedItem.Value.ToString())); if (ds.Rows.Count > 0) { if (Convert.ToInt32(Convert.ToString(ds.Rows[0]["ScheduleCount"])) > 0) { lbl_staticmsg.Text = "Please enter data for all Performances, otherwise the reports will display the incorrect values."; } else { lbl_staticmsg.Text = string.Empty; } if (Convert.ToInt32(Convert.ToString(ds.Rows[0]["discount"])) > 0) { pnlcolumn.Visible = false; ddlPerformance.Visible = true; txtPerformance.Visible = false; } else { pnlcolumn.Visible = true; ddlPerformance.Visible = false; txtPerformance.Visible = false; lblcopyfrom.Visible = false; pnlCity.Visible = false; } filldatacalculations(ds); ucdocx.GetDocxDetails(Convert.ToInt32(ddlPerformance.SelectedItem.Value.ToString()), "Schedule"); tdcopyfrom.Visible = true; } else { tdcopyfrom.Visible = false; pnlcolumn.Visible = true; ddlPerformance.Visible = false; txtPerformance.Visible = false; lblcopyfrom.Visible = false; pnlCity.Visible = false; LoadPerformanceCopy(Convert.ToInt32(hdn_engagementid.Value)); showhidecopyfrom(false); } } }
protected void ddlPerformance_SelectedIndexChanged(object sender, EventArgs e) { Reset(); ofcobj = new BoxOfficeData(); DataTable ds = new DataTable(); ds = ofcobj.LoadDiscountdata(Convert.ToInt32(hdn_engagementid.Value), Convert.ToInt32(ddlPerformance.SelectedItem.Value.ToString())); if (ds.Rows.Count > 0) { filldatacalculations(ds); } else { LoadPerformanceCopy(Convert.ToInt32(hdn_engagementid.Value)); } //if (hdn_engagementid.Value != "" && hdn_schedulecount.Value != "0") //{ // if (ViewState["dtperformance"] == null) // { // dtperformancelist = ofcobj.GetPerformancelist(Convert.ToInt32(hdn_engagementid.Value)); // } // else // { // dtperformancelist = (ViewState["dtperformance"]) as DataTable; // } // DataTable value = performanceddlvalue(dtperformancelist); // if (value.Rows.Count > 0) // { // filldatacalculations(value); // } //} }