Ejemplo n.º 1
0
        public static void ShowfromPage(string MessageId, MsgBuilder MessageBuilder, Page frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            MessageBuilder.MsgRepository[MessageId] = theMsg.ToString();
            string theDynamicMsg = MessageBuilder.BuildMessage(MessageId);

            Showfrompage(theDynamicMsg, theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName);
        }
Ejemplo n.º 2
0
        public static void ShowConfirm(string MessageId, MsgBuilder MessageBuilder, WebControl cntrlName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            MessageBuilder.MsgRepository[MessageId] = theMsg.ToString();
            string theDynamicMsg = MessageBuilder.BuildMessage(MessageId);

            ShowConfirm(theDynamicMsg, theMsg.Type.ToString(), theMsg.Buttons.ToString(), cntrlName);
        }
Ejemplo n.º 3
0
        public static void ShowforUpdatePanel(string MessageId, MsgBuilder MessageBuilder, Control frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            MessageBuilder.MsgRepository[MessageId] = theMsg.ToString();
            string theDynamicMsg = MessageBuilder.BuildMessage(MessageId);

            ShowforUpdatePanel(theDynamicMsg, theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName);
        }
Ejemplo n.º 4
0
        public static string GetMessage(string MessageId, MsgBuilder MessageBuilder, Control frmName = null)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            MessageBuilder.MsgRepository[MessageId] = theMsg.ToString();
            string theDynamicMsg = MessageBuilder.BuildMessage(MessageId);

            return(theDynamicMsg.ToString());
        }
Ejemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MessageId">For retrieving message from xml file corresponding to MessageId</param>
        /// <param name="MessageBuilder">Send user defined message</param>
        /// <param name="frmName">The form control on which message will be shown</param>
        public static DialogResult ShowWindowConfirm(string MessageId, MsgBuilder MessageBuilder, System.Windows.Forms.Control frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            MessageBuilder.MsgRepository[MessageId] = theMsg.ToString();
            string theDynamicMsg = MessageBuilder.BuildMessage(MessageId);

            //ShowConfirm(theDynamicMsg, theMsg.Type.ToString(), theMsg.Buttons.ToString(), cntrlName);
            return(ShowWindow(theDynamicMsg, theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName));
        }
Ejemplo n.º 6
0
        public static void ShowConfirm(string MessageId, WebControl cntrlName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            ShowConfirm(theMsg.ToString(), theMsg.Type.ToString(), theMsg.Buttons.ToString(), cntrlName);
        }
Ejemplo n.º 7
0
        public static void ShowforUpdatePanel(string MessageId, Control frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            ShowforUpdatePanel(theMsg.ToString(), theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName);
        }
Ejemplo n.º 8
0
        public static string GetMessage(string MessageId, Control frmName = null)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            return(theMsg.ToString());
        }
Ejemplo n.º 9
0
        private Boolean ValidationFormData()
        {
            if (rcbOrderBy.SelectedValue == "")
            {
                //lblmessage.Text = "Date of Last Actual Contact cannot be blank.";
                RawMessage theMsg = MsgRepository.GetMessage("IQTouchOrderedByName");
                RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                return(false);
            }
            //if (rcbReportedBy.SelectedValue == "")
            //{
            //    //lblmessage.Text = "Date of Last Actual Contact cannot be blank.";
            //    RawMessage theMsg = MsgRepository.GetMessage("IQTouchReportedByName");
            //    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
            //    return false;

            //}
            if (RadDateOrder.DbSelectedDate == null)
            {
                //lblmessage.Text = "Date of Last Actual Contact cannot be blank.";
                RawMessage theMsg = MsgRepository.GetMessage("IQTouchOrderDate");
                RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                return(false);
            }
            //if (RadDateReportDate.DbSelectedDate == null)
            //{
            //    //lblmessage.Text = "Date of Last Actual Contact cannot be blank.";
            //    RawMessage theMsg = MsgRepository.GetMessage("IQTouchReportedDate");
            //    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
            //    return false;

            //}
            if (hiddTestID.Value == "")
            {
                //lblmessage.Text = "Date of Last Actual Contact cannot be blank.";
                RawMessage theMsg = MsgRepository.GetMessage("IQTouchSubTestID");
                RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                return(false);
            }
            // Date Validation

            if (Convert.ToDateTime(RadDateOrder.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
            {
                RawMessage theMsg = MsgRepository.GetMessage("IQTouchLabOrderDate");
                RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                return(false);
            }

            //if (Convert.ToDateTime(RadDateReportDate.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
            //{
            //    RawMessage theMsg = MsgRepository.GetMessage("IQTouchlabOrderReportedByDate");
            //    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
            //    return false;
            //}
            //if (Convert.ToDateTime(RadDateOrder.SelectedDate.Value) > Convert.ToDateTime(RadDateReportDate.SelectedDate.Value))
            //{
            //    RawMessage theMsg = MsgRepository.GetMessage("IQTouchlabOrderDateCompReportedDate");
            //    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
            //    return false;

            //}



            return(true);
        }
Ejemplo n.º 10
0
        public static void Show(string MessageId, Page frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            Show(theMsg.ToString(), theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName);
        }
Ejemplo n.º 11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MessageId">For retrieving message from xml file corresponding to MessageId </param>
        /// <param name="frmName">The form control on which message will be shown</param>
        public static DialogResult ShowWindowConfirm(string MessageId, Control frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            return(ShowWindow(theMsg.ToString(), theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName));
        }
Ejemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MessageId">For retrieving message from xml file corresponding to MessageId </param>
        /// <param name="frmName">The form control on which message will be shown</param>
        public static void ShowWindow(string MessageId, System.Windows.Forms.Control frmName)
        {
            RawMessage theMsg = MsgRepository.GetMessage(MessageId);

            ShowWindow(theMsg.ToString(), theMsg.Type.ToString(), theMsg.Buttons.ToString(), frmName);
        }
Ejemplo n.º 13
0
        private Boolean ValidationFormData()
        {
            if (dtDateBCG.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateBCG.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtOPV0Date.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtOPV0Date.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateOPV1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateOPV1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateRV1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateRV1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateDTaP1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateDTaP1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateHepB1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateHepB1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDatePCV1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDatePCV1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateDTaP2.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateDTaP2.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateHepB2.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateHepB2.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateDTaP3.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateDTaP3.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateHepB3.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateHepB3.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDatePCV2.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDatePCV2.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateRV2.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateRV2.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateMeasles1.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateMeasles1.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDatePVC3.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDatePVC3.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateMeasles2.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateMeasles2.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateDTaP4.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateDTaP4.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateTd6Yrs.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateTd6Yrs.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }
            if (dtDateTd23Yrs.SelectedDate != null)
            {
                if (Convert.ToDateTime(dtDateTd23Yrs.SelectedDate.Value) > Convert.ToDateTime(DateTime.Today))
                {
                    RawMessage theMsg = MsgRepository.GetMessage("IQTouchImmunisationDate");
                    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "src1", "FormValidatedOnSubmit('" + theMsg.Text + "');", true);
                    return(false);
                }
            }

            return(true);
        }