예제 #1
0
        public static int saveDataIntblMainFamilyBehaviour(tblMainFamilyBehaviour tblMainFamilyBehaviourClass)
        {
            string storeProcedureName = "sp_Insert_tblMainFamilyBehaviour";
            try
            {
                int rowAffected = 0;
                using (SqlCommand cmd = new SqlCommand())
                {
                    cmd.Connection = ILODBConfig.GetConnection();
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.CommandText = storeProcedureName;

                    cmd.Parameters.AddWithValue("@fldID", tblMainFamilyBehaviourClass.fldID);
                    cmd.Parameters.AddWithValue("@fldChildLabourID", tblMainFamilyBehaviourClass.fldChildLabourID);
                    cmd.Parameters.AddWithValue("@fldLoveMost", tblMainFamilyBehaviourClass.fldLoveMost);
                    cmd.Parameters.AddWithValue("@fldLoveWay", tblMainFamilyBehaviourClass.fldLoveWay);
                    cmd.Parameters.AddWithValue("@fldAbuse", tblMainFamilyBehaviourClass.fldAbuse);
                    cmd.Parameters.AddWithValue("@fldAbusePerson", tblMainFamilyBehaviourClass.fldAbusePerson);
                    cmd.Parameters.AddWithValue("@fldAbuseType", tblMainFamilyBehaviourClass.fldAbuseType);
                    cmd.Parameters.AddWithValue("@fldAbuseReport", tblMainFamilyBehaviourClass.fldAbuseReport);
                    cmd.Parameters.AddWithValue("@fldAbuseReportDesc", tblMainFamilyBehaviourClass.fldAbuseReportDesc);
                    cmd.Parameters.AddWithValue("@fldFoodStatus", tblMainFamilyBehaviourClass.fldFoodStatus);
                    cmd.Parameters.AddWithValue("@fldSleepStatus", tblMainFamilyBehaviourClass.fldSleepStatus);
                    cmd.Parameters.AddWithValue("@fldStayStatus", tblMainFamilyBehaviourClass.fldStayStatus);
                    cmd.Parameters.AddWithValue("@fldEntertainmentStatus", tblMainFamilyBehaviourClass.fldEntertainmentStatus);
                    cmd.Parameters.AddWithValue("@fldSecuritySeperateRoom", tblMainFamilyBehaviourClass.fldSecuritySeperateRoom);
                    cmd.Parameters.AddWithValue("@fldSecurityDesc", tblMainFamilyBehaviourClass.fldSecurityDesc);
                    cmd.Parameters.AddWithValue("@fldHealthStatusID", tblMainFamilyBehaviourClass.fldHealthStatusID);
                    cmd.Parameters.AddWithValue("@fldCertificate", tblMainFamilyBehaviourClass.fldCertificate);
                    cmd.Parameters.AddWithValue("@fldFuturePlan", tblMainFamilyBehaviourClass.fldFuturePlan);
                    cmd.Parameters.AddWithValue("@fldPlanReturnHome", tblMainFamilyBehaviourClass.fldPlanReturnHome);
                    cmd.Parameters.AddWithValue("@fldNoPlanReturnHomeID", tblMainFamilyBehaviourClass.fldNoPlanReturnHomeID);
                    cmd.Parameters.AddWithValue("@fldWhyLeaveHome", tblMainFamilyBehaviourClass.fldWhyLeaveHome);

                    rowAffected = cmd.ExecuteNonQuery();
                }
                return rowAffected;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
            finally
            {
                ILODBConfig.GetConnection().Close();
            }
        }
예제 #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            tblMain mainClass = new tblMain();
            mainClass.fldTypeID = 2;
            mainClass.fldLocation = ddlMunicipality.SelectedItem.Text.Trim();
            mainClass.fldSerialNo = txtFormSerialNo.Text.Trim();
            mainClass.fldFormNo = int.Parse(txtFormNp.Text.Trim());
            mainClass.fldFormFillPlace = txtFomFillPlace.Text.Trim();
            mainClass.fldFormFillDate = DateTime.Parse(txtDateFormFill.Value.Trim());
            mainClass.fldFormAgree = Convert.ToBoolean(int.Parse(rblFormAgree.SelectedValue));
            mainClass.fldAnswererName = txtAnswererName.Text.Trim();
            mainClass.fldAnsContactNo = txtAnsContactNo.Text.Trim();
            mainClass.fldMainName = txtEmployerFullName.Text.Trim();
            mainClass.fldMainProfessionID = int.Parse(ddlEmployerProfession.SelectedValue);
            mainClass.fldMainCastID = int.Parse(ddlEmployerCast.SelectedValue);
            mainClass.fldMainReligionID = int.Parse(ddlEmployerReligion.SelectedValue);
            mainClass.fldMainStayTypeID = int.Parse(ddlHabitantStatus.SelectedValue);
            mainClass.fldMainMenNo = int.Parse(txtEmployerFamilyMenNo.Text.Trim());
            mainClass.fldMainWomenNo = int.Parse(txtEmployerFamilyWomenNo.Text.Trim());
            mainClass.fldMainBoysNo = int.Parse(txtEmployerFamilyBoysNo.Text.Trim());
            mainClass.fldMainGirlsNo = int.Parse(txtEmployerFamilyGirlsNo.Text.Trim());
            mainClass.fldMainFamilyTotal = mainClass.fldMainMenNo + mainClass.fldMainWomenNo + mainClass.fldMainGirlsNo + mainClass.fldMainBoysNo;
            mainClass.fldMainEducation = txtEmployerEducation.Text.Trim();
            mainClass.fldSurveyerName = txtSurveyerName.Text.Trim();
            mainClass.fldSubmitDate = DateTime.Parse(txtFormSubmitDate.Value.Trim());
            mainClass.fldSurveyerNote = txtSurveyerNote.Text.Trim();
            mainClass.fldMainNote = txtEmployerNote.Text.Trim();
            mainClass.fldNote = "";
            mainClass.fldWorkPlace = "";

            tblAddress addPermanent = new tblAddress();
            addPermanent.fldAddType = "स्थायी";
            addPermanent.fldDistrict = int.Parse(drpPermanentDistrict.SelectedValue);
            addPermanent.fldVillage = Convert.ToBoolean(int.Parse(rblPermanentVillage.SelectedValue));
            addPermanent.fldVMName = drpPermanentMunorVdc.SelectedItem.Text.ToString();
            addPermanent.fldWardNo = int.Parse(txtPermanentWardNo.Text.Trim());
            addPermanent.fldTole = txtPermanentTole.Text.Trim();
            addPermanent.fldHouseNo = txtPermanentHouseNo.Text.Trim();
            addPermanent.fldAddNote = txtPermanetNote.Text.Trim();
            addPermanent.fldContactNo = "";

            tblAddress addTemp = new tblAddress();
            addTemp.fldAddType = "अस्थायी";
            addTemp.fldDistrict = int.Parse(drpTempDistrict.SelectedValue);
            addTemp.fldVillage = Convert.ToBoolean(int.Parse(rblTempVillage.SelectedValue));
            addTemp.fldVMName = drpTempMunOrVdc.SelectedItem.Text.ToString();
            addTemp.fldWardNo = int.Parse(txtTempWardNo.Text.Trim());
            addTemp.fldTole = txtTempTole.Text.Trim();
            addTemp.fldHouseNo = txtTempHouseNo.Text.Trim();
            addTemp.fldAddNote = txtTempNote.Text.Trim();
            addTemp.fldContactNo = "";

            tblKnowledge knowledgeClass = new tblKnowledge();
            knowledgeClass.fldChildRight = Convert.ToBoolean(int.Parse(ddlKnowChildRight.SelectedValue));
            knowledgeClass.fldChildRightDesc = txtWhatIsChildRight.Text.Trim();
            knowledgeClass.fldNoWorkBelow14 = Convert.ToBoolean(int.Parse(ddlNoChildLaborBelow14.SelectedValue));
            knowledgeClass.fldAgreeNoWorkBelow14 = Convert.ToBoolean(int.Parse(ddlViewAboutNoChildLaborBelow14.SelectedValue));
            knowledgeClass.fldNoWorkBelow14Desc = txtViewAboutNoChildLaborBelow14.Text.Trim();
            knowledgeClass.fldChildLabourRisk = Convert.ToBoolean(int.Parse(ddlKnowThreeEffectsOfChildLabor.SelectedValue));
            knowledgeClass.fldNoChildLabourDesc = "";
            knowledgeClass.fldKnowChildAbuse = false;
            //Only for Form A
            knowledgeClass.fldKnowAdultAvailable = false;
            knowledgeClass.fldUseAdultNotChild = false;
            knowledgeClass.fldUseAdultNotChildDesc = "";

            tblChildLabour childLabourClass = new tblChildLabour();
            childLabourClass.fldChildName = "";
            childLabourClass.fldChildGenderID = 1;
            childLabourClass.fldChildBirthDate = DateTime.Parse("1/1/2070");
            childLabourClass.fldChildAge = 0;
            childLabourClass.fldChildCastID = 1;
            childLabourClass.fldChildReligionID = 1;
            childLabourClass.fldChildHealth = "";
            childLabourClass.fldChildBirthReg = false;
            childLabourClass.fldChildStayTypeID = 1;
            childLabourClass.fldChildAdditionalIncome = "";

            tblChildLabourDetails childLabourDetailClass = new tblChildLabourDetails();
            childLabourDetailClass.fldChildStudyStateID = int.Parse(ddlDoesChildStudy.SelectedValue);
            childLabourDetailClass.fldChildStudyTypeID = int.Parse(ddlStudyType.SelectedValue);
            childLabourDetailClass.fldChildSchool = txtSchoolOrCenterNameAndClass.Text.Trim();
            childLabourDetailClass.fldChildSchoolGrade = int.Parse(txtSchoolOrCenterClass.Text.Trim());
            childLabourDetailClass.fldChildSchoolExpenseID = int.Parse(ddlWhoPaysEducation.SelectedValue);
            childLabourDetailClass.fldChildLeaveSchoolGrade = int.Parse(txtAtWhatClassSchoolLeft.Text.Trim());
            childLabourDetailClass.fldChildLeaveSchoolDesc = txtWhySchoolLeft.Text.Trim();
            childLabourDetailClass.fldChildTraining = Convert.ToBoolean(int.Parse(ddlWantVocationalTraining.SelectedValue));
            childLabourDetailClass.fldChildTrainingPlace = txtWhereVocationalTraining.Text.Trim();
            childLabourDetailClass.fldChildStudyContinue = Convert.ToBoolean(int.Parse(ddlWantContinuation.SelectedValue));
            childLabourDetailClass.fldChildTrainingStay = txtWhereToStayDuringVocationalTraining.Text.Trim();
            childLabourDetailClass.fldChildInterestedArea = txtWhatWantToDo.Text.Trim();
            //childLabourDetailClass.fldChildStudyContinue = 0;
            childLabourDetailClass.fldChildStudyHelpSelf = txtHelpYourself.Text.Trim();
            childLabourDetailClass.fldChildStudyHelpFamily = txtHelpFamily.Text.Trim();
            childLabourDetailClass.fldChildStudyHelpOther = txtHelpOther.Text.Trim();

            tblChildWorkState childWorkClass = new tblChildWorkState();
            childWorkClass.fldWorkStartTime = float.Parse(txtChildWorkedYear.Text.Trim()) + float.Parse(txtChildWorkedMonth.Text.Trim()) / 12;
            childWorkClass.fldWorkPlaceKnow = Convert.ToBoolean(int.Parse(ddlParentKnowWorkingStation.SelectedValue));
            childWorkClass.fldWorkContactTypeID = int.Parse(ddlParentContactFrequency.SelectedValue);
            childWorkClass.fldWorkContact = Convert.ToBoolean(int.Parse(ddlIsAllowedToContactParent.SelectedValue));
            childWorkClass.fldWorkTimePerDay = float.Parse(txtChildDailyHoursToWork.Text.Trim());
            childWorkClass.fldWorkTimeDay = float.Parse(txtChildMorningWorkTime.Text.Trim());
            childWorkClass.fldWorkTimeEvening = float.Parse(txtChildEveningWorkTime.Text.Trim());
            childWorkClass.fldWorkDesc = txtChildWhatTasksToDo.Text.Trim();
            //childWorkClass.fldWorkPayAmonunt = float.Parse(txtMonthlySalary.Text.Trim());
            childWorkClass.fldWorkPayTypeID = int.Parse(ddlSalaryObtainFrequency.Text.Trim());
            childWorkClass.fldWorkPayReceiverID = int.Parse(ddlPayementReceiver.SelectedValue);
            childWorkClass.fldWorkHoliday = Convert.ToBoolean(int.Parse(ddlIsVacation.SelectedValue));
            childWorkClass.fldWorkHolidayID = int.Parse(ddlVacationFrequency.SelectedValue);
            childWorkClass.fldWorkPayReceiverName = txtOtherPersonToTakeSalary.Text.Trim();

            tblMainFamilyBehaviour mainFamilyBehaviourClass = new tblMainFamilyBehaviour();
            mainFamilyBehaviourClass.fldLoveMost = int.Parse(ddlWhoLovesMost.SelectedValue);

            string strLoveway = "";
            for (int i = 0; i < chkLoveway.Items.Count; i++)
                if (chkLoveway.Items[i].Selected)
                {
                    strLoveway += chkLoveway.Items[i].Value + ";";

                }

            mainFamilyBehaviourClass.fldLoveWay = strLoveway;
            mainFamilyBehaviourClass.fldAbuse = false;
            mainFamilyBehaviourClass.fldAbusePerson = int.Parse(ddlWhoHatesMost.SelectedValue);
            string strHateway = "";
            for (int i = 0; i < chkAbuseType.Items.Count; i++)
                if (chkAbuseType.Items[i].Selected)
                {
                    strHateway += chkAbuseType.Items[i].Value + ";";

                }
            mainFamilyBehaviourClass.fldAbuseType = strHateway;
            mainFamilyBehaviourClass.fldAbuseReport = Convert.ToBoolean(int.Parse(ddlProblemShare.SelectedValue));
            mainFamilyBehaviourClass.fldAbuseReportDesc = txtAbuseDesc.Text.Trim();
            mainFamilyBehaviourClass.fldFoodStatus = chkFooding.Checked;
            mainFamilyBehaviourClass.fldSleepStatus = chkSleeping.Checked;
            mainFamilyBehaviourClass.fldStayStatus = chkStaying.Checked;
            mainFamilyBehaviourClass.fldEntertainmentStatus = chkEntertainment.Checked;
            mainFamilyBehaviourClass.fldSecuritySeperateRoom = Convert.ToBoolean(int.Parse(ddlSeparateRoom.SelectedValue));
            mainFamilyBehaviourClass.fldSecurityDesc = txtRequiredSecurityEnvironment.Text.Trim();
            mainFamilyBehaviourClass.fldHealthStatusID = int.Parse(ddlHealthService.SelectedValue);
            mainFamilyBehaviourClass.fldCertificate = Convert.ToBoolean(int.Parse(ddlChildCertificate.SelectedValue));
            //mainFamilyBehaviourClass.fldFuturePlan = txtFuturePlan.Text.Trim();
            mainFamilyBehaviourClass.fldPlanReturnHome = Convert.ToBoolean(int.Parse(ddlWantToReturnChild.SelectedValue));

            string strNoReturnHome = "";
            for (int i = 0; i < chkWhyNotReturnChild.Items.Count; i++)
                if (chkWhyNotReturnChild.Items[i].Selected)
                {
                    strNoReturnHome += chkWhyNotReturnChild.Items[i].Value + ";";

                }
            mainFamilyBehaviourClass.fldNoPlanReturnHomeID = strNoReturnHome;
            //mainFamilyBehaviourClass.fldWhyLeaveHome = int.Parse(ddlLabourCause.SelectedValue);

            tblAboutChildLabour aboutChildLabour = new tblAboutChildLabour();
            aboutChildLabour.fldStayTypeID = 1;
            aboutChildLabour.fldAdditionalIncome = "";
            aboutChildLabour.fldChildLabour = false;
            aboutChildLabour.fldChildBoysNo = int.Parse(txtChildBoyNoInOffice.Text.Trim());
            aboutChildLabour.fldChildGirlsNo = int.Parse(txtChildGirlNoInOffice.Text.Trim());
            aboutChildLabour.fldChildTotal = int.Parse(txtChildTotalNoInOffice.Text.Trim());
            aboutChildLabour.fldChildSchoolYes = int.Parse(txtChildGoingSchoolNo.Text.Trim());
            aboutChildLabour.fldChildSchoolNo = int.Parse(txtChildNotGoingSchoolNo.Text.Trim());
            aboutChildLabour.fldSchoolName = txtChildShcoolName.Text.Trim();
            aboutChildLabour.fldSchoolAddress = txtChildSchoolAddress.Text.Trim();
            aboutChildLabour.fldLabourTakenID = int.Parse(ddlHowChildSearched.SelectedValue);
            string strLabourWentHow = "";
            for (int i = 0; i < cblChildLabourWentHow.Items.Count; i++)
                if (cblChildLabourWentHow.Items[i].Selected)
                {
                    strLabourWentHow += cblChildLabourWentHow.Items[i].Value + ";";

                }

            aboutChildLabour.fldLabourWentHow = strLabourWentHow;

            string strLabourCause = "";
            for (int i = 0; i < cblLabourCause.Items.Count; i++)
                if (cblLabourCause.Items[i].Selected)
                {
                    strLabourCause += cblLabourCause.Items[i].Value + ";";

                }
            aboutChildLabour.fldLabourCause = strLabourCause;
            aboutChildLabour.fldJobAggrement = ddlIsEmploymentAgreement.SelectedValue.ToString();

            string strJobAgreementPt = "";
            for (int i = 0; i < chkJobAgreement.Items.Count; i++)
                if (chkJobAgreement.Items[i].Selected)
                {
                    strJobAgreementPt += chkJobAgreement.Items[i].Value + ";";

                }

            aboutChildLabour.fldJobAgreementPoints = strJobAgreementPt;
            aboutChildLabour.fldChildWorkReason = txtMainResonToChildLabor.Text.Trim();
            aboutChildLabour.fldTimeIntervalMonth = int.Parse(txtWhenChildStartedWork.Text.Trim());
            aboutChildLabour.fldSalaryID = int.Parse(ddlSalaryInfo.SelectedValue);
            aboutChildLabour.fldContactTimes = int.Parse(txtFamilyMeetNo.Text.Trim());
            aboutChildLabour.fldLabourTypeID = int.Parse(ddlLabourNature.SelectedValue);

            //tblChildLabourMainKa childLabourKa1 = new tblChildLabourMainKa();
            //tblChildLabourMainKa childLabourKa2 = new tblChildLabourMainKa();
            //tblChildLabourMainKa childLabourKa3 = new tblChildLabourMainKa();
            //tblChildLabourMainKa childLabourKa4 = new tblChildLabourMainKa();

            //childLabourKa1.fldChildNameKa = txtChildName.Text.Trim();
            //childLabourKa1.fldChildAgeKa = int.Parse(txtChildAge.Text.Trim());
            //childLabourKa1.fldParentNameKa = txtChildParentName.Text.Trim();
            //childLabourKa1.fldAddressKa = txtChildParentAddress.Text.Trim();
            //childLabourKa1.fldContactNoKa = txtChildParentContact.Text.Trim();

            //childLabourKa2.fldChildNameKa = txtChildName2.Text.Trim();
            //childLabourKa2.fldChildAgeKa = int.Parse(txtChidlAge3.Text.Trim());
            //childLabourKa2.fldParentNameKa = txtChildParentName2.Text.Trim();
            //childLabourKa2.fldAddressKa = txtChildParentAddress2.Text.Trim();
            //childLabourKa2.fldContactNoKa = txtChildParentContact2.Text.Trim();

            //childLabourKa3.fldChildNameKa = txtChildName3.Text.Trim();
            //childLabourKa3.fldChildAgeKa = int.Parse(txtChidlAge3.Text.Trim());
            //childLabourKa3.fldParentNameKa = txtChildParentName3.Text.Trim();
            //childLabourKa3.fldAddressKa = txtChildParentAddress3.Text.Trim();
            //childLabourKa3.fldContactNoKa = txtChildParentContact3.Text.Trim();

            //childLabourKa4.fldChildNameKa = txtChildName4.Text.Trim();
            //childLabourKa4.fldChildAgeKa = int.Parse(txtChidlAge4.Text.Trim());
            //childLabourKa4.fldParentNameKa = txtChildParentName4.Text.Trim();
            //childLabourKa4.fldAddressKa = txtChildParentAddress4.Text.Trim();
            //childLabourKa4.fldContactNoKa = txtChildParentContact4.Text.Trim();

            //ArrayList arr = new ArrayList();

            //if (childLabourKa1.fldChildNameKa != "")
            //    arr.Add(childLabourKa1);
            //if (childLabourKa2.fldChildNameKa != "")
            //    arr.Add(childLabourKa2);

            //if (childLabourKa3.fldChildNameKa != "")
            //    arr.Add(childLabourKa3);

            //if (childLabourKa4.fldChildNameKa != "")
            //    arr.Add(childLabourKa4);

            int mainID = ILODBAccess.saveDataIntblMain(mainClass);
            knowledgeClass.fldID = mainID;
            ILODBAccess.saveDataIntblKnowledge(knowledgeClass);
            childLabourClass.fldID = mainID;
            int childLabourID = ILODBAccess.saveDataIntblChildLabour(childLabourClass);
            childLabourDetailClass.fldID = mainID;
            childLabourDetailClass.fldChildLabourID = childLabourID;
            ILODBAccess.saveDataIntblChildLabourDetails(childLabourDetailClass);
            aboutChildLabour.fldID = mainID;
            ILODBAccess.saveDataIntblAboutChildLabour(aboutChildLabour);

            //for (int i = 0; i < arr.Count; i++)
            //{
            //    tblChildLabourMainKa tmpChildMainKa = (tblChildLabourMainKa)arr[i];
            //    tmpChildMainKa.fldID = mainID;
            //    ILODBAccess.saveDataIntblChildLabourMainKa(tmpChildMainKa);
            //}

            DataTable dtFamilyDetails = (DataTable)ViewState["CurrentData"];
            if (dtFamilyDetails != null && dtFamilyDetails.Rows.Count > 0)
            {
                ////insert the family details

                for (int i = 0; i < dtFamilyDetails.Rows.Count; i++)
                {
                    tblFamilyDetails tmpFamilyDetailsClass = new tblFamilyDetails();
                    tmpFamilyDetailsClass.fldChildLabourID = childLabourID;
                    tmpFamilyDetailsClass.fldID = mainID;
                    tmpFamilyDetailsClass.fldFamilyName = dtFamilyDetails.Rows[i][0].ToString();
                    DataTable dt = ILODBAccess.getDropDownData("fldGenderID", "tblGender", " fldGenderDesc=N'" + dtFamilyDetails.Rows[i][1].ToString() + "'");
                    tmpFamilyDetailsClass.fldFamilyGenderID = int.Parse(dt.Rows[0][0].ToString());
                    tmpFamilyDetailsClass.fldFamilyAge = int.Parse(dtFamilyDetails.Rows[i][2].ToString());
                    DataTable dt1 = ILODBAccess.getDropDownData("fldRelationID", "tblRelation", " fldRelationDesc=N'" + dtFamilyDetails.Rows[i][3].ToString() + "'");
                    tmpFamilyDetailsClass.fldFamilyRelationID = int.Parse(dt1.Rows[0][0].ToString());
                    tmpFamilyDetailsClass.fldFamilyEducation = dtFamilyDetails.Rows[i][4].ToString();
                    tmpFamilyDetailsClass.fldFamilyOccupation = dtFamilyDetails.Rows[i][5].ToString();
                    tmpFamilyDetailsClass.fldFamilyIdentitydoc = Convert.ToBoolean(dtFamilyDetails.Rows[i][8].ToString());
                    tmpFamilyDetailsClass.fldFamilyLabourStatus = dtFamilyDetails.Rows[i][7].ToString();
                    tmpFamilyDetailsClass.fldFamilyCurState = dtFamilyDetails.Rows[i][6].ToString();
                    ILODBAccess.saveDataIntblFamilyDetails(tmpFamilyDetailsClass);
                }

                DataTable dtProbableAddress = (DataTable)ViewState["CurrentData2"];
                if (dtProbableAddress != null && dtProbableAddress.Rows.Count > 0)
                {
                    ////insert the family details

                    for (int i = 0; i < dtProbableAddress.Rows.Count; i++)
                    {
                        tblAddress tmpAddress = new tblAddress();
                        //dtProbableAddress.fldChildLabourID = childLabourID;
                        tmpAddress.fldId = mainID;
                        tmpAddress.fldAddType = "श्रम गर्न गएको";
                        DataTable dt = ILODBAccess.getDropDownData("DISTINCT District_id", "tblVDC", " District='" + dtProbableAddress.Rows[i][1].ToString() + "'");
                        tmpAddress.fldDistrict = int.Parse(dt.Rows[0][0].ToString());
                        //tmpAddress.fldFamilyAge = int.Parse(dtFamilyDetails.Rows[i][2].ToString());
                        //DataTable dt1 = ILODBAccess.getDropDownData("VDC_id", "tblVDC", "VDC_name='" + dtProbableAddress.Rows[i][2].ToString() + "'");
                        tmpAddress.fldVMName = dtProbableAddress.Rows[i][2].ToString();
                        tmpAddress.fldVillage = true;
                        tmpAddress.fldWardNo = int.Parse(dtProbableAddress.Rows[0][3].ToString());
                        tmpAddress.fldTole = dtProbableAddress.Rows[i][4].ToString();
                        tmpAddress.fldContactNo = dtProbableAddress.Rows[i][5].ToString();

                        ILODBAccess.saveDataIntblAddress(tmpAddress);
                    }

                }

                childWorkClass.fldID = mainID;
                childWorkClass.fldChildLabourID = childLabourID;
                ILODBAccess.saveDataIntblChildWorkState(childWorkClass);

                mainFamilyBehaviourClass.fldID = mainID;
                mainFamilyBehaviourClass.fldChildLabourID = childLabourID;
                ILODBAccess.saveDataIntblMainFamilyBehaviour(mainFamilyBehaviourClass);

                addPermanent.fldId = mainID;
                addTemp.fldId = mainID;
                ILODBAccess.saveDataIntblAddress(addPermanent);
                ILODBAccess.saveDataIntblAddress(addTemp);
            }
        }