public void BindCSTIssueSearch(bool visible, string context, PSsqmEntities ctx) { pnlCSTIssueSearch.Visible = visible; dmPeriodFrom.SelectedDate = DateTime.Now.AddMonths(-6); dmPeriodTo.SelectedDate = DateTime.Now.AddMonths(1); dmPeriodFrom.ShowPopupOnFocus = dmPeriodTo.ShowPopupOnFocus = true; switch (context) { case "RCV": lblPlantSelect.Text = hfRCVPlantSelect.Value; if (SQMModelMgr.ReceiptCount(ctx) > 0) { btnReceiptSearch.Visible = true; } break; default: lblPlantSelect.Text = hfCSTPlantSelect.Value; btnReceiptSearch.Visible = false; break; } }