protected void Page_Load(object sender, EventArgs e) { String sError = ""; if (recID != null) { /*begin - load the child info*/ DataSet dsChildInfo = CChild.LoadSelectedChildInfo(recID, Convert.ToInt16(recType), serviceDate, Session["SessionID"].ToString(), "0"); txtChildName.Text = dsChildInfo.Tables[0].Rows[0]["FirstName"].ToString() + " " + dsChildInfo.Tables[0].Rows[0]["LastName"].ToString(); txtChildDOB.Text = AppData.FormatDateStr(dsChildInfo.Tables[0].Rows[0]["DOB"].ToString()); txtChildSSN.Text = dsChildInfo.Tables[0].Rows[0]["SSN"].ToString(); txtVendorName.Text = dsChildInfo.Tables[0].Rows[0]["VendorName"].ToString(); txtServiceDate.Text = AppData.FormatDateStr(dsChildInfo.Tables[0].Rows[0]["ServiceDate"].ToString()); //txtFunding.Text = dsChildInfo.Tables[0].Rows[0]["Funding"].ToString(); txtFunding.Text = funding; txtPlacement.Text = (placement == "0") ? "INITIAL ASSESSMENT" : "REASSESSMENT"; /*end - load the child info*/ } }
private void LoadFormContent() { /* we need to put all available form ID to a list because we need to use databind for the datalist*/ lstFormID = new SortedList(); for (int i = 0; i < formID.Length; i++) { lstFormID.Add(i, formID[i]); } string sError = ""; //if (HideNames == "") HideNames = Session["HideNames"].ToString(); dsChildInfo = CChild.LoadSelectedChildInfo(RecID, Convert.ToInt16(RecType), ServiceDate, Session.SessionID, HideNames); dsReviewerEntryInfo = CForms.GetReviewerEntryData(ref sError, RecID); authorizedAmount = dsChildInfo.Tables[0].Rows[0]["Authorized Amount"].ToString(); authorizedAmount = ((!string.IsNullOrEmpty(authorizedAmount)) ? Convert.ToDouble(authorizedAmount).ToString("N2") : "0.00"); placement = (dsChildInfo.Tables[0].Rows[0]["Autho Type"].ToString() == "N") ? "0" : "1"; /*begin - load the child info*/ childDetail.recID = RecID; childDetail.recType = RecType; childDetail.serviceDate = ServiceDate; childDetail.funding = Funding; childDetail.placement = placement; childDetail.dsChildInfo = dsChildInfo; childDetail.dsReviewerEntryInfo = dsReviewerEntryInfo; //childDetail.eID = eID; pageDetailTitle.eID = eID; pageDetailTitle.recID = RecID; pageDetailTitle.recType = RecType; pageDetailTitle.serviceDate = ServiceDate; pageDetailTitle.dsChildInfo0 = dsChildInfo; /*end - load the child info*/ lstForms.DataSource = lstFormID; DataBind(); Page.ClientScript.RegisterStartupScript(typeof(Page), "setFirstForm", "<script language='javascript'>javascript:SetCurrentForm('100')</script>"); /* begin - set data entry form */ txtDataEntryTotalPaid.Text = "$" + authorizedAmount; txtDataEntryMonth.Text = ServiceDate; txtDataEntryReviewDate.Text = AppData.FormatDateStr(DateTime.Now.ToShortDateString()); txtDataEntryChildID.Text = RecID; txtDataEntryCounty.Text = dsChildInfo.Tables[0].Rows[0]["county"].ToString(); txtDataEntryTotalPaidField.Value = authorizedAmount; txtDataEntryMonthField.Value = txtDataEntryMonth.Text; txtDataEntryReviewDateField.Value = txtDataEntryReviewDate.Text; txtDataEntryChildIDField.Value = RecID; txtDataEntryCountyField.Value = txtDataEntryCounty.Text; /* end - set data entry form */ strLastFormID = dsChildInfo.Tables[0].Rows[0]["LastFormID"].ToString(); hidLastFormID.Value = strLastFormID; if (Session["UserName"].ToString() == "IPFedUser") { Page.ClientScript.RegisterStartupScript(typeof(Page), "AllFormCompleted", "<script>displayAllCompleted()</script>"); btnMarkCaseComplete.Disabled = true; btnReviewerForm.Disabled = true; } else { if (Completed == "1") { Page.ClientScript.RegisterStartupScript(typeof(Page), "AllFormCompleted", "<script>displayAllCompleted()</script>"); btnMarkCaseComplete.Visible = false; if (Session["IsAdminUser"] != null) { if (Session["IsAdminUser"].ToString() == "1") { btnMarkCaseIncomplete.Visible = true; } } lblCompleted.Visible = true; } } }