protected void UpdateCampaign() { try { demographics = new DemographicInfo(); demographics.CampaignID = Convert.ToInt32(Session["CampID"].ToString()); //MAKING demographics.EnzymeName = drpEnzyme.SelectedItem.Text; demographics.Total_num_of_Exposed_Individuals = Convert.ToInt32(txtTotalnumberofexposedindividuals.Text); demographics.Total_num_of_prev_pos_Stillwork = Convert.ToInt32(txtTotalNumberofPreviousPositivesStillWorking.Text); demographics.Tot_Num_f_Base_Pos_Ind = Convert.ToInt32(txtTot_Num_Basline_Pos_Ind.Text); demographics.Tot_not_avail_fr_test = Convert.ToInt32(txtTot_Ava_for_testing.Text); demographics.Tot_to_be_Testd = Convert.ToInt32(txtTot_tobe_Tested.Text); demographics.Tot_New_pos_wth_prior_neg_skintest = Convert.ToInt32(txt_Tot_new_pos_wit_prior_nega_skin_tes.Text); demographics.Num_of_Skin_TestNeg = Convert.ToInt32(txt_num_skin_test_neg.Text); demographics.Num_of_non_part = Convert.ToInt32(txtNum_non_participants.Text); //PACKING demographics.Tot_num_of_exp_ind2 = Convert.ToInt32(txt2Tot_num_f_exp_ind.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work2 = Convert.ToInt32(txt2_tot_num_f_pre_pos_sti_wor.Text); demographics.Tot_Num_of_Base_Pos_Ind2 = Convert.ToInt32(txt2_num_f_bas_pos_ind.Text); demographics.Tot_not_avai_for_testing2 = Convert.ToInt32(txt2_tot_avai_f_test.Text); demographics.Tot_to_be_Test2 = Convert.ToInt32(txt2_tot_tob_test.Text); demographics.Tot_New_pos_with_pri_nega_skin_test2 = Convert.ToInt32(txt2_tot_new_pos_wt_pri_neg_skintest.Text); demographics.Num_of_Skin_Test_Nega2 = Convert.ToInt32(txt2num_f_ski_tes_neg.Text); demographics.Num_of_non_participants2 = Convert.ToInt32(txt2num_f_non_participants.Text); //DISTRIBUTION demographics.Tot_num_of_exp_ind_distr = Convert.ToInt32(txt_tot_num_of_exp_ind_distr.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work_distr = Convert.ToInt32(txt_tot_num_pre_pos_st_wrk_distr.Text); demographics.Tot_Num_of_Base_Pos_Ind_distr = Convert.ToInt32(txt_tot_num_of_base_pos_ind_distr.Text); demographics.Tot_not_avai_for_testing_distr = Convert.ToInt32(txt_tot_not_ava_for_test_distr.Text); demographics.Tot_to_be_Test2_distr = Convert.ToInt32(txt_tot_to_be_test_distr.Text); demographics.Tot_New_pos_with_pri_nega_skin_test_distr = Convert.ToInt32(txt_tot_new_pos_wit_pri_neg_skin_test_distr.Text); demographics.Num_of_Skin_Test_Nega_distr = Convert.ToInt32(txt_num_of_skin_test_neg_distr.Text); demographics.Num_of_non_participants_distr = Convert.ToInt32(txt_num_of_non_part_distr.Text); //OTHER demographics.Tot_num_of_exp_ind_Other = Convert.ToInt32(txt_tot_num_of_exp_ind_Other.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work_Other = Convert.ToInt32(tot_num_of_pre_pos_stil_work_other.Text); demographics.Tot_Num_of_Base_Pos_Ind_Other = Convert.ToInt32(txt_tot_num_of_base_pos_ind_other.Text); demographics.Tot_not_avai_for_testing_Other = Convert.ToInt32(txt_tot_not_avai_for_test_Other.Text); demographics.Tot_to_be_Test2_Other = Convert.ToInt32(txt_tot_to_be_test_Other.Text); demographics.Tot_New_pos_with_pri_nega_skin_test_Other = Convert.ToInt32(txt_tot_new_pos_wit_pri_neg_ski_test_Other.Text); demographics.Num_of_Skin_Test_Nega_Other = Convert.ToInt32(txt_num_of_ski_neg_Other.Text); demographics.Num_of_non_participants_Other = Convert.ToInt32(txt_num_non_parti_other.Text); objclsDemographicBAL = new clsDemographicBAL(); DataSet objDS = new DataSet(); string strout = string.Empty; objclsDemographicBAL.UpdateCompaign_BAL(demographics, ref strout, ref objDS); UpdateDemographInfo(); //lblReturnStatus.Text = strout; ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('" + strout + "');", true); } finally { demographics = null; objclsDemographicBAL = null; } }
protected void UpdateDemographInfo() { try { objclsDemographicBAL = new clsDemographicBAL(); DataSet objDS = new DataSet(); demographics = new DemographicInfo(); demographics.Region = Convert.ToInt32(drpRegion.SelectedItem.Value); demographics.Country = Convert.ToInt32(drpCountry.SelectedItem.Value); demographics.SiteName = Convert.ToInt32(drpSiteName.SelectedItem.Value); demographics.BusinessUnit = Convert.ToInt32(hdnBusinessUnit.Value); demographics.Category = Convert.ToInt32(hdnCategory.Value); demographics.Sector = Convert.ToInt32(hdnSector.Value); if (IsOther) { demographics.Platform = txtOther.Text; } else { demographics.Platform = rdPlatform.SelectedItem.Text; } demographics.EmpployeeStatus = rdEmpStatus.SelectedItem.Text; if (drpFiscalYear.SelectedItem.Value != "0") { demographics.FiscalYr = Convert.ToInt32(drpFiscalYear.SelectedItem.Value); } demographics.Campaign = rdCompaign.SelectedItem.Text; demographics.TotalSitePop = Convert.ToInt32(txtTotalSitePop.Value); demographics.NumMedicalMoniProg = Convert.ToInt32(txtMedicalMonitor.Text); // demographics.PrincipalReporter = Convert.ToInt32(txtReporter.Text); demographics.PrincipalReporter = Session["PrincipalReporterID"] != null ? (int)Session["PrincipalReporterID"] : 0; demographics.DemographicID = Convert.ToInt32(demographicid); string strout = string.Empty; objclsDemographicBAL.UpdateDemographic_BAL(demographics, IsOther, ref strout, ref objDS); //lblReturnStatus.Text = strout; ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('" + strout + "');", true); } finally { demographics = null; objclsDemographicBAL = null; } }
protected void InsertDemoGraphicCampaign() { try { demographics = new DemographicInfo(); if (!IsonlyCampaign) { demographics.Region = Convert.ToInt32(drpRegion.SelectedItem.Value); demographics.Country = Convert.ToInt32(drpCountry.SelectedItem.Value); demographics.SiteName = Convert.ToInt32(drpSiteName.SelectedItem.Value); demographics.BusinessUnit = Convert.ToInt32(hdnBusinessUnit.Value); demographics.Category = Convert.ToInt32(hdnCategory.Value); demographics.Sector = Convert.ToInt32(hdnSector.Value); if (IsOther) { demographics.Platform = txtOther.Text; } else { demographics.Platform = rdPlatform.SelectedItem.Text; } demographics.EmpployeeStatus = rdEmpStatus.SelectedItem.Text; demographics.FiscalYr = Convert.ToInt32(drpFiscalYear.SelectedItem.Value); demographics.Campaign = rdCompaign.SelectedItem.Text; demographics.TotalSitePop = Convert.ToInt32(txtTotalSitePop.Value); demographics.NumMedicalMoniProg = Convert.ToInt32(txtMedicalMonitor.Value); //demographics.PrincipalReporter = txtReporter.Text; demographics.PrincipalReporter = Session["PrincipalReporterID"] != null ? (int)Session["PrincipalReporterID"] : 0; } else { demographics.DemographicID = Convert.ToInt32(demographicid); } //MAKING demographics.EnzymeID = Convert.ToInt32(drpEnzyme.SelectedItem.Value); demographics.Total_num_of_Exposed_Individuals = Convert.ToInt32(txtTotalnumberofexposedindividuals.Text); demographics.Total_num_of_prev_pos_Stillwork = Convert.ToInt32(txtTotalNumberofPreviousPositivesStillWorking.Text); demographics.Tot_Num_f_Base_Pos_Ind = Convert.ToInt32(txtTot_Num_Basline_Pos_Ind.Text); demographics.Tot_not_avail_fr_test = Convert.ToInt32(txtTot_Ava_for_testing.Text); demographics.Tot_to_be_Testd = Convert.ToInt32(txtTot_tobe_Tested.Text); demographics.Tot_New_pos_wth_prior_neg_skintest = Convert.ToInt32(txt_Tot_new_pos_wit_prior_nega_skin_tes.Text); demographics.Num_of_Skin_TestNeg = Convert.ToInt32(txt_num_skin_test_neg.Text); demographics.Num_of_non_part = Convert.ToInt32(txtNum_non_participants.Text); //PACKING demographics.Tot_num_of_exp_ind2 = Convert.ToInt32(txt2Tot_num_f_exp_ind.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work2 = Convert.ToInt32(txt2_tot_num_f_pre_pos_sti_wor.Text); demographics.Tot_Num_of_Base_Pos_Ind2 = Convert.ToInt32(txt2_num_f_bas_pos_ind.Text); demographics.Tot_not_avai_for_testing2 = Convert.ToInt32(txt2_tot_avai_f_test.Text); demographics.Tot_to_be_Test2 = Convert.ToInt32(txt2_tot_tob_test.Text); demographics.Tot_New_pos_with_pri_nega_skin_test2 = Convert.ToInt32(txt2_tot_new_pos_wt_pri_neg_skintest.Text); demographics.Num_of_Skin_Test_Nega2 = Convert.ToInt32(txt2num_f_ski_tes_neg.Text); demographics.Num_of_non_participants2 = Convert.ToInt32(txt2num_f_non_participants.Text); //DISTRIBUTION demographics.Tot_num_of_exp_ind_distr = Convert.ToInt32(txt_tot_num_of_exp_ind_distr.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work_distr = Convert.ToInt32(txt_tot_num_pre_pos_st_wrk_distr.Text); demographics.Tot_Num_of_Base_Pos_Ind_distr = Convert.ToInt32(txt_tot_num_of_base_pos_ind_distr.Text); demographics.Tot_not_avai_for_testing_distr = Convert.ToInt32(txt_tot_not_ava_for_test_distr.Text); demographics.Tot_to_be_Test2_distr = Convert.ToInt32(txt_tot_to_be_test_distr.Text); demographics.Tot_New_pos_with_pri_nega_skin_test_distr = Convert.ToInt32(txt_tot_new_pos_wit_pri_neg_skin_test_distr.Text); demographics.Num_of_Skin_Test_Nega_distr = Convert.ToInt32(txt_num_of_skin_test_neg_distr.Text); demographics.Num_of_non_participants_distr = Convert.ToInt32(txt_num_of_non_part_distr.Text); //OTHER demographics.Tot_num_of_exp_ind_Other = Convert.ToInt32(txt_tot_num_of_exp_ind_Other.Text); demographics.Tot_Num_of_Pre_Pos_Still_Work_Other = Convert.ToInt32(tot_num_of_pre_pos_stil_work_other.Text); demographics.Tot_Num_of_Base_Pos_Ind_Other = Convert.ToInt32(txt_tot_num_of_base_pos_ind_other.Text); demographics.Tot_not_avai_for_testing_Other = Convert.ToInt32(txt_tot_not_avai_for_test_Other.Text); demographics.Tot_to_be_Test2_Other = Convert.ToInt32(txt_tot_to_be_test_Other.Text); demographics.Tot_New_pos_with_pri_nega_skin_test_Other = Convert.ToInt32(txt_tot_new_pos_wit_pri_neg_ski_test_Other.Text); demographics.Num_of_Skin_Test_Nega_Other = Convert.ToInt32(txt_num_of_ski_neg_Other.Text); demographics.Num_of_non_participants_Other = Convert.ToInt32(txt_num_non_parti_other.Text); objclsDemographicBAL = new clsDemographicBAL(); DataSet objDS = new DataSet(); string strout = string.Empty; objclsDemographicBAL.InsertInsertDemographicAndEnzyme_BAL(demographics, IsonlyCampaign, ref strout, ref objDS); //lblReturnStatus.Text = strout; if (strout.IndexOf("Record Saved successfully And Demographic ID is : ") != -1) { //strout.Substring(strout.IndexOf("Record Saved successfully And Demographic ID is : "),0); char[] separators = { ' ', ':' }; string[] words = strout.Split(separators, StringSplitOptions.RemoveEmptyEntries); demographicid = words[7]; } ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('" + strout + "');", true); } finally { demographics = null; objclsDemographicBAL = null; } }
public bool UpdateDemographic_BAL(DemographicInfo demogrpahic, bool IsOther, ref string strout ,ref DataSet objDS) { bool bReturn = false; string m_strLastError; try { objAdminGBUSelectionDO = new clsDemographicDAL(); //Call the data access function here if (objAdminGBUSelectionDO.UpdateDemographicDAL(demogrpahic, IsOther,ref strout, ref objDS)) bReturn = true; else { //Get the last error from DA class here. //m_strLastError = objAdminGBUSelectionDO.GetLastError(); } } catch (Exception ex) { //Set the error to this variable m_strLastError = ex.StackTrace; } //Return the status here return bReturn; }
/// <summary> /// /// </summary> /// <param name="demogrpahic"></param> /// <param name="IsOther"></param> /// <param name="strout"></param> /// <param name="objDS"></param> /// <returns></returns> public bool UpdateDemographicDAL(DemographicInfo demogrpahic, bool IsOther,ref string strout, ref DataSet objDS) { bool tmp = false; try { paramIn = new SqlParameter[16]; paramIn[0] = new SqlParameter("@P_DemographicID", SqlDbType.Int); paramIn[0].Value = demogrpahic.DemographicID; paramIn[1] = new SqlParameter("@P_Region_ID", SqlDbType.Int); paramIn[1].Value = demogrpahic.Region; paramIn[2] = new SqlParameter("@P_Country_ID", SqlDbType.Int); paramIn[2].Value = demogrpahic.Country; paramIn[3] = new SqlParameter("@P_SiteName_ID", SqlDbType.Int); paramIn[3].Value = demogrpahic.SiteName; paramIn[4] = new SqlParameter("@P_BusinessUnit_ID", SqlDbType.Int); paramIn[4].Value = demogrpahic.BusinessUnit; paramIn[5] = new SqlParameter("@P_Category_ID", SqlDbType.Int); paramIn[5].Value = demogrpahic.Category; paramIn[6] = new SqlParameter("@P_Sector_ID", SqlDbType.Int); paramIn[6].Value = demogrpahic.Sector; paramIn[7] = new SqlParameter("@P_Platform", SqlDbType.VarChar); paramIn[7].Value = demogrpahic.Platform; paramIn[8] = new SqlParameter("@P_EmploymentStatus", SqlDbType.VarChar); paramIn[8].Value = demogrpahic.EmpployeeStatus; paramIn[9] = new SqlParameter("@P_FiscalYear_ID", SqlDbType.Int); paramIn[9].Value = demogrpahic.FiscalYr; paramIn[10] = new SqlParameter("@P_Campaign", SqlDbType.VarChar); paramIn[10].Value = demogrpahic.Campaign; paramIn[11] = new SqlParameter("@P_TotalSitePopulation", SqlDbType.Int); paramIn[11].Value = demogrpahic.TotalSitePop; paramIn[12] = new SqlParameter("@P_NumberofIndividualsGrade1", SqlDbType.Int); paramIn[12].Value = demogrpahic.NumMedicalMoniProg; paramIn[13] = new SqlParameter("@P_PrincipalReporter_ID", SqlDbType.Int); paramIn[13].Value = demogrpahic.PrincipalReporter; paramIn[14] = new SqlParameter("@P_ModifiedBy", SqlDbType.VarChar); paramIn[14].Value = "TestU"; paramIn[15] = new SqlParameter("@P_DemographicName", SqlDbType.VarChar); paramIn[15].Value = ""; paramOut = new SqlParameter[1]; paramOut[0] = new SqlParameter("@P_output", SqlDbType.VarChar, 50); paramOut[0].Direction = ParameterDirection.Output; if (objDBPool.SpQueryOutputParam("USP_UPDATE_EnzymeDemographicData", paramIn, ref paramOut, true, ref objDS)) tmp = true; else tmp = false; strout = paramOut[0].Value.ToString(); } catch (Exception ex) { ex.Message.ToString(); } finally { objDBPool = null; } return tmp; }
/// <summary> /// /// </summary> /// <param name="demogrpahic"></param> /// <param name="strout"></param> /// <param name="objDS"></param> /// <returns></returns> public bool UpdateCompaignDAL(DemographicInfo demogrpahic, ref string strout, ref DataSet objDS) { bool tmp = false; try { paramIn = new SqlParameter[34]; // Making paramIn[0] = new SqlParameter("@P_CampaignID", SqlDbType.Int); paramIn[0].Value = demogrpahic.CampaignID; paramIn[1] = new SqlParameter("@P_Making_ExposedInd", SqlDbType.Int); paramIn[2] = new SqlParameter("@P_Making_PrePosWorking", SqlDbType.Int); paramIn[3] = new SqlParameter("@P_Making_totNumBaseline", SqlDbType.Int); paramIn[4] = new SqlParameter("@P_Making_TotalnotAvail", SqlDbType.Int); paramIn[5] = new SqlParameter("@P_Making_Totaltotested", SqlDbType.Int); paramIn[6] = new SqlParameter("@P_Making_SkinPos", SqlDbType.Int); paramIn[7] = new SqlParameter("@P_Making_SkinNeg", SqlDbType.Int); paramIn[8] = new SqlParameter("@P_Making_NonParticipants", SqlDbType.Int); //PACKING paramIn[9] = new SqlParameter("@P_Packing_ExposedInd", SqlDbType.Int); paramIn[10] = new SqlParameter("@P_Packing_PrePosWorking", SqlDbType.Int); paramIn[11] = new SqlParameter("@P_Packing_totNumBaseline", SqlDbType.Int); paramIn[12] = new SqlParameter("@P_Packing_TotalnotAvail", SqlDbType.Int); paramIn[13] = new SqlParameter("@P_Packing_Totaltotested", SqlDbType.Int); paramIn[14] = new SqlParameter("@P_Packing_SkinPos", SqlDbType.Int); paramIn[15] = new SqlParameter("@P_Packing_SkinNeg", SqlDbType.Int); paramIn[16] = new SqlParameter("@P_Packing_NonParticipants", SqlDbType.Int); //DISTRiBUTION paramIn[17] = new SqlParameter("@P_Distribution_ExposedInd", SqlDbType.Int); paramIn[18] = new SqlParameter("@P_Distribution_PrePosWorking", SqlDbType.Int); paramIn[19] = new SqlParameter("@P_Distribution_totNumBaseline", SqlDbType.Int); paramIn[20] = new SqlParameter("@P_Distribution_TotalnotAvail", SqlDbType.Int); paramIn[21] = new SqlParameter("@P_Distribution_Totaltotested", SqlDbType.Int); paramIn[22] = new SqlParameter("@P_Distribution_SkinPos", SqlDbType.Int); paramIn[23] = new SqlParameter("@P_Distribution_SkinNeg", SqlDbType.Int); paramIn[24] = new SqlParameter("@P_Distribution_NonParticipants", SqlDbType.Int); //OTHERS paramIn[25] = new SqlParameter("@P_Others_ExposedInd", SqlDbType.Int); paramIn[26] = new SqlParameter("@P_Others_PrePosWorking", SqlDbType.Int); paramIn[27] = new SqlParameter("@P_Other_totNumBaseline", SqlDbType.Int); paramIn[28] = new SqlParameter("@P_Others_TotalnotAvail", SqlDbType.Int); paramIn[29] = new SqlParameter("@P_Others_Totaltotested", SqlDbType.Int); paramIn[30] = new SqlParameter("@P_Others_SkinPos", SqlDbType.Int); paramIn[31] = new SqlParameter("@P_Others_SkinNeg", SqlDbType.VarChar); paramIn[32] = new SqlParameter("@P_Others_NonParticipants", SqlDbType.Int); //MAKING paramIn[1].Value = demogrpahic.Total_num_of_Exposed_Individuals; paramIn[2].Value = demogrpahic.Total_num_of_prev_pos_Stillwork; paramIn[3].Value = demogrpahic.Tot_Num_f_Base_Pos_Ind; paramIn[4].Value = demogrpahic.Tot_not_avail_fr_test; paramIn[5].Value = demogrpahic.Tot_to_be_Testd; paramIn[6].Value = demogrpahic.Tot_New_pos_wth_prior_neg_skintest; paramIn[7].Value = demogrpahic.Num_of_Skin_TestNeg; paramIn[8].Value = demogrpahic.Num_of_non_part; //PACKING paramIn[9].Value = demogrpahic.Tot_num_of_exp_ind2; paramIn[10].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work2; paramIn[11].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind2; paramIn[12].Value = demogrpahic.Tot_not_avai_for_testing2; paramIn[13].Value = demogrpahic.Tot_to_be_Test2; paramIn[14].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test2; paramIn[15].Value = demogrpahic.Num_of_Skin_Test_Nega2; paramIn[16].Value = demogrpahic.Num_of_non_participants2; //DISTRIBUTE paramIn[17].Value = demogrpahic.Tot_num_of_exp_ind_distr; paramIn[18].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work_distr; paramIn[19].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind_distr; paramIn[20].Value = demogrpahic.Tot_not_avai_for_testing_distr; paramIn[21].Value = demogrpahic.Tot_to_be_Test2_distr; paramIn[22].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test_distr; paramIn[23].Value = demogrpahic.Num_of_Skin_Test_Nega_distr; paramIn[24].Value = demogrpahic.Num_of_non_participants_distr; //OTHERS paramIn[25].Value = demogrpahic.Tot_num_of_exp_ind_Other; paramIn[26].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work_Other; paramIn[27].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind_Other; paramIn[28].Value = demogrpahic.Tot_not_avai_for_testing_Other; paramIn[29].Value = demogrpahic.Tot_to_be_Test2_Other; paramIn[30].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test_Other; paramIn[31].Value = demogrpahic.Num_of_Skin_Test_Nega_Other; paramIn[32].Value = demogrpahic.Num_of_non_participants_Other; paramIn[33] = new SqlParameter("@P_ModifiedBy", SqlDbType.VarChar); paramIn[33].Value = "TempUser"; paramOut = new SqlParameter[1]; paramOut[0] = new SqlParameter("@P_output", SqlDbType.VarChar, 50); paramOut[0].Direction = ParameterDirection.Output; if (objDBPool.SpQueryOutputParam("USP_UPDATE_EnzymeCampaign_Data", paramIn, ref paramOut, true,ref objDS)) tmp = true; else tmp = false; strout = paramOut[0].Value.ToString(); } catch (Exception ex) { ex.Message.ToString(); } finally { objDBPool = null; } return tmp; }
/// <summary> /// /// </summary> /// <param name="demogrpahic"></param> /// <param name="strout"></param> /// <param name="objDS"></param> /// <returns></returns> public bool InsertDemographicAndEnzymeDAL(DemographicInfo demogrpahic,ref string strout, ref DataSet objDS) { bool tmp = false; try { paramIn = new SqlParameter[49]; paramIn[0] = new SqlParameter("@P_DemographicName", SqlDbType.VarChar); paramIn[0].Value = ""; paramIn[1] = new SqlParameter("@P_Region_ID", SqlDbType.Int); paramIn[1].Value = demogrpahic.Region; paramIn[2] = new SqlParameter("@P_Country_ID", SqlDbType.Int); paramIn[2].Value = demogrpahic.Country; paramIn[3] = new SqlParameter("@P_SiteName_ID", SqlDbType.Int); paramIn[3].Value = demogrpahic.SiteName; paramIn[4] = new SqlParameter("@P_BusinessUnit_ID", SqlDbType.Int); paramIn[4].Value = demogrpahic.BusinessUnit; paramIn[5] = new SqlParameter("@P_Category_ID", SqlDbType.Int); paramIn[5].Value = demogrpahic.Category; paramIn[6] = new SqlParameter("@P_Sector_ID", SqlDbType.Int); paramIn[6].Value = demogrpahic.Sector; paramIn[7] = new SqlParameter("@P_Platform", SqlDbType.VarChar); paramIn[7].Value = demogrpahic.Platform; paramIn[8] = new SqlParameter("@P_EmploymentStatus", SqlDbType.VarChar); paramIn[8].Value = demogrpahic.EmpployeeStatus; paramIn[9] = new SqlParameter("@P_FiscalYear_ID", SqlDbType.Int); paramIn[9].Value = demogrpahic.FiscalYr; paramIn[10] = new SqlParameter("@P_Campaign", SqlDbType.VarChar); paramIn[10].Value = demogrpahic.Campaign; paramIn[11] = new SqlParameter("@P_TotalSitePopulation", SqlDbType.Int); paramIn[11].Value = demogrpahic.TotalSitePop; paramIn[12] = new SqlParameter("@P_NumberofIndividualsGrade1", SqlDbType.Int); paramIn[12].Value = demogrpahic.NumMedicalMoniProg; paramIn[13] = new SqlParameter("@P_PrincipalReporter_ID", SqlDbType.Int); paramIn[13].Value = demogrpahic.PrincipalReporter; paramIn[14] = new SqlParameter("@P_CreatedBy", SqlDbType.VarChar); paramIn[14].Value = "Stati User"; //Campaign information paramIn[15] = new SqlParameter("@P_EnzymeName_ID", SqlDbType.Int); paramIn[15].Value = demogrpahic.EnzymeID; // Making paramIn[16] = new SqlParameter("@P_Making_ExposedInd", SqlDbType.Int); paramIn[17] = new SqlParameter("@P_Making_PrePosWorking", SqlDbType.Int); paramIn[18] = new SqlParameter("@P_Making_totNumBaseline", SqlDbType.Int); paramIn[19] = new SqlParameter("@P_Making_TotalnotAvail", SqlDbType.Int); paramIn[20] = new SqlParameter("@P_Making_Totaltotested", SqlDbType.Int); paramIn[21] = new SqlParameter("@P_Making_SkinPos", SqlDbType.Int); paramIn[22] = new SqlParameter("@P_Making_SkinNeg", SqlDbType.Int); paramIn[23] = new SqlParameter("@P_Making_NonParticipants", SqlDbType.Int); //PACKING paramIn[24] = new SqlParameter("@P_Packing_ExposedInd", SqlDbType.Int); paramIn[25] = new SqlParameter("@P_Packing_PrePosWorking", SqlDbType.Int); paramIn[26] = new SqlParameter("@P_Packing_totNumBaseline", SqlDbType.Int); paramIn[27] = new SqlParameter("@P_Packing_TotalnotAvail", SqlDbType.Int); paramIn[28] = new SqlParameter("@P_Packing_Totaltotested", SqlDbType.Int); paramIn[29] = new SqlParameter("@P_Packing_SkinPos", SqlDbType.Int); paramIn[30] = new SqlParameter("@P_Packing_SkinNeg", SqlDbType.Int); paramIn[31] = new SqlParameter("@P_Packing_NonParticipants", SqlDbType.Int); //DISTRiBUTION paramIn[32] = new SqlParameter("@P_Distribution_ExposedInd", SqlDbType.Int); paramIn[33] = new SqlParameter("@P_Distribution_PrePosWorking", SqlDbType.Int); paramIn[34] = new SqlParameter("@P_Distribution_totNumBaseline", SqlDbType.Int); paramIn[35] = new SqlParameter("@P_Distribution_TotalnotAvail", SqlDbType.Int); paramIn[36] = new SqlParameter("@P_Distribution_Totaltotested", SqlDbType.Int); paramIn[37] = new SqlParameter("@P_Distribution_SkinPos", SqlDbType.Int); paramIn[38] = new SqlParameter("@P_Distribution_SkinNeg", SqlDbType.Int); paramIn[39] = new SqlParameter("@P_Distribution_NonParticipants", SqlDbType.Int); //OTHERS paramIn[40] = new SqlParameter("@P_Others_ExposedInd", SqlDbType.Int); paramIn[41] = new SqlParameter("@P_Others_PrePosWorking", SqlDbType.Int); paramIn[42] = new SqlParameter("@P_Other_totNumBaseline", SqlDbType.Int); paramIn[43] = new SqlParameter("@P_Others_TotalnotAvail", SqlDbType.Int); paramIn[44] = new SqlParameter("@P_Others_Totaltotested", SqlDbType.Int); paramIn[45] = new SqlParameter("@P_Others_SkinPos", SqlDbType.Int); paramIn[46] = new SqlParameter("@P_Others_SkinNeg", SqlDbType.Int); paramIn[47] = new SqlParameter("@P_Others_NonParticipants", SqlDbType.Int); paramIn[48] = new SqlParameter("@P_ISCampaign", SqlDbType.VarChar); paramIn[48].Value = "yes"; //MAKING paramIn[16].Value = demogrpahic.Total_num_of_Exposed_Individuals; paramIn[17].Value = demogrpahic.Total_num_of_prev_pos_Stillwork; paramIn[18].Value = demogrpahic.Tot_Num_f_Base_Pos_Ind; paramIn[19].Value = demogrpahic.Tot_not_avail_fr_test; paramIn[20].Value = demogrpahic.Tot_to_be_Testd; paramIn[21].Value = demogrpahic.Tot_New_pos_wth_prior_neg_skintest; paramIn[22].Value = demogrpahic.Num_of_Skin_TestNeg; paramIn[23].Value = demogrpahic.Num_of_non_part; //PACKING paramIn[24].Value = demogrpahic.Tot_num_of_exp_ind2; paramIn[25].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work2; paramIn[26].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind2; paramIn[27].Value = demogrpahic.Tot_not_avai_for_testing2; paramIn[28].Value = demogrpahic.Tot_to_be_Test2; paramIn[29].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test2; paramIn[30].Value = demogrpahic.Num_of_Skin_Test_Nega2; paramIn[31].Value = demogrpahic.Num_of_non_participants2; //DISTRIBUTE paramIn[32].Value = demogrpahic.Tot_num_of_exp_ind_distr; paramIn[33].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work_distr; paramIn[34].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind_distr; paramIn[35].Value = demogrpahic.Tot_not_avai_for_testing_distr; paramIn[36].Value = demogrpahic.Tot_to_be_Test2_distr; paramIn[37].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test_distr; paramIn[38].Value = demogrpahic.Num_of_Skin_Test_Nega_distr; paramIn[39].Value = demogrpahic.Num_of_non_participants_distr; //OTHERS paramIn[40].Value = demogrpahic.Tot_num_of_exp_ind_Other; paramIn[41].Value = demogrpahic.Tot_Num_of_Pre_Pos_Still_Work_Other; paramIn[42].Value = demogrpahic.Tot_Num_of_Base_Pos_Ind_Other; paramIn[43].Value = demogrpahic.Tot_not_avai_for_testing_Other; paramIn[44].Value = demogrpahic.Tot_to_be_Test2_Other; paramIn[45].Value = demogrpahic.Tot_New_pos_with_pri_nega_skin_test_Other; paramIn[46].Value = demogrpahic.Num_of_Skin_Test_Nega_Other; paramIn[47].Value = demogrpahic.Num_of_non_participants_Other; paramOut = new SqlParameter[1]; paramOut[0] = new SqlParameter("@p_output", SqlDbType.VarChar, 200); if (objDBPool.SpQueryOutputParam("USP_INSERT_EnzymeDemographic_Campaign_Data", paramIn,ref paramOut,true,ref objDS)) tmp = true; else tmp = false; strout = paramOut[0].Value.ToString(); } catch (Exception ex) { ex.Message.ToString(); } finally { objDBPool = null; } return tmp; }