Ejemplo n.º 1
0
        public void TemplateSelector_GotFocus(object sender, EventArgs e)
        {
            DataSet clDs = DBConnection.getDBConnectionToInstance().getDataSet("SELECT TemplateName FROM CreateTemplate");

            cbCl.DataSource    = clDs.Tables[0];
            cbCl.DisplayMember = "templateName";
        }
Ejemplo n.º 2
0
 public void fillEditOptionComment()
 {
     foreach (int optionCommentEditElement in editTemplate.opID)
     {
         DBConnection.getDBConnectionToInstance().fillOptionComment(Constants.SQLFillEditOptionTitle, optionCommentEditElement);
     }
 }
Ejemplo n.º 3
0
        static List <string> getTemplateNames()
        {
            //gets the templatenames
            List <string> templateNames = DBConnection.getDBConnectionToInstance().displayTemplateNames(Constants.select);

            return(templateNames);
        }
Ejemplo n.º 4
0
 public void getLastestRemoveOptionsID()
 {
     foreach (int optionIDElement in sectID)
     {
         int temporarySectId = optionIDElement;
         DBConnection.getDBConnectionToInstance().getRemoveOptionId(Constants.getRemoveOptionID, temporarySectId);
     }
 }
Ejemplo n.º 5
0
        public void getOptComments()
        {
            int count = optionID.Count();

            for (int i = 0; i < count; i++)
            {
                optionComment.Add(DBConnection.getDBConnectionToInstance().getTempOptComment(Constants.searchOptComment, optionID[i]));
            }
        }
Ejemplo n.º 6
0
        public void getOptTitles()
        {
            int count = optionID.Count;

            for (int i = 0; i < count; i++)
            {
                optionTitle.Add(DBConnection.getDBConnectionToInstance().getTempOptTitle(Constants.searchOptTitle, optionID[i]));
            }
        }
Ejemplo n.º 7
0
        private void TemplateSelector_Load(object sender, EventArgs e)
        {
            DataSet clDs = DBConnection.getDBConnectionToInstance().getDataSet("SELECT templateName FROM createTemplate");

            cbCl.DataSource    = clDs.Tables[0];
            cbCl.DisplayMember = "templateName";
            // TODO: This line of code loads data into the 'templateNameDataSet.createTemplate' table. You can move, or remove it, as needed.
            this.createTemplateTableAdapter.Fill(this.templateNameDataSet.createTemplate);
        }
Ejemplo n.º 8
0
        public void wasChanged()
        {
            if ((string)TemplateNameTextboxData.Tag != TemplateNameTextboxData.Text)
            {
                DBConnection.getDBConnectionToInstance().updateTemp(Constants.SQLUpdateTemplate, editTemplate.tempEditID);
            }

            if ((string)TemplateReviewerTextboxData.Tag != TemplateReviewerTextboxData.Text)
            {
                DBConnection.getDBConnectionToInstance().updateTempReviewer(Constants.SQLUpdateTemplateReviewer, editTemplate.tempEditID);
            }

            if ((string)TemplatePositionTextboxData.Tag != TemplatePositionTextboxData.Text)
            {
                DBConnection.getDBConnectionToInstance().updateTempPosition(Constants.SQLUpdateTemplatePosition, editTemplate.tempEditID);
            }

            foreach (int update in editTemplate.sectID)
            {
                if ((string)sectionTitleTextboxData[DBConnection.updateSectionTitleIndex].Tag != sectionTitleTextboxData[DBConnection.updateSectionTitleIndex].Text)
                {
                    DBConnection.getDBConnectionToInstance().updateSectionTitle(Constants.SQLUpdateSectionTitle, update);
                    DBConnection.updateSectionTitleIndex += 1;
                }
                else
                {
                    DBConnection.updateSectionTitleIndex += 1;
                }
            }

            foreach (int update in editTemplate.opID)
            {
                if ((string)optionTitleTextboxData[DBConnection.updateOptionTitleIndex].Tag != optionTitleTextboxData[DBConnection.updateOptionTitleIndex].Text)
                {
                    DBConnection.getDBConnectionToInstance().updateOptionsTitle(Constants.SQLUpdateOptionsTitle, update);
                    DBConnection.updateOptionTitleIndex += 1;
                }
                else
                {
                    DBConnection.updateOptionTitleIndex += 1;
                }
            }

            foreach (int update in editTemplate.opID)
            {
                if ((string)optionCommentTextboxData[DBConnection.updateCommentIndex].Tag != optionCommentTextboxData[DBConnection.updateCommentIndex].Text)
                {
                    DBConnection.getDBConnectionToInstance().updateOptionsComment(Constants.SQLUpdateOptionsComment, update);
                    DBConnection.updateCommentIndex += 1;
                }
                else
                {
                    DBConnection.updateCommentIndex += 1;
                }
            }
        }
Ejemplo n.º 9
0
        private void dataGridView1__Load(object sender, DataGridViewCellEventArgs e)
        {
            // populate the GridView
            DataSet dsPerson = DBConnection.getDBConnectionToInstance().getDataSet("SELECT * FROM createTemplate");
            //get the only table in the dataset person
            DataTable table = dsPerson.Tables[0];

            //set up the data grid view
            dataGridView1.DataSource = table;
        }
Ejemplo n.º 10
0
        public void getOptIDs()
        {
            List <int> a     = new List <int>();
            int        count = sectionID.Count();

            for (int i = 0; i < count; i++)
            {
                a = DBConnection.getDBConnectionToInstance().getTempOptID(Constants.searchOptID, sectionID[i]);
                optionsCount.Add(a.Count());
                optionID.AddRange(a);
            }
        }
Ejemplo n.º 11
0
        public void removeChosenTemplate()
        {
            foreach (int optionElement in opID)
            {
                DBConnection.getDBConnectionToInstance().removeOption(Constants.RemoveOption, optionElement);
            }

            foreach (int sectionElement in sectID)
            {
                DBConnection.getDBConnectionToInstance().removeSection(Constants.RemoveSection, sectionElement);
            }

            DBConnection.getDBConnectionToInstance().removeTemplate(Constants.RemoveTemplate, tempID);
        }
Ejemplo n.º 12
0
 public void getTPosition()
 {
     templatePosition = DBConnection.getDBConnectionToInstance().getTempPosition(Constants.searchTPos, templateID);
 }
Ejemplo n.º 13
0
 public void getLatestRemoveSectionID()
 {
     DBConnection.getDBConnectionToInstance().getRemoveSectionID(Constants.getRemoveSectionID, tempID);
 }
Ejemplo n.º 14
0
 public void getLatestRemoveTemplateID()
 {
     DBConnection.getDBConnectionToInstance().getRemoveTemplateID(Constants.getRemoveTemplateID, templateRemoveName);
 }
 //writeNameToDB Runs the InsertSectioName SQL Statement to Insert Section Name and Template ID to table
 public void writeNameToDB()
 {
     DBConnection.getDBConnectionToInstance().insertSectionTitle(Constants.InsertSectionName, sectionNameOne, tempID);
 }
 //getLatestTemplateID Runs the getTemplateID SQL Statement with DB Conenction Instance
 public void getLatestTemplateID()
 {
     DBConnection.getDBConnectionToInstance().getTempTemplateID(Constants.getTempTemplateID);
 }
Ejemplo n.º 17
0
 public void getSecIDs()
 {
     sectionID = DBConnection.getDBConnectionToInstance().getTempSecID(Constants.searchSecID, templateID);
 }
Ejemplo n.º 18
0
 public void fillEditSection()
 {
     DBConnection.getDBConnectionToInstance().fillSection(Constants.SQLFillEditSection, editTemplate.tempEditID);
 }
Ejemplo n.º 19
0
 public void createEditOption()
 {
     DBConnection.getDBConnectionToInstance().makeTemplateOption(Constants.SQLCreateEditOption, editTemplate.sectID[optionCount]);
     optionCount += 1;
 }
 public void getLatestEditSectionID()
 {
     DBConnection.getDBConnectionToInstance().getEditSectionID(Constants.getEditSectionID, tempEditID);
 }
 public void getLatestEditTemplateID()
 {
     DBConnection.getDBConnectionToInstance().getEditTemplateID(Constants.getEditTemplateID, templateEditName);
 }
Ejemplo n.º 22
0
 public void getTReviewer()
 {
     templateReviewer = DBConnection.getDBConnectionToInstance().getTempReviewer(Constants.searchTRev, templateID);
 }
Ejemplo n.º 23
0
 //Gets the Database Connection and Runs the SQL Statement.
 public void writeOptionDetailsToDB()
 {
     DBConnection.getDBConnectionToInstance().insertOption(Constants.InsertOption, optionTitleOne, optionCommentOne, secID);
 }
Ejemplo n.º 24
0
 //Gets the Database Connection and Runs the SQL Statement.
 public void getLatestsectionID()
 {
     DBConnection.getDBConnectionToInstance().getSectioneID(Constants.getSectionsID);
 }
Ejemplo n.º 25
0
 public void getSecTitles()
 {
     sectionTitle = DBConnection.getDBConnectionToInstance().getTempSecTitle(Constants.searchSecTitle, templateID);
 }
Ejemplo n.º 26
0
 public void getTID()
 {
     templateID = DBConnection.getDBConnectionToInstance().getTempID(Constants.searchTID, templateName);
 }
 //Gets the Database Connection and Runs the SQL Statement.
 public void writeTemplateDetailsToDB()
 {
     DBConnection.getDBConnectionToInstance().insertTemplate(Constants.Insert, templateNameOne, templateReviewerOne, templatePositionOne);
 }