예제 #1
0
        private void DataEntryController1_DoLookup(object sender, DataEntryFramework.LookupEventArgs e)
        {
            try
            {
                // user must select a study measure to lookup
                if (DataEntryController1.LookupStudyMeasID == -1)
                {
                    throw new Exception("Select a study measure to lookup.");
                }
                else if (DataEntryController1.LookupTextBox1Text.Trim() == string.Empty)
                {
                    throw new Exception("Enter a Subject ID to lookup.");
                }

                // redirect user to lookup form.
                this.Response.Redirect(string.Format("DAS_lookup.aspx" + "?id={0}&studymeasid={1}", DataEntryController1.LookupTextBox1Text.Trim(), DataEntryController1.LookupStudyMeasID));
            }
            catch (Exception e2)
            {
                DataEntryController1.AddNotification(e2.Message);
                DataEntryController1.FormError = true;

                // Skip default processing
                DataEntryController1.FormEventHandled = true;
            }
        }
예제 #2
0
        protected void DataEntryController1_DoScore(object sender, System.EventArgs e)
        {
            try
            {
                //set parameters for score sp call
                sqlScoreADOSGeneric.Parameters["@ados_pk"].Value = DataEntryController1.PrimaryKeyVal;

                this.sqlDataConnection.Open();
                this.sqlScoreADOSGeneric.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                DataEntryController1.AddNotification(string.Format("An exception ocurred while scoring: {0}", ex.Message));
                DataEntryController1.FormError = true;
            }
            finally
            {
                this.sqlDataConnection.Close();
            }
        }
예제 #3
0
        protected void DataEntryController1_DoScore(object sender, System.EventArgs e)
        {
            try
            {
                //set parameters for score sp call
                this.sqlScoreWechslerIQGeneric.Parameters["@wechsleriq_pk"].Value = DataEntryController1.PrimaryKeyVal;

                this.sqlDataConnection.Open();

                // this statement can throw an SqlException if any errors occur in spScoreMullen
                this.sqlScoreWechslerIQGeneric.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                DataEntryController1.AddNotification(string.Format("An exception ocurred while scoring: {0}", ex.Message));
                DataEntryController1.FormError = true;
            }
            finally
            {
                this.sqlDataConnection.Close();
            }
        }
예제 #4
0
 protected void DataEntryController1_DoScore(object sender, EventArgs e)
 {
     try
     {
         using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["DATA_CONN_STRING"].ConnectionString))
         {
             SqlCommand cmd = new SqlCommand();
             cmd.Connection  = conn;
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.CommandText = "spScoreWMSDetail_ALL";
             cmd.Parameters.AddWithValue("@pk", DataEntryController1.PrimaryKeyVal);
             cmd.Parameters.AddWithValue("@studymeasid", DataEntryController1.StudyMeasID);
             conn.Open();
             cmd.ExecuteNonQuery();
         }
     }
     catch (Exception ex)
     {
         DataEntryController1.AddNotification(string.Format("An exception ocurred while scoring: {0}", ex.Message));
         DataEntryController1.FormError = true;
     }
 }