protected void FillDeliDetails(string filter, OracleCommand cmdList) { DataSet _dsDeli = new DataSet(); filter += " ORDER BY " + SortExpression + " " + SortDirect; _dsDeli = objDml.GetDeliverableInfo(filter, cmdList); ViewState["deli"] = _dsDeli.Tables["deli"]; DataView _newdv = new DataView(ViewState["deli"] as DataTable); int _count = 0; _count = _newdv.Count; if (_count > 0) { LblInfo.Visible = true; GVDeli.DataSource = _newdv; ImgBtnExport.Visible = true; } else { LblInfo.Visible = false; GVDeli.DataSource = null; ImgBtnExport.Visible = false; } string _appendText = ""; string _defaultText = ""; if (HdnPage.Value == "fy") { _defaultText = "You have"; _appendText = "remaining due this FY"; } else { _defaultText = "Found"; _appendText = "that matched your criteria:"; } LblInfo.Text = _defaultText + "<b> " + _count + " </b> items " + _appendText; GVDeli.DataBind(); if (ViewState["criteriatext"] != null) { LblFiltertext.Text = ViewState["criteriatext"].ToString(); } }
protected void FillDeliDetails(string filter, OracleCommand cmdList) { DataSet _dsDeli = new DataSet(); filter += " ORDER BY " + SortExpression + " " + SortDirect; _dsDeli = objDml.GetDeliverableInfo(filter, cmdList); ViewState["deli"] = _dsDeli.Tables["deli"]; DataView _newdv = new DataView(ViewState["deli"] as DataTable); string _view; string _deliIds = ""; string _deliIdforUser = ""; int _count = 0; if (!(null == Session["view"])) { _view = Session["view"].ToString(); //Session["view"] = null; if ((_view.Equals("owner")) || (_view.Equals("sso"))) { if (_view.Equals("owner")) { LblSearch.Text = "Search my Requirements or Deliverables:"; _deliIdforUser = GetDeliverablesAsList(objCommon.GetUserID()); if (_deliIdforUser != "") { if (LblSubtitle.Text == "") { LblSubtitle.Text = " Deliverables"; } if (!LblSubtitle.Text.Contains("Your")) { LblSubtitle.Text = " Your " + LblSubtitle.Text; } _deliIds = " DELIVERABLE_ID IN (" + _deliIdforUser + ")"; _newdv.RowFilter = _deliIds; } else { _newdv.RowFilter = " DELIVERABLE_ID = 0 "; } } else if (_view.Equals("sso")) { _deliIdforUser = GetDeliverablesAsList(objCommon.GetUserID(), userType: "appvr"); ViewState["deliappr"] = _deliIdforUser; if (HdnmySSO.Value == "Y") { if (_deliIdforUser != "") { if (LblSubtitle.Text == "") { LblSubtitle.Text = " Deliverables that need your approval "; } _deliIds = " DELIVERABLE_ID IN (" + _deliIdforUser + ")"; _newdv.RowFilter = _deliIds; } } } } } _count = _newdv.Count; if (_count > 0) { GVDeli.DataSource = _newdv; GVDeli.DataBind(); if (LblSubtitle.Text == "") { LblSubtitle.Text = "Deliverables"; } } else { LblInfo.Visible = false; if (LblSubtitle.Text != "") { GVDeli.EmptyDataText = "No Deliverables found that match your criteria "; LblSubtitle.Text = ""; } GVDeli.DataSource = null; GVDeli.DataBind(); } }