Esempio n. 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            string st = txtCompanyName.Text;

            IFormatProvider provider          = new System.Globalization.CultureInfo("en-CA", true);
            DateTime        HSEQSubmittedDate = DateTime.Parse(txtHSEQSubmittedDate.Text.Trim(), provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault);

            TechnicalBAL objbal = new TechnicalBAL();
            int          x      = objbal.ins_ASL_DTL_Supplier_HSEQ(
                Session["SupplierCode"].ToString(), txtCompanyName.Text.Trim(), txtOperations.Text.Trim(), txtAddress.Text.Trim(), txtCountry.Text.Trim(),
                txtPhone.Text.Trim(), txtFax.Text.Trim(), txtEmail.Text.Trim(), txtWebsiet.Text.Trim(), txtPIC.Text.Trim(), txtEmergencyContactNo.Text.Trim(),
                txtSizeTurnover.Text.Trim(), txtAgeOfBusiness.Text.Trim(), txtServicesProvided.Text.Trim(), "", ddlRegulatoryControl.Text.Trim(),
                txtRegulatoryControlRemarks.Text.Trim(), txtCustomer1Name.Text.Trim(), txtCustomer2Name.Text.Trim(), txtCustomer3Name.Text.Trim(), txtCustomer1Years.Text.Trim(),
                txtCustomer2Years.Text.Trim(), txtCustomer3Years.Text.Trim(), txtServiceDescription1.Text.Trim(), txtServiceDescription2.Text.Trim(), txtServiceDescription3.Text.Trim(), Convert.ToInt32(txtHoursWorkedYTD.Text.Trim()),
                Convert.ToInt32(txtHoursWorked2Yrs.Text.Trim()), Convert.ToInt32(txtFatalInjuriesYTD.Text.Trim()), Convert.ToInt32(txtFatalInjuries2Yrs.Text.Trim()), Convert.ToInt32(txtLostDayInjuriesYTD.Text.Trim()),
                Convert.ToInt32(txtLostDayInjuries2Yrs.Text.Trim()), Convert.ToInt32(txtIncidenceRateYTD.Text.Trim()), Convert.ToInt32(txtIncidenceRate2Yrs.Text.Trim()), txtGovernmentInsp3Yrs.Text.Trim(), txtSignificantIncidents3Yrs.Text.Trim(),
                ddlInsuranceIndemity.Text.Trim(), txtInsuranceIndemityRemarks.Text.Trim(), ddlQualityAssurance.Text.Trim(), txtQualityAssuranceRemarks.Text.Trim(), "",
                ddlTrainingNewEmployees.Text.Trim(), txtTrainingNewEmployeesRemarks.Text.Trim(), ddlTrainingExisitingEmployees.Text.Trim(), txtTrainingExisitingEmployeesRemarks.Text.Trim(),
                txtClientList.Text.Trim(), ddlIncidentReporting.Text.Trim(), txtIncidentReportingRemarks.Text.Trim(), ddlNearMissReporting.Text.Trim(), txtNearMissReportingRemarks.Text.Trim(),
                ddlSafetyEquipment.Text.Trim(), txtSafetyEquipmentRemarks.Text.Trim(), "", ddlEmployeeEquipTraining.Text.Trim(),
                txtEmployeeEquipTrainingRemarks.Text.Trim(), txtContractorEquipTrainingRemark.Text.Trim(), ddlContractorEquipTraining.Text.Trim(),
                ddlCleanWorkingEnvironment.Text.Trim(), txtCleanWorkingEnvironmentRemarks.Text.Trim(), ddlEquipmentCalibration.Text.Trim(), ddlCalibrationCertificates.Text.Trim(),
                txtEquipmentCalibrationRemarks.Text.Trim(), txtCalibrationCertificatesRemarks.Text.Trim(), txtClientFamiliarizationVisitsRemarks.Text.Trim(), ddlClientFamiliarizationvisits.Text.Trim(),
                ddlMeetStandardRequirements.Text.Trim(), txtMeetStandardRequirementsRemarks.Text.Trim(), HSEQSubmittedDate, txtHSEQSubmittedBy.Text.Trim(),
                ddlESMCompetitiveQuote.Text.Trim(), txtESMCompetitiveQuoteRemarks.Text.Trim(), ddlESMQuickResponsee.Text.Trim(), txtESMQuickResponseRemarks.Text.Trim(),
                ddlESMOntimeDelivery.Text.Trim(), txtESMOntimeDeliveryRemarks.Text.Trim(), ddlESMPromptAdvice.Text.Trim(), txtESMPromptAdviceRemarks.Text.Trim(),
                10);

            if (x > 0)
            {
                String msg = String.Format("alert('HSE Questionnaire save successfully.');");
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg", msg, true);
            }
        }
        catch //(Exception ex)
        {
        }
    }