public List<FormFieldValue> GetAllByFormFieldId(int FormFieldId)
 {
     FormFieldValueDAC _formFieldValueComponent = new FormFieldValueDAC();
     IDataReader reader = _formFieldValueComponent.GetAllFormFieldValue("FormFieldId = " + FormFieldId).CreateDataReader();
     List<FormFieldValue> _formFieldValueList = new List<FormFieldValue>();
     while (reader.Read())
     {
         if (_formFieldValueList == null)
             _formFieldValueList = new List<FormFieldValue>();
         FormFieldValue _formFieldValue = new FormFieldValue();
         if (reader["FormFieldValueId"] != DBNull.Value)
             _formFieldValue.FormFieldValueId = Convert.ToInt32(reader["FormFieldValueId"]);
         if (reader["FormFieldId"] != DBNull.Value)
             _formFieldValue.FormFieldId = Convert.ToInt32(reader["FormFieldId"]);
         if (reader["FieldValue"] != DBNull.Value)
             _formFieldValue.FieldValue = Convert.ToString(reader["FieldValue"]);
         if (reader["FieldValueHelp"] != DBNull.Value)
             _formFieldValue.FieldValueHelp = Convert.ToString(reader["FieldValueHelp"]);
         if (reader["FieldGrade"] != DBNull.Value)
             _formFieldValue.FieldGrade = Convert.ToInt32(reader["FieldGrade"]);
         if (reader["IsOther"] != DBNull.Value)
             _formFieldValue.IsOther = Convert.ToBoolean(reader["IsOther"]);
         if (reader["ScaleStart"] != DBNull.Value)
             _formFieldValue.ScaleStart = Convert.ToDecimal(reader["ScaleStart"]);
         if (reader["ScaleEnd"] != DBNull.Value)
             _formFieldValue.ScaleEnd = Convert.ToDecimal(reader["ScaleEnd"]);
         _formFieldValue.NewRecord = false;
         _formFieldValueList.Add(_formFieldValue);
     } reader.Close();
     return _formFieldValueList;
 }
 public void Delete(int Original_FormFieldValueId)
 {
     FormFieldValueDAC formfieldvalueComponent = new FormFieldValueDAC();
     formfieldvalueComponent.DeleteFormFieldValue(Original_FormFieldValueId);
 }
 public bool Update( int FormFieldId,  string FieldValue,  string FieldValueHelp,  int FieldGrade,  bool IsOther,  decimal ScaleStart,  decimal ScaleEnd,  int Original_FormFieldValueId)
 {
     FormFieldValueDAC formfieldvalueComponent = new FormFieldValueDAC();
     return formfieldvalueComponent.UpdateFormFieldValue( FormFieldId,  FieldValue,  FieldValueHelp,  FieldGrade,  IsOther,  ScaleStart,  ScaleEnd,  Original_FormFieldValueId);
 }
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     FormFieldValueDAC formfieldvaluecomponent = new FormFieldValueDAC();
     return formfieldvaluecomponent.UpdateDataset(dataset);
 }
 public bool Update(FormFieldValue formfieldvalue ,int old_formFieldValueId)
 {
     FormFieldValueDAC formfieldvalueComponent = new FormFieldValueDAC();
     return formfieldvalueComponent.UpdateFormFieldValue( formfieldvalue.FormFieldId,  formfieldvalue.FieldValue,  formfieldvalue.FieldValueHelp,  formfieldvalue.FieldGrade,  formfieldvalue.IsOther,  formfieldvalue.ScaleStart,  formfieldvalue.ScaleEnd,  old_formFieldValueId);
 }
        public bool Insert( int FormFieldId,  string FieldValue,  string FieldValueHelp,  int FieldGrade,  bool IsOther,  decimal ScaleStart,  decimal ScaleEnd)
        {
            FormFieldValueDAC formfieldvalueComponent = new FormFieldValueDAC();
            int FormFieldValueId = 0;

            return formfieldvalueComponent.InsertNewFormFieldValue( ref FormFieldValueId,  FormFieldId,  FieldValue,  FieldValueHelp,  FieldGrade,  IsOther,  ScaleStart,  ScaleEnd);
        }
 public bool Insert(FormFieldValue formfieldvalue)
 {
     int autonumber = 0;
     FormFieldValueDAC formfieldvalueComponent = new FormFieldValueDAC();
     bool endedSuccessfuly = formfieldvalueComponent.InsertNewFormFieldValue( ref autonumber,  formfieldvalue.FormFieldId,  formfieldvalue.FieldValue,  formfieldvalue.FieldValueHelp,  formfieldvalue.FieldGrade,  formfieldvalue.IsOther,  formfieldvalue.ScaleStart,  formfieldvalue.ScaleEnd);
     if(endedSuccessfuly)
     {
         formfieldvalue.FormFieldValueId = autonumber;
     }
     return endedSuccessfuly;
 }
 public int GetTotalSubmissions(int ID)
 {
     FormFieldValueDAC _formFieldValueComponent = new FormFieldValueDAC();
     return _formFieldValueComponent.GetFieldValueTotalSubmissions(ID);
 }
 public FormFieldValue GetByID(int _formFieldValueId)
 {
     FormFieldValueDAC _formFieldValueComponent = new FormFieldValueDAC();
      IDataReader reader = _formFieldValueComponent.GetByIDFormFieldValue(_formFieldValueId);
      FormFieldValue _formFieldValue = null;
      while(reader.Read())
      {
          _formFieldValue = new FormFieldValue();
          if(reader["FormFieldValueId"] != DBNull.Value)
              _formFieldValue.FormFieldValueId = Convert.ToInt32(reader["FormFieldValueId"]);
          if(reader["FormFieldId"] != DBNull.Value)
              _formFieldValue.FormFieldId = Convert.ToInt32(reader["FormFieldId"]);
          if(reader["FieldValue"] != DBNull.Value)
              _formFieldValue.FieldValue = Convert.ToString(reader["FieldValue"]);
          if(reader["FieldValueHelp"] != DBNull.Value)
              _formFieldValue.FieldValueHelp = Convert.ToString(reader["FieldValueHelp"]);
          if(reader["FieldGrade"] != DBNull.Value)
              _formFieldValue.FieldGrade = Convert.ToInt32(reader["FieldGrade"]);
          if(reader["IsOther"] != DBNull.Value)
              _formFieldValue.IsOther = Convert.ToBoolean(reader["IsOther"]);
          if(reader["ScaleStart"] != DBNull.Value)
              _formFieldValue.ScaleStart = Convert.ToDecimal(reader["ScaleStart"]);
          if(reader["ScaleEnd"] != DBNull.Value)
              _formFieldValue.ScaleEnd = Convert.ToDecimal(reader["ScaleEnd"]);
      _formFieldValue.NewRecord = false;             }             reader.Close();
      return _formFieldValue;
 }