Пример #1
0
            public bool TableQuestionnaireDeleteAllRecords(ref string sRtnMsg)
            {
                string sSQL;
                LocalDB DB = new LocalDB();

                if (DB.TableExists(sDocQuestionnaireTableName))
                {

                    sSQL = "delete from " + sDocQuestionnaireTableName;
                    return DB.ExecuteSQL(sSQL, ref sRtnMsg);
                }
                else
                {
                    return true;
                }
            }
Пример #2
0
            public bool TableHeaderDeleteAllRecords(string sId, ref string sRtnMsg)
            {
                string sSQL;
                LocalDB DB = new LocalDB();

                if (DB.TableExists(sDocHeaderTableName))
                {

                    sSQL = "delete from " + sDocHeaderTableName + " where ID = '" + sId + "'";
                    return DB.ExecuteSQL(sSQL, ref sRtnMsg);
                }
                else
                {
                    return true;
                }
            }
Пример #3
0
            public bool SetLocalITPSectionQuestion(int iAutoId, string sId, int iSectionId, int iAnswer, string sComments)
            {
                string sSQL;
                int iYes = 0;
                int iNo = 0;
                int iNA = 0;
                LocalDB DB = new LocalDB();
                string sRtnMsg = "";
                string sCurrentDateAndTime = "";

                sCurrentDateAndTime = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss");

                switch (iAnswer)
                {
                    case 0:
                        iYes = 1;
                        break;
                    case 1:
                        iNo = 1;
                        break;
                    case 2:
                        iNA = 1;
                        break;
                }
                //Now the question should always exist so it should only be an update

                sSQL = "Update ITPQuestionnaireMst Set Yes=" + iYes + ",No=" + iNo + ",NA=" + iNA + ",Comments='" + sComments.Replace("'", "''") + "', Audit_DateStamp = '" + sCurrentDateAndTime + "' " +
                "where  ID='" + sId + "' and SectionID=" + iSectionId + " and AutoId = " + iAutoId;

                return DB.ExecuteSQL(sSQL, ref sRtnMsg);
            }
Пример #4
0
            public bool TableITPDocumentSectionDeleteAllRecords(ref string sRtnMsg)
            {
                string sSQL;
                LocalDB DB = new LocalDB();

                if (DB.TableExists(sITPDocumentSectionTableName))
                {

                    sSQL = "delete from " + sITPDocumentSectionTableName;
                    return DB.ExecuteSQL(sSQL, ref sRtnMsg);
                }
                else
                {
                    return true;
                }
            }
Пример #5
0
            public bool ITPProjectSectionDeleteAllSection10Items(string sId, ref string sRtnMsg)
            {
                string sSQL;
                LocalDB DB = new LocalDB();

                if (DB.TableExists(sITPSection10TableName))
                {

                    sSQL = "delete from " + sITPSection10TableName + " where ID = '" + sId + "'";
                    return DB.ExecuteSQL(sSQL, ref sRtnMsg);
                }
                else
                {
                    return true;
                }
            }