Example #1
0
 public static List <VehicleStatusBL> getDataByShopId(Int32 iShopId)
 {
     SummitDS.VehicleStatusDataTable thisTable = getAdapter().GetDataByShopId(iShopId);
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromTable(thisTable));
     }
     return(null);
 }
Example #2
0
 public static VehicleStatusBL getDataByShopIdAndStatus(Int32 iShopId, String strVahicleStatus)
 {
     SummitDS.VehicleStatusDataTable thisTable = getAdapter().GetDataByShopIdAndStatus(iShopId, strVahicleStatus);
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromRow(thisTable.Rows[0]));
     }
     return(null);
 }
Example #3
0
 public static VehicleStatusBL getDataById(Int32 iVahicleStatusId)
 {
     SummitDS.VehicleStatusDataTable thisTable = getAdapter().GetDataById(iVahicleStatusId);
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromRow(thisTable.Rows[0]));
     }
     return(null);
 }
Example #4
0
        protected override void SaveToRow()
        {
            SummitDS.VehicleStatusDataTable _thisTable = new SummitDS.VehicleStatusDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewVehicleStatusRow();
            }
            SummitDS.VehicleStatusRow _dataRow = _rowToSave as SummitDS.VehicleStatusRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    _dataRow.VehicleStatus = m_strVehicleStatus;

                    if (String.IsNullOrEmpty(m_strMessage))
                    {
                        if (!_dataRow.IsMessageNull())
                        {
                            _dataRow.SetMessageNull();
                        }
                    }
                    else if (_dataRow.IsMessageNull() ? true : _dataRow.Message != m_strMessage)
                    {
                        _dataRow.Message = m_strMessage;
                    }

                    if (bIsActive.HasValue)
                    {
                        _dataRow.IsActive = bIsActive.Value;
                    }
                    else
                    {
                        _dataRow.SetIsActiveNull();
                    }

                    if (iShopId.HasValue)
                    {
                        _dataRow.shop_id = iShopId.Value;
                    }
                    else
                    {
                        _dataRow.Setshop_idNull();
                    }

                    if (bSMS.HasValue)
                    {
                        _dataRow.SMS = bSMS.Value;
                    }
                    else
                    {
                        _dataRow.SetSMSNull();
                    }

                    if (bEmail.HasValue)
                    {
                        _dataRow.Email = bEmail.Value;
                    }
                    else
                    {
                        _dataRow.SetEmailNull();
                    }

                    if (bMoveToMarketing.HasValue)
                    {
                        _dataRow.MoveToMarketing = bMoveToMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetMoveToMarketingNull();
                    }
                }
                else
                {
                    _dataRow.VehicleStatus = m_strVehicleStatus;

                    if (String.IsNullOrEmpty(m_strMessage))
                    {
                        if (!_dataRow.IsMessageNull())
                        {
                            _dataRow.SetMessageNull();
                        }
                    }
                    else if (_dataRow.IsMessageNull() ? true : _dataRow.Message != m_strMessage)
                    {
                        _dataRow.Message = m_strMessage;
                    }

                    if (bIsActive.HasValue)
                    {
                        _dataRow.IsActive = bIsActive.Value;
                    }
                    else
                    {
                        _dataRow.SetIsActiveNull();
                    }

                    if (iShopId.HasValue)
                    {
                        _dataRow.shop_id = iShopId.Value;
                    }
                    else
                    {
                        _dataRow.Setshop_idNull();
                    }

                    if (bSMS.HasValue)
                    {
                        _dataRow.SMS = bSMS.Value;
                    }
                    else
                    {
                        _dataRow.SetSMSNull();
                    }

                    if (bEmail.HasValue)
                    {
                        _dataRow.Email = bEmail.Value;
                    }
                    else
                    {
                        _dataRow.SetEmailNull();
                    }

                    if (bMoveToMarketing.HasValue)
                    {
                        _dataRow.MoveToMarketing = bMoveToMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetMoveToMarketingNull();
                    }

                    _thisTable.AddVehicleStatusRow(_dataRow);
                }
            }
        }