Example #1
0
        internal string SaveQualityTest(IQualityTest iqt)
        {
            // gør noget effent med iqt i databasen
            iQualityTest.Add(iqt);

            return(null);
        }
Example #2
0
        internal string SaveQualityTest(IQualityTest iqt)
        {
            // gør noget effent med iqt i databasen
            iQualityTest.Add(iqt);

            return null;
        }
Example #3
0
        public IQualityTest getFullQualityTest(int ID)
        {
            IQualityTest result = null;

            SqlConnection conn = getConnection();
            //TODO lav en stored procedore der henter hele quality testen
            SqlCommand command = new SqlCommand("LoadFullQualityTest", conn);

            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@QualityTestID", ID));

            SqlDataReader sdr = command.ExecuteReader();

            while (sdr.Read())
            {
                DateTime date = Convert.ToDateTime(sdr["CheckedDate"]);
                string   qualityTestActivities = Convert.ToString(sdr["QualityTestActivities"]);
                string   expectedR             = Convert.ToString(sdr["expectedResult"]);
                string   employee = Convert.ToString(sdr["employee"]);
                string   comment  = Convert.ToString(sdr["comment"]);
                string   results  = Convert.ToString(sdr["result"]);
                bool     done     = (bool)sdr["done"];
                bool     approved = (bool)sdr["approved"];;

                result = Factory.GetFactory().GetQTF().CreateQualityTest(ID, date, qualityTestActivities, expectedR, employee, comment, results, approved, done);
            }
            conn.Close();
            conn.Dispose();
            return(result);
        }
        internal string CreateQualityTest(int prodID, DateTime?date,
                                          string qualityTestActivities, string expresults,
                                          string employee, string comments, string results)
        {
            IQualityTest iqt = Factory.GetFactory().GetQTF().CreateQualityTest(0, (DateTime)date, qualityTestActivities, expresults, employee, comments, results, false, false);

            Persistance.DBController.getController().createQualityTest(prodID, iqt);
            return("underway");
        }
Example #5
0
        public void saveQualityTest(IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("approveQualityTest", conn);

            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@QualityID", iq.getID()));
            command.Parameters.Add(new SqlParameter("@Comment", iq.getComment()));
            command.Parameters.Add(new SqlParameter("@Result", iq.getResult()));
            command.Parameters.Add(new SqlParameter("@Done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@Approved", iq.getApproved()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();
        }
Example #6
0
        public void createQualityTest(int prodID, IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("CreateQualityTestNoComments", conn);

            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@ProductionID", prodID));
            command.Parameters.Add(new SqlParameter("@CheckedDate", iq.getCheckedDate()));
            command.Parameters.Add(new SqlParameter("@QualityTestActivities", iq.getQTA()));
            command.Parameters.Add(new SqlParameter("@ExpectedResult", iq.getER()));
            command.Parameters.Add(new SqlParameter("@Employee", iq.getEmployee()));
            command.Parameters.Add(new SqlParameter("@Done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@Approved", iq.getApproved()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();
        }
Example #7
0
        public void changeQualityTest(IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("UpdateQualityTest", conn);

            command.CommandType = System.Data.CommandType.StoredProcedure;
            #region comments

            /*
             * @QualityTestID INT,
             * @checkedDate DATE,
             * @QualityTestActivities varchar(255),
             * @ExpectedResult varchar(255),
             * @employee varchar(255),
             * @comment varchar(255),
             * @result varchar(255),
             * @done BIT,
             * @approved BIT
             */
            #endregion

            command.Parameters.Add(new SqlParameter("@QualityTestID", iq.getID()));
            command.Parameters.Add(new SqlParameter("@CheckedDate", iq.getCheckedDate()));
            command.Parameters.Add(new SqlParameter("@QualityTestActivities", iq.getQTA()));
            command.Parameters.Add(new SqlParameter("@ExpectedResult", iq.getER()));
            command.Parameters.Add(new SqlParameter("@employee", iq.getEmployee()));
            command.Parameters.Add(new SqlParameter("@done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@approved", iq.getApproved()));
            command.Parameters.Add(new SqlParameter("@result", iq.getResult()));
            command.Parameters.Add(new SqlParameter("@comment", iq.getComment()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();
        }
 internal string GetQualityTest(int ID)
 {
     result = Persistance.DBController.getController().getQualityTest(ID);
     return(result.ToString());
 }
Example #9
0
        public void saveQualityTest(IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("approveQualityTest", conn);
            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@QualityID", iq.getID()));
            command.Parameters.Add(new SqlParameter("@Comment", iq.getComment()));
            command.Parameters.Add(new SqlParameter("@Result", iq.getResult()));
            command.Parameters.Add(new SqlParameter("@Done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@Approved", iq.getApproved()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();
        }
Example #10
0
        public void changeQualityTest(IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("UpdateQualityTest", conn);
            command.CommandType = System.Data.CommandType.StoredProcedure;
            #region comments
            /*
           @QualityTestID INT,
           @checkedDate DATE,
           @QualityTestActivities varchar(255),
           @ExpectedResult varchar(255),
           @employee varchar(255),
           @comment varchar(255),
           @result varchar(255),
           @done BIT,
           @approved BIT
           */
            #endregion

            command.Parameters.Add(new SqlParameter("@QualityTestID", iq.getID()));
            command.Parameters.Add(new SqlParameter("@CheckedDate", iq.getCheckedDate()));
            command.Parameters.Add(new SqlParameter("@QualityTestActivities", iq.getQTA()));
            command.Parameters.Add(new SqlParameter("@ExpectedResult", iq.getER()));
            command.Parameters.Add(new SqlParameter("@employee", iq.getEmployee()));
            command.Parameters.Add(new SqlParameter("@done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@approved", iq.getApproved()));
            command.Parameters.Add(new SqlParameter("@result", iq.getResult()));
            command.Parameters.Add(new SqlParameter("@comment", iq.getComment()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();

        }
Example #11
0
        public void createQualityTest(int prodID, IQualityTest iq)
        {
            SqlConnection conn = getConnection();

            SqlCommand command = new SqlCommand("CreateQualityTestNoComments", conn);
            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@ProductionID", prodID));
            command.Parameters.Add(new SqlParameter("@CheckedDate", iq.getCheckedDate()));
            command.Parameters.Add(new SqlParameter("@QualityTestActivities", iq.getQTA()));
            command.Parameters.Add(new SqlParameter("@ExpectedResult", iq.getER()));
            command.Parameters.Add(new SqlParameter("@Employee", iq.getEmployee()));
            command.Parameters.Add(new SqlParameter("@Done", iq.getDone()));
            command.Parameters.Add(new SqlParameter("@Approved", iq.getApproved()));

            command.ExecuteNonQuery();

            conn.Close();
            conn.Dispose();

        }
 internal string GetQualityTest(int ID)
 {
     result = Persistance.DBController.getController().getQualityTest(ID);
     return result.ToString();
 }