Ejemplo n.º 1
0
 protected void btnAddIndustrie_Click(object sender, EventArgs e)
 {
     if (cboIndustries.SelectedIndex > -1)
     {
         SupplierSurveyIndustriesSupplied industrie = getIndustrieSelectedFromDropDown();
         if (industrie != null)
         {
             supplier.SupplierSurvey.IndustriesSupplied.Add(industrie);
             bindIndustries();
         }
     }
 }
Ejemplo n.º 2
0
    protected void txtPrompt_ValueChanged(object sender, EventArgs e)
    {
        if (txtPrompt.Value.Trim() != "")
        {
            string[] prompt = txtPrompt.Value.Split('~');
            if (prompt[1] != "null" && prompt[1].Trim() != "")
            {
                switch (prompt[0])
                {
                case "i":
                    SupplierSurveyIndustriesSupplied industrie = new SupplierSurveyIndustriesSupplied();
                    industrie.IndustriesSupplied = prompt[1];
                    industrie.SupplierSurveyKey  = supplier.SupplierSurvey.Id;
                    if (industries_CRUD.create(industrie))
                    {
                        supplier.SupplierSurvey.IndustriesSupplied.Add(industrie);
                        loadDropDowns();
                        bindIndustries();
                    }
                    break;

                case "c":
                    SupplierSurveyCertification certification = new SupplierSurveyCertification();
                    certification.Certification     = prompt[1];
                    certification.SupplierSurveyKey = supplier.SupplierSurvey.Id;
                    if (certification_CRUD.create(certification))
                    {
                        supplier.SupplierSurvey.Certifications.Add(certification);
                        loadDropDowns();
                        bindCertifcations();
                    }
                    break;
                }
            }

            txtPrompt.Value = "";
        }
    }