I have a windows form application which uses a form for two different purposes. We use the form for both our handheld system and our in-house system.I would just like someone to review the code for saving and see if I have done it the best way or if not, what the best solution is.Windows Form Save Methodprivate void SavePDVDetails()    {        LockType = 0;        AccessInfo = 0;        V2a = 0;        V10a = 0;        PayMethod = 0;        SaveCheckBoxes(ref LockType, ref AccessInfo, ref V2a, ref V10a, ref PayMethod);        var pdv = isHandheld == true ? new PDVHH() : new PDV();        if (!isHandheld)            pdv.Timestamp = timestamp;        pdv.CaseID = caseID;        pdv.CustContactTel = txtCustContactTel.Text;        pdv.CustMobileTel = txtCustMobileTel.Text;        pdv.PropertyType = Systems.CheckComboNullString(cboPropertyType);        pdv.PremisesStatus = Systems.CheckComboNullString(cboPremisesStatus);        pdv.LockType = LockType;        pdv.AccessInfo = AccessInfo;        pdv.V1 = Systems.CheckComboNullString(cboV1);        pdv.V2 = Systems.CheckComboNullString(cboV2);        pdv.V2a = V2a;        pdv.V3 = Systems.CheckComboNullString(cboV3);        pdv.V4 = Systems.CheckComboNullString(cboV4);        pdv.V4a = txtV4a.Text;        pdv.V5 = Systems.CheckComboNullString(cboV5);        pdv.V6 = Systems.CheckComboNullString(cboV6);        pdv.V7 = Systems.CheckComboNullString(cboV7);        pdv.V7a = txtV7a.Text;        pdv.V8 = Systems.CheckComboNullString(cboV8);        pdv.V8a = txtV8a.Text;        pdv.V9 = Systems.CheckComboNullString(cboV9);        pdv.V9a = txtV9a.Text;        pdv.V10 = Systems.CheckComboNullString(cboV10);        pdv.V10a = V10a;        pdv.V11 = Systems.CheckComboNullString(cboV11);        pdv.V11a = txtV11a.Text;        pdv.V12 = Systems.CheckComboNullString(cboV12);        pdv.VulnerableOther = txtVulnerableOther.Text;        pdv.ContactType = Systems.CheckComboNullString(cboContactType);        pdv.NINumber = txtNINumber.Text;        pdv.ContactDate = mtxtContactDate.Text;        pdv.CustDOB = mtxtCustDOB.Text;        pdv.PayAmount = txtPayAmount.Text == string.Empty ? Convert.ToDouble(null) : Convert.ToDouble(txtPayAmount.Text);        pdv.ClearedFunds = chkClearedFunds.Checked;        pdv.PayAmount2 = txtPayAmount2.Text == string.Empty ? Convert.ToDouble(null) : Convert.ToDouble(txtPayAmount2.Text);        pdv.ClearedFunds2 = chkClearedFunds.Checked;        pdv.PayMethod = PayMethod;        pdv.ReceiptNo = txtReceiptNo.Text;        pdv.DirectPayAmount = txtDirectPayAmount.Text == string.Empty ? Convert.ToDouble(null) : Convert.ToDouble(txtDirectPayAmount.Text);        pdv.COT = chkCOT.Checked;        pdv.TitleCode = Systems.CheckComboNullString(cboTitle);        pdv.OtherTitle = txtOtherTitle.Text;        pdv.FirstName = txtFirstName.Text;        pdv.MiddleInitials = txtMiddleInitials.Text;        pdv.SurName = txtSurName.Text;        pdv.COTProofType = Systems.CheckComboNullString(cboCOTProofType);        pdv.COTDate = mtxtCOTDate.Text;        pdv.PropRespMtrRead = txtPropRestMtrRead.Text;        pdv.PropRespMtrBRead = txtPropRestMtrBRead.Text;        pdv.PrevAdd1 = txtPrevAdd1.Text;        pdv.PrevAdd2 = txtPrevAdd2.Text;        pdv.PrevAdd3 = txtPrevAdd3.Text;        pdv.PrevAdd4 = txtPrevAdd4.Text;        pdv.PrevPostcode = txtPrevAddPostcode.Text;        pdv.FwdName = txtFwdName.Text;        pdv.FwdAdd1 = txtFwdAdd1.Text;        pdv.FwdAdd2 = txtFwdAdd2.Text;        pdv.FwdAdd3 = txtFwdAdd3.Text;        pdv.FwdAdd4 = txtFwdAdd4.Text;        pdv.FwdPostcode = txtFwdAddPostcode.Text;        pdv.PayArranged = chkPayArranged.Checked;        pdv.PayStartDate = mtxtPayStartDate.Text;        pdv.PayArrAmount = txtPayArrAmount.Text == string.Empty ? Convert.ToDouble(null) : Convert.ToDouble(txtPayArrAmount.Text);        pdv.Frequency = Systems.CheckComboNullString(cboFrequency);        pdv.PayArrDetail = Systems.CheckComboNullString(cboPayArrDetail);        pdv.PPMAgreed = chkPPMAgreed.Checked;        pdv.PPMBookedDate = mtxtPPMApptDate.Text;        pdv.PPMHHBookedTime = Systems.CheckComboNullString(cboPPMApptTime);        pdv.EmploymentStatus = Systems.CheckComboNullString(cboEmploymentStatus);        pdv.RecoveryRate = txtRecoveryRate.Text == string.Empty ? Convert.ToDouble(null) : Convert.ToDouble(txtRecoveryRate.Text);        pdv.PPMApptComments = txtPPMApptComments.Text;        pdv.PPMArranged = chkPPMArranged.Checked;        pdv.PPMAppointmentDate = mtxtPPMAppointmentDate.Text;        pdv.PPMDetail = Systems.CheckComboNullString(cboPPMDetail);        pdv.AuthCode = txtAuthCode.Text;        pdv.DateOfLeaving = mtxtDateOfLeaving.Text;        pdv.VacantPropComments = txtVacPropComments.Text;        pdv.CustComplaintCode = Systems.CheckComboNullString(cboCustComplaintCode);        pdv.DisputeComments = txtDisputeComments.Text;        pdv.IncidentDets = txtIncidentDets.Text;        pdv.PDVComments = txtPDVComments.Text;        pdv.Dissatisfaction = chkDissatisfied.Checked;        pdv.DissatisfactionComments = txtDissatisfiedComments.Text;        pdv.HealthSafety = chkHealthSafety.Checked;        pdv.ContactCode = Systems.CheckComboNullString(cboContact_Code);        pdv.WhoSpokenTo = Systems.CheckComboNullString(cboWhoSpokenTo);        pdv.HealthSafetyComments = txtHealthSafetyComments.Text;        pdv.InfoNotes = txtInfoNotes.Text;        pdv.EnergyTrust = chkEnergyTrust.Checked;        pdv.EnergyTrustComments = txtEnergyTrustComments.Text;        pdv.VisitDate1 = mtxtVisitDate1.Text;        pdv.VisitTime = mtxtVisitTime.Text;        pdv.VisitDate2 = mtxtVisitDate2.Text;        pdv.VisitTime2 = mtxtVisitTime2.Text;        if (isHandheld)        {            (pdv as PDVHH).PDVResult = Systems.CheckComboNullString(cboGasPDVResult);            (pdv as PDVHH).SecPDVResult = Systems.CheckComboNullString(cboElectricPDVResult);            pdvDetails.SavePDVHH((PDVHH)pdv);        }        else            pdvDetails.SavePDV(pdv);        UpdateMeterPDV();        AccountDetails.SaveMeterPDV(meterPDV, isHandheld);    }Model   public class PDV{    public int CaseID { get; set; }    public object Timestamp { get; set; }    public string CustContactTel { get; set; }    public string CustMobileTel { get; set; }    public string PropertyType { get; set; }    public string PremisesStatus { get; set; }    public int LockType { get; set; }    public int AccessInfo { get; set; }    public string V1 { get; set; }    public string V2 { get; set; }    public int V2a { get; set; }    public string V3 { get; set; }    public string V4 { get; set; }    public string V4a { get; set; }    public string V5 { get; set; }    public string V6 { get; set; }    public string V7 { get; set; }    public string V7a { get; set; }    public string V8 { get; set; }    public string V8a { get; set; }    public string V9 { get; set; }    public string V9a { get; set; }    public string V10 { get; set; }    public int V10a { get; set; }    public string V11 { get; set; }    public string V11a { get; set; }    public string V12 { get; set; }    public string VulnerableOther { get; set; }    public string ContactType { get; set; }    public string NINumber { get; set; }    public string ContactDate { get; set; }    public string CustDOB { get; set; }    public double? PayAmount { get; set; }    public bool ClearedFunds { get; set; }    public double? PayAmount2 { get; set; }    public bool ClearedFunds2 { get; set; }    public int PayMethod { get; set; }    public string ReceiptNo { get; set; }    public double? DirectPayAmount { get; set; }    public bool COT { get; set; }    public string TitleCode { get; set; }    public string OtherTitle { get; set; }    public string FirstName { get; set; }    public string MiddleInitials { get; set; }    public string SurName { get; set; }    public string COTProofType { get; set; }    public string COTDate { get; set; }    public string PropRespMtrRead { get; set; }    public string PropRespMtrBRead { get; set; }    public string PrevAdd1 { get; set; }    public string PrevAdd2 { get; set; }    public string PrevAdd3 { get; set; }    public string PrevAdd4 { get; set; }    public string PrevPostcode { get; set; }    public string FwdName { get; set; }    public string FwdAdd1 { get; set; }    public string FwdAdd2 { get; set; }    public string FwdAdd3 { get; set; }    public string FwdAdd4 { get; set; }    public string FwdPostcode { get; set; }    public bool PayArranged { get; set; }    public string PayStartDate { get; set; }    public double? PayArrAmount { get; set; }    public string Frequency { get; set; }    public string PayArrDetail { get; set; }    public bool PPMAgreed { get; set; }    public string PPMBookedDate { get; set; }    public string PPMHHBookedTime { get; set; }    public string EmploymentStatus { get; set; }    public double? RecoveryRate { get; set; }    public string PPMApptComments { get; set; }    public bool PPMArranged { get; set; }    public string PPMAppointmentDate { get; set; }    public string PPMDetail { get; set; }    public string AuthCode { get; set; }    public string DateOfLeaving { get; set; }    public string VacantPropComments { get; set; }    public string CustComplaintCode { get; set; }    public string DisputeComments { get; set; }    public string IncidentDets { get; set; }    public string PDVComments { get; set; }    public bool Dissatisfaction { get; set; }    public string DissatisfactionComments { get; set; }    public bool HealthSafety { get; set; }    public string ContactCode { get; set; }    public string WhoSpokenTo { get; set; }    public string HealthSafetyComments { get; set; }    public string InfoNotes { get; set; }    public bool EnergyTrust { get; set; }    public string EnergyTrustComments { get; set; }    public string VisitDate1 { get; set; }    public string VisitTime { get; set; }    public string VisitDate2 { get; set; }    public string VisitTime2 { get; set; }    public string ClientComments { get; set; }    public string PDVNote { get; set; }}public class PDVHH : PDV{    public string PDVResult { get; set; }    public string SecPDVResult { get; set; }    public string D2PrintDate { get; set; }    public string RPDVResult { get; set; }    public string RSecPDVResult { get; set; }}Save Functionspublic void SavePDV(PDV pdv)    {        var parameters = new List<SqlParameter>();        parameters.Add(new SqlParameter(@CaseID, pdv.CaseID));        parameters.Add(new SqlParameter(@PDVTimestamp, pdv.Timestamp));        parameters.Add(new SqlParameter(@CustContactTel, pdv.CustContactTel));        parameters.Add(new SqlParameter(@CustMobileTel,pdv.CustMobileTel));        parameters.Add(new SqlParameter(@PropertyType, pdv.PropertyType));        parameters.Add(new SqlParameter(@PremisesStatus, pdv.PremisesStatus));        parameters.Add(new SqlParameter(@LockType, pdv.LockType));        parameters.Add(new SqlParameter(@AccessInfo, pdv.AccessInfo));        parameters.Add(new SqlParameter(@V1, pdv.V1));        parameters.Add(new SqlParameter(@V2, pdv.V2));        parameters.Add(new SqlParameter(@V2a, pdv.V2a));        parameters.Add(new SqlParameter(@V3, pdv.V3));        parameters.Add(new SqlParameter(@V4, pdv.V4));        parameters.Add(new SqlParameter(@V4a, pdv.V4a));        parameters.Add(new SqlParameter(@V5, pdv.V5));        parameters.Add(new SqlParameter(@V6, pdv.V6));        parameters.Add(new SqlParameter(@V7, pdv.V7));        parameters.Add(new SqlParameter(V7a, pdv.V7a));        parameters.Add(new SqlParameter(@V8, pdv.V8));        parameters.Add(new SqlParameter(@V8a, pdv.V8a));        parameters.Add(new SqlParameter(@V9, pdv.V9));        parameters.Add(new SqlParameter(@V9a, pdv.V9a));        parameters.Add(new SqlParameter(@V10, pdv.V10));        parameters.Add(new SqlParameter(@V10a, pdv.V10a));        parameters.Add(new SqlParameter(@V11, pdv.V11));        parameters.Add(new SqlParameter(@V11a, pdv.V11a));        parameters.Add(new SqlParameter(@V12, pdv.V12));        parameters.Add(new SqlParameter(@VulnerableOther, pdv.VulnerableOther));        parameters.Add(new SqlParameter(@ContactType, pdv.ContactType));        parameters.Add(new SqlParameter(@NINumber, pdv.NINumber));        parameters.Add(new SqlParameter(@CustDOB, pdv.ContactDate));        parameters.Add(new SqlParameter(@ContactDate, pdv.CustDOB));        parameters.Add(new SqlParameter(@PayAmount, pdv.PayAmount));        parameters.Add(new SqlParameter(@ClearedFunds, pdv.ClearedFunds));        parameters.Add(new SqlParameter(@PayAmount2, pdv.PayAmount2));        parameters.Add(new SqlParameter(@ClearedFunds2, pdv.ClearedFunds2));        parameters.Add(new SqlParameter(@PayMethod, pdv.PayMethod));        parameters.Add(new SqlParameter(@ReceiptNo, pdv.ReceiptNo));        parameters.Add(new SqlParameter(@DirectPayAmount, pdv.DirectPayAmount));        parameters.Add(new SqlParameter(@COT, pdv.COT));        parameters.Add(new SqlParameter(@TitleCode, pdv.TitleCode));        parameters.Add(new SqlParameter(@OtherTitle, pdv.OtherTitle));        parameters.Add(new SqlParameter(@FirstName, pdv.FirstName));        parameters.Add(new SqlParameter(@MiddleInitials, pdv.MiddleInitials));        parameters.Add(new SqlParameter(@SurName, pdv.SurName));        parameters.Add(new SqlParameter(@COTProofType, pdv.COTProofType));        parameters.Add(new SqlParameter(@COTDate, pdv.COTDate));        parameters.Add(new SqlParameter(@PropRespMtrRead, pdv.PropRespMtrRead));        parameters.Add(new SqlParameter(@PropRespMtrBRead, pdv.PropRespMtrBRead));        parameters.Add(new SqlParameter(@PrevAdd1, pdv.PrevAdd1));        parameters.Add(new SqlParameter(@PrevAdd2, pdv.PrevAdd2));        parameters.Add(new SqlParameter(@PrevAdd3, pdv.PrevAdd3));        parameters.Add(new SqlParameter(@PrevAdd4, pdv.PrevAdd4));        parameters.Add(new SqlParameter(@PrevPostcode, pdv.PrevPostcode));        parameters.Add(new SqlParameter(@FwdName, pdv.FwdName));        parameters.Add(new SqlParameter(@FwdAdd1, pdv.FwdAdd1));        parameters.Add(new SqlParameter(@FwdAdd2, pdv.FwdAdd2));        parameters.Add(new SqlParameter(@FwdAdd3, pdv.FwdAdd3));        parameters.Add(new SqlParameter(@FwdAdd4, pdv.FwdAdd4));        parameters.Add(new SqlParameter(@FwdPostcode, pdv.FwdPostcode));        parameters.Add(new SqlParameter(@PayArranged, pdv.PayArranged));        parameters.Add(new SqlParameter(@PayStartDate, pdv.PayStartDate));        parameters.Add(new SqlParameter(@PayArrAmount, pdv.PayArrAmount));        parameters.Add(new SqlParameter(@Frequency, pdv.Frequency));        parameters.Add(new SqlParameter(@PayArrDetail, pdv.PayArrDetail));        parameters.Add(new SqlParameter(@PPMAgreed, pdv.PPMAgreed));        parameters.Add(new SqlParameter(@PPMBookedDate, pdv.PPMBookedDate));        parameters.Add(new SqlParameter(@PPMHHBookedTime, pdv.PPMHHBookedTime));        parameters.Add(new SqlParameter(@EmploymentStatus, pdv.EmploymentStatus));        parameters.Add(new SqlParameter(@RecoveryRate, pdv.RecoveryRate));        parameters.Add(new SqlParameter(@PPMApptComments, pdv.PPMApptComments));        parameters.Add(new SqlParameter(@PPMArranged, pdv.PPMArranged));        parameters.Add(new SqlParameter(@PPMAppointmentDate, pdv.PPMAppointmentDate));        parameters.Add(new SqlParameter(@PPMDetail, pdv.PPMDetail));        parameters.Add(new SqlParameter(@AuthCode, pdv.AuthCode));        parameters.Add(new SqlParameter(@DateOfLeaving, pdv.DateOfLeaving));        parameters.Add(new SqlParameter(@VacantPropComments, pdv.VacantPropComments));        parameters.Add(new SqlParameter(@CustComplaintCode, pdv.CustComplaintCode));        parameters.Add(new SqlParameter(@DisputeComments, pdv.DisputeComments));        parameters.Add(new SqlParameter(@IncidentDets, pdv.IncidentDets));        parameters.Add(new SqlParameter(@PDVComments, pdv.PDVComments));        parameters.Add(new SqlParameter(@Dissatisfaction, pdv.Dissatisfaction));        parameters.Add(new SqlParameter(@DissatisfactionComments, pdv.DissatisfactionComments));        parameters.Add(new SqlParameter(@HealthSafety, pdv.HealthSafety));        parameters.Add(new SqlParameter(@Contact_Code, pdv.ContactCode));        parameters.Add(new SqlParameter(@WhoSpokenTo, pdv.WhoSpokenTo));        parameters.Add(new SqlParameter(@HealthSafetyComments, pdv.HealthSafetyComments));        parameters.Add(new SqlParameter(@InfoNotes, pdv.InfoNotes));        parameters.Add(new SqlParameter(@EnergyTrust, pdv.EnergyTrust));        parameters.Add(new SqlParameter(@EnergyTrustComments, pdv.EnergyTrustComments));        parameters.Add(new SqlParameter(@VisitDate1, pdv.VisitDate1));        parameters.Add(new SqlParameter(@VisitTime, pdv.VisitTime));        parameters.Add(new SqlParameter(@VisitDate2, pdv.VisitDate2));        parameters.Add(new SqlParameter(@VisitTime2, pdv.VisitTime2));        SQLHelper.ExecuteNonQuery(prcUMUpdateDebtPDVDetails, CommandType.StoredProcedure, parameters);        parameters = null;    }    public void SavePDVHH(PDVHH pdv)    {        var parameters = new List<SqlParameter>();        parameters.Add(new SqlParameter(@CaseID, pdv.CaseID));        parameters.Add(new SqlParameter(@CustContactTel, pdv.CustContactTel));        parameters.Add(new SqlParameter(@CustMobileTel, pdv.CustMobileTel));        parameters.Add(new SqlParameter(@PropertyType, pdv.PropertyType));        parameters.Add(new SqlParameter(@PremisesStatus, pdv.PremisesStatus));        parameters.Add(new SqlParameter(@LockType, pdv.LockType));        parameters.Add(new SqlParameter(@AccessInfo, pdv.AccessInfo));        parameters.Add(new SqlParameter(@V1, pdv.V1));        parameters.Add(new SqlParameter(@V2, pdv.V2));        parameters.Add(new SqlParameter(@V2a, pdv.V2a));        parameters.Add(new SqlParameter(@V3, pdv.V3));        parameters.Add(new SqlParameter(@V4, pdv.V4));        parameters.Add(new SqlParameter(@V4a, pdv.V4a));        parameters.Add(new SqlParameter(@V5, pdv.V5));        parameters.Add(new SqlParameter(@V6, pdv.V6));        parameters.Add(new SqlParameter(@V7, pdv.V7));        parameters.Add(new SqlParameter(V7a, pdv.V7a));        parameters.Add(new SqlParameter(@V8, pdv.V8));        parameters.Add(new SqlParameter(@V8a, pdv.V8a));        parameters.Add(new SqlParameter(@V9, pdv.V9));        parameters.Add(new SqlParameter(@V9a, pdv.V9a));        parameters.Add(new SqlParameter(@V10, pdv.V10));        parameters.Add(new SqlParameter(@V10a, pdv.V10a));        parameters.Add(new SqlParameter(@V11, pdv.V11));        parameters.Add(new SqlParameter(@V11a, pdv.V11a));        parameters.Add(new SqlParameter(@V12, pdv.V12));        parameters.Add(new SqlParameter(@VulnerableOther, pdv.VulnerableOther));        parameters.Add(new SqlParameter(@ContactType, pdv.ContactType));        parameters.Add(new SqlParameter(@NINumber, pdv.NINumber));        parameters.Add(new SqlParameter(@CustDOB, pdv.ContactDate));        parameters.Add(new SqlParameter(@ContactDate, pdv.CustDOB));        parameters.Add(new SqlParameter(@PayAmount, pdv.PayAmount));        parameters.Add(new SqlParameter(@PayAmount2, pdv.PayAmount2));        parameters.Add(new SqlParameter(@PayMethod, pdv.PayMethod));        parameters.Add(new SqlParameter(@ReceiptNo, pdv.ReceiptNo));        parameters.Add(new SqlParameter(@DirectPayAmount, pdv.DirectPayAmount));        parameters.Add(new SqlParameter(@COT, pdv.COT));        parameters.Add(new SqlParameter(@TitleCode, pdv.TitleCode));        parameters.Add(new SqlParameter(@OtherTitle, pdv.OtherTitle));        parameters.Add(new SqlParameter(@FirstName, pdv.FirstName));        parameters.Add(new SqlParameter(@MiddleInitials, pdv.MiddleInitials));        parameters.Add(new SqlParameter(@SurName, pdv.SurName));        parameters.Add(new SqlParameter(@COTProofType, pdv.COTProofType));        parameters.Add(new SqlParameter(@COTDate, pdv.COTDate));        parameters.Add(new SqlParameter(@PropRespMtrRead, pdv.PropRespMtrRead));        parameters.Add(new SqlParameter(@PropRespMtrBRead, pdv.PropRespMtrBRead));        parameters.Add(new SqlParameter(@PrevAdd1, pdv.PrevAdd1));        parameters.Add(new SqlParameter(@PrevAdd2, pdv.PrevAdd2));        parameters.Add(new SqlParameter(@PrevAdd3, pdv.PrevAdd3));        parameters.Add(new SqlParameter(@PrevAdd4, pdv.PrevAdd4));        parameters.Add(new SqlParameter(@PrevPostcode, pdv.PrevPostcode));        parameters.Add(new SqlParameter(@FwdName, pdv.FwdName));        parameters.Add(new SqlParameter(@FwdAdd1, pdv.FwdAdd1));        parameters.Add(new SqlParameter(@FwdAdd2, pdv.FwdAdd2));        parameters.Add(new SqlParameter(@FwdAdd3, pdv.FwdAdd3));        parameters.Add(new SqlParameter(@FwdAdd4, pdv.FwdAdd4));        parameters.Add(new SqlParameter(@FwdPostcode, pdv.FwdPostcode));        parameters.Add(new SqlParameter(@PayArranged, pdv.PayArranged));        parameters.Add(new SqlParameter(@PayStartDate, pdv.PayStartDate));        parameters.Add(new SqlParameter(@PayArrAmount, pdv.PayArrAmount));        parameters.Add(new SqlParameter(@Frequency, pdv.Frequency));        parameters.Add(new SqlParameter(@PayArrDetail, pdv.PayArrDetail));        parameters.Add(new SqlParameter(@PPMAgreed, pdv.PPMAgreed));        parameters.Add(new SqlParameter(@PPMBookedDate, pdv.PPMBookedDate));        parameters.Add(new SqlParameter(@PPMHHBookedTime, pdv.PPMHHBookedTime));        parameters.Add(new SqlParameter(@EmploymentStatus, pdv.EmploymentStatus));        parameters.Add(new SqlParameter(@RecoveryRate, pdv.RecoveryRate));        parameters.Add(new SqlParameter(@PPMApptComments, pdv.PPMApptComments));        parameters.Add(new SqlParameter(@PPMArranged, pdv.PPMArranged));        parameters.Add(new SqlParameter(@PPMAppointmentDate, pdv.PPMAppointmentDate));        parameters.Add(new SqlParameter(@PPMDetail, pdv.PPMDetail));        parameters.Add(new SqlParameter(@AuthCode, pdv.AuthCode));        parameters.Add(new SqlParameter(@DateOfLeaving, pdv.DateOfLeaving));        parameters.Add(new SqlParameter(@VacantPropComments, pdv.VacantPropComments));        parameters.Add(new SqlParameter(@CustComplaintCode, pdv.CustComplaintCode));        parameters.Add(new SqlParameter(@DisputeComments, pdv.DisputeComments));        parameters.Add(new SqlParameter(@IncidentDets, pdv.IncidentDets));        parameters.Add(new SqlParameter(@PDVComments, pdv.PDVComments));        parameters.Add(new SqlParameter(@Dissatisfaction, pdv.Dissatisfaction));        parameters.Add(new SqlParameter(@DissatisfactionComments, pdv.DissatisfactionComments));        parameters.Add(new SqlParameter(@HealthSafety, pdv.HealthSafety));        parameters.Add(new SqlParameter(@Contact_Code, pdv.ContactCode));        parameters.Add(new SqlParameter(@WhoSpokenTo, pdv.WhoSpokenTo));        parameters.Add(new SqlParameter(@HealthSafetyComments, pdv.HealthSafetyComments));        parameters.Add(new SqlParameter(@InfoNotes, pdv.InfoNotes));        parameters.Add(new SqlParameter(@EnergyTrust, pdv.EnergyTrust));        parameters.Add(new SqlParameter(@EnergyTrustComments, pdv.EnergyTrustComments));        parameters.Add(new SqlParameter(@VisitDate1, pdv.VisitDate1));        parameters.Add(new SqlParameter(@VisitTime, pdv.VisitTime));        parameters.Add(new SqlParameter(@VisitDate2, pdv.VisitDate2));        parameters.Add(new SqlParameter(@VisitTime2, pdv.VisitTime2));        parameters.Add(new SqlParameter(@RPDVResult, pdv.RPDVResult));        parameters.Add(new SqlParameter(@RSecPDVResult, pdv.RSecPDVResult));        SQLHelper.ExecuteNonQuery(prcUMUpdateDebtPDVHHDetails, CommandType.StoredProcedure, parameters);        parameters = null;    }
Saving a form to a database
c#;sql;form
Ok so you have a lot of duplicated properties here.What you want to do is have each of your objects maintain the list of properties that they will use during a save.Use inheritance to your advantage. I've added a method GetCommandParameters to your base class, this is overridable. Its only concern is to add the parameters that are valid for that object.public class PDV{    public int CaseID { get; set; }    public object Timestamp { get; set; }    public string CustContactTel { get; set; }    public string CustMobileTel { get; set; }    public string PropertyType { get; set; }    public string PremisesStatus { get; set; }    public int LockType { get; set; }    public int AccessInfo { get; set; }    public string V1 { get; set; }    public string V2 { get; set; }    public int V2a { get; set; }    public string V3 { get; set; }    public string V4 { get; set; }    public string V4a { get; set; }    public string V5 { get; set; }    public string V6 { get; set; }    public string V7 { get; set; }    public string V7a { get; set; }    public string V8 { get; set; }    public string V8a { get; set; }    public string V9 { get; set; }    public string V9a { get; set; }    public string V10 { get; set; }    public int V10a { get; set; }    public string V11 { get; set; }    public string V11a { get; set; }    public string V12 { get; set; }    public string VulnerableOther { get; set; }    public string ContactType { get; set; }    public string NINumber { get; set; }    public string ContactDate { get; set; }    public string CustDOB { get; set; }    public double? PayAmount { get; set; }    public bool ClearedFunds { get; set; }    public double? PayAmount2 { get; set; }    public bool ClearedFunds2 { get; set; }    public int PayMethod { get; set; }    public string ReceiptNo { get; set; }    public double? DirectPayAmount { get; set; }    public bool COT { get; set; }    public string TitleCode { get; set; }    public string OtherTitle { get; set; }    public string FirstName { get; set; }    public string MiddleInitials { get; set; }    public string SurName { get; set; }    public string COTProofType { get; set; }    public string COTDate { get; set; }    public string PropRespMtrRead { get; set; }    public string PropRespMtrBRead { get; set; }    public string PrevAdd1 { get; set; }    public string PrevAdd2 { get; set; }    public string PrevAdd3 { get; set; }    public string PrevAdd4 { get; set; }    public string PrevPostcode { get; set; }    public string FwdName { get; set; }    public string FwdAdd1 { get; set; }    public string FwdAdd2 { get; set; }    public string FwdAdd3 { get; set; }    public string FwdAdd4 { get; set; }    public string FwdPostcode { get; set; }    public bool PayArranged { get; set; }    public string PayStartDate { get; set; }    public double? PayArrAmount { get; set; }    public string Frequency { get; set; }    public string PayArrDetail { get; set; }    public bool PPMAgreed { get; set; }    public string PPMBookedDate { get; set; }    public string PPMHHBookedTime { get; set; }    public string EmploymentStatus { get; set; }    public double? RecoveryRate { get; set; }    public string PPMApptComments { get; set; }    public bool PPMArranged { get; set; }    public string PPMAppointmentDate { get; set; }    public string PPMDetail { get; set; }    public string AuthCode { get; set; }    public string DateOfLeaving { get; set; }    public string VacantPropComments { get; set; }    public string CustComplaintCode { get; set; }    public string DisputeComments { get; set; }    public string IncidentDets { get; set; }    public string PDVComments { get; set; }    public bool Dissatisfaction { get; set; }    public string DissatisfactionComments { get; set; }    public bool HealthSafety { get; set; }    public string ContactCode { get; set; }    public string WhoSpokenTo { get; set; }    public string HealthSafetyComments { get; set; }    public string InfoNotes { get; set; }    public bool EnergyTrust { get; set; }    public string EnergyTrustComments { get; set; }    public string VisitDate1 { get; set; }    public string VisitTime { get; set; }    public string VisitDate2 { get; set; }    public string VisitTime2 { get; set; }    public string ClientComments { get; set; }    public string PDVNote { get; set; }     public virtual List<SqlParameter> GetCommandParameters()     {         return new List<SqlParameter>         {             new SqlParameter(@CaseID, CaseID),             new SqlParameter(@PDVTimestamp, Timestamp),             new SqlParameter(@CustContactTel, CustContactTel),             new SqlParameter(@CustMobileTel, CustMobileTel),             new SqlParameter(@PropertyType, PropertyType),             new SqlParameter(@PremisesStatus, PremisesStatus),             new SqlParameter(@LockType, LockType),             new SqlParameter(@AccessInfo, AccessInfo),             new SqlParameter(@V1, V1),             new SqlParameter(@V2, V2),             new SqlParameter(@V2a, V2a),             new SqlParameter(@V3, V3),             new SqlParameter(@V4, V4),             new SqlParameter(@V4a, V4a),             new SqlParameter(@V5, V5),             new SqlParameter(@V6, V6),             new SqlParameter(@V7, V7),             new SqlParameter(V7a, V7a),             new SqlParameter(@V8, V8),             new SqlParameter(@V8a, V8a),             new SqlParameter(@V9, V9),             new SqlParameter(@V9a, V9a),             new SqlParameter(@V10, V10),             new SqlParameter(@V10a, V10a),             new SqlParameter(@V11, V11),             new SqlParameter(@V11a, V11a),             new SqlParameter(@V12, V12),             new SqlParameter(@VulnerableOther, VulnerableOther),             new SqlParameter(@ContactType, ContactType),             new SqlParameter(@NINumber, NINumber),             new SqlParameter(@CustDOB, ContactDate),             new SqlParameter(@ContactDate, CustDOB),             new SqlParameter(@PayAmount, PayAmount),             new SqlParameter(@ClearedFunds, ClearedFunds),             new SqlParameter(@PayAmount2, PayAmount2),             new SqlParameter(@ClearedFunds2, ClearedFunds2),             new SqlParameter(@PayMethod, PayMethod),             new SqlParameter(@ReceiptNo, ReceiptNo),             new SqlParameter(@DirectPayAmount, DirectPayAmount),             new SqlParameter(@COT, COT),             new SqlParameter(@TitleCode, TitleCode),             new SqlParameter(@OtherTitle, OtherTitle),             new SqlParameter(@FirstName, FirstName),             new SqlParameter(@MiddleInitials, MiddleInitials),             new SqlParameter(@SurName, SurName),             new SqlParameter(@COTProofType, COTProofType),             new SqlParameter(@COTDate, COTDate),             new SqlParameter(@PropRespMtrRead, PropRespMtrRead),             new SqlParameter(@PropRespMtrBRead, PropRespMtrBRead),             new SqlParameter(@PrevAdd1, PrevAdd1),             new SqlParameter(@PrevAdd2, PrevAdd2),             new SqlParameter(@PrevAdd3, PrevAdd3),             new SqlParameter(@PrevAdd4, PrevAdd4),             new SqlParameter(@PrevPostcode, PrevPostcode),             new SqlParameter(@FwdName, FwdName),             new SqlParameter(@FwdAdd1, FwdAdd1),             new SqlParameter(@FwdAdd2, FwdAdd2),             new SqlParameter(@FwdAdd3, FwdAdd3),             new SqlParameter(@FwdAdd4, FwdAdd4),             new SqlParameter(@FwdPostcode, FwdPostcode),             new SqlParameter(@PayArranged, PayArranged),             new SqlParameter(@PayStartDate, PayStartDate),             new SqlParameter(@PayArrAmount, PayArrAmount),             new SqlParameter(@Frequency, Frequency),             new SqlParameter(@PayArrDetail, PayArrDetail),             new SqlParameter(@PPMAgreed, PPMAgreed),             new SqlParameter(@PPMBookedDate, PPMBookedDate),             new SqlParameter(@PPMHHBookedTime, PPMHHBookedTime),             new SqlParameter(@EmploymentStatus, EmploymentStatus),             new SqlParameter(@RecoveryRate, RecoveryRate),             new SqlParameter(@PPMApptComments, PPMApptComments),             new SqlParameter(@PPMArranged, PPMArranged),             new SqlParameter(@PPMAppointmentDate, PPMAppointmentDate),             new SqlParameter(@PPMDetail, PPMDetail),             new SqlParameter(@AuthCode, AuthCode),             new SqlParameter(@DateOfLeaving, DateOfLeaving),             new SqlParameter(@VacantPropComments, VacantPropComments),             new SqlParameter(@CustComplaintCode, CustComplaintCode),             new SqlParameter(@DisputeComments, DisputeComments),             new SqlParameter(@IncidentDets, IncidentDets),             new SqlParameter(@PDVComments, PDVComments),             new SqlParameter(@Dissatisfaction, Dissatisfaction),             new SqlParameter(@DissatisfactionComments, DissatisfactionComments),             new SqlParameter(@HealthSafety, HealthSafety),             new SqlParameter(@Contact_Code, ContactCode),             new SqlParameter(@WhoSpokenTo, WhoSpokenTo),             new SqlParameter(@HealthSafetyComments, HealthSafetyComments),             new SqlParameter(@InfoNotes, InfoNotes),             new SqlParameter(@EnergyTrust, EnergyTrust),             new SqlParameter(@EnergyTrustComments, EnergyTrustComments),             new SqlParameter(@VisitDate1, VisitDate1),             new SqlParameter(@VisitTime, VisitTime),             new SqlParameter(@VisitDate2, VisitDate2),             new SqlParameter(@VisitTime2, VisitTime2)         };     }}Because PDVHH  inherits PDV, we want all of the parameters that apply to that class aswell as the new properties the we have. This way we only maintain a list in appropriate places.public class PDVHH : PDV{    public string PDVResult { get; set; }    public string SecPDVResult { get; set; }    public string D2PrintDate { get; set; }    public string RPDVResult { get; set; }    public string RSecPDVResult { get; set; }    public override List<SqlParameter> GetCommandParameters()    {        var rtnList = base.GetCommandParameters();        rtnList.Add(new SqlParameter(@PDVResult, PDVResult));        rtnList.Add(new SqlParameter(@SecPDVResult, SecPDVResult));        rtnList.Add(new SqlParameter(@D2PrintDate, D2PrintDate));        rtnList.Add(new SqlParameter(@RPDVResult, RPDVResult));        rtnList.Add(new SqlParameter(@RSecPDVResult, RSecPDVResult));        return rtnList;    }}This makes your save code much more succinct.public void SavePDV(PDV pdv){    SQLHelper.ExecuteNonQuery(prcUMUpdateDebtPDVDetails, CommandType.StoredProcedure, pdv.GetCommandParameters());}public void SavePDVHH(PDVHH pdv){    SQLHelper.ExecuteNonQuery(prcUMUpdateDebtPDVHHDetails, CommandType.StoredProcedure, pdv.GetCommandParameters());}