// Checks EForm Registry to see if form should autoprint when approved protected bool PromptForPrint() { XmlNode node = CaisisConfiguration.GetEFormNode(this.EFormName); if (node != null) { XmlAttribute nodeAtt = node.Attributes["promptForPrint"]; if (nodeAtt != null) { return(nodeAtt.Value.Length > 0 && nodeAtt.Value.ToLower() == "true"); } } return(false); }
protected void SetReferralMDList() { XmlNode configNode = CaisisConfiguration.GetEFormNode(this.EFormName); if (configNode != null) { XmlAttribute att = configNode.Attributes["enableReferrals"]; if (att != null) { bool doEnable = bool.Parse(att.Value); if (doEnable) { referToPanelContainer.Visible = true; //UserDa uDa = new UserDa(); //DataTable uDt = uDa.GetUsersByAttributeValue("EForm Referee", "true"); //DataView uDv = uDt.DefaultView; //uDv.Sort = BOL.User.UserLastName + " ASC"; //AppointmentDa da = new AppointmentDa(); //DataTable dt = da.GetUsersWithAppointments(); //DataView uDv = dt.DefaultView; AppointmentDa da = new AppointmentDa(); DataTable dt = da.GetUsersWithAppointments(); List <string> UsersWithAppointments = (from row in dt.AsEnumerable() select row.Field <string>(BOL.User.UserName)).ToList <string>(); // add referral recipients DataTable uDt = ReferralRecipientsToGetLimitedData(); List <string> RECIPIENTS_TO_GET_LIMITED_DATA = (from row in uDt.AsEnumerable() select row.Field <string>(BOL.User.UserName)).ToList <string>(); UserDa userDa = new UserDa(); foreach (string refUserName in RECIPIENTS_TO_GET_LIMITED_DATA) { // check if user is already in list if (!UsersWithAppointments.Contains(refUserName)) { // include the "additional" users in list even if they don't have appointments DataTable userDt = userDa.GetByUserName(refUserName).Tables[0]; if (userDt.Rows.Count > 0) { dt.Rows.Add(userDt.Rows[0].ItemArray); } } } DataView uDv = dt.DefaultView; uDv.Sort = "UserLastName ASC"; if (uDv.Count > 0) { NoEFormReferees.Visible = false; ReferToRptr.DataSource = uDv; ReferToRptr.DataBind(); } } } } }