Exemplo n.º 1
0
        public static BodyShopBL getShopByUserId(Int32 iUserId)
        {
            SummitDS.BodyShopDataTable thisTable = getAdapter().getShopByUserId(iUserId);
            if (thisTable != null && thisTable.Rows.Count > 0)
            {
                return(BuildFromRow(thisTable.Rows[0]));
            }

            return(null);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get Data By Shop Name
 /// </summary>
 /// <param name="strShopName">Shop Name</param>
 /// <returns>instance of body shop</returns>
 public static BodyShopBL getShopByName(String strShopName)
 {
     if (!String.IsNullOrEmpty(strShopName))
     {
         SummitDS.BodyShopDataTable thisTable = getAdapter().GetDataByShopName(strShopName);
         if (thisTable != null && thisTable.Rows.Count > 0)
         {
             return(BuildFromRow(thisTable.Rows[0]));
         }
         return(null);
     }
     return(null);
 }
Exemplo n.º 3
0
        protected override void SaveToRow()
        {
            SummitDS.BodyShopDataTable _thisTable = new SummitDS.BodyShopDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewBodyShopRow();
            }
            SummitDS.BodyShopRow _dataRow = _rowToSave as SummitDS.BodyShopRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    if (String.IsNullOrEmpty(m_strShopName))
                    {
                        if (!_dataRow.Isshop_nameNull())
                        {
                            _dataRow.Setshop_nameNull();
                        }
                    }
                    else if (_dataRow.Isshop_nameNull() ? true : _dataRow.shop_name != m_strShopName)
                    {
                        _dataRow.shop_name = m_strShopName;
                    }

                    if (String.IsNullOrEmpty(m_strAddress1))
                    {
                        if (!_dataRow.Isaddress1Null())
                        {
                            _dataRow.Setaddress1Null();
                        }
                    }
                    else if (_dataRow.Isaddress1Null() ? true : _dataRow.address1 != m_strAddress1)
                    {
                        _dataRow.address1 = m_strAddress1;
                    }

                    if (String.IsNullOrEmpty(m_strAddress2))
                    {
                        if (!_dataRow.Isaddress2Null())
                        {
                            _dataRow.Setaddress2Null();
                        }
                    }
                    else if (_dataRow.Isaddress2Null() ? true : _dataRow.address2 != m_strAddress2)
                    {
                        _dataRow.address2 = m_strAddress2;
                    }

                    if (String.IsNullOrEmpty(m_strCity))
                    {
                        if (!_dataRow.IscityNull())
                        {
                            _dataRow.SetcityNull();
                        }
                    }
                    else if (_dataRow.IscityNull() ? true : _dataRow.city != m_strCity)
                    {
                        _dataRow.city = m_strCity;
                    }

                    if (String.IsNullOrEmpty(m_strState))
                    {
                        if (!_dataRow.IsstateNull())
                        {
                            _dataRow.SetstateNull();
                        }
                    }
                    else if (_dataRow.IsstateNull() ? true : _dataRow.state != m_strState)
                    {
                        _dataRow.state = m_strState;
                    }

                    if (String.IsNullOrEmpty(m_strZip))
                    {
                        if (!_dataRow.IszipNull())
                        {
                            _dataRow.SetzipNull();
                        }
                    }
                    else if (_dataRow.IszipNull() ? true : _dataRow.zip != m_strZip)
                    {
                        _dataRow.zip = m_strZip;
                    }

                    if (String.IsNullOrEmpty(m_strPhone))
                    {
                        if (!_dataRow.IsphoneNull())
                        {
                            _dataRow.SetphoneNull();
                        }
                    }
                    else if (_dataRow.IsphoneNull() ? true : _dataRow.phone != m_strPhone)
                    {
                        _dataRow.phone = m_strPhone;
                    }

                    if (String.IsNullOrEmpty(m_strFax))
                    {
                        if (!_dataRow.IsfaxNull())
                        {
                            _dataRow.SetfaxNull();
                        }
                    }
                    else if (_dataRow.IsfaxNull() ? true : _dataRow.fax != m_strFax)
                    {
                        _dataRow.fax = m_strFax;
                    }

                    if (String.IsNullOrEmpty(m_strEmail))
                    {
                        if (!_dataRow.IsemailNull())
                        {
                            _dataRow.SetemailNull();
                        }
                    }
                    else if (_dataRow.IsemailNull() ? true : _dataRow.email != m_strEmail)
                    {
                        _dataRow.email = m_strEmail;
                    }

                    if (String.IsNullOrEmpty(m_strWebsite))
                    {
                        if (!_dataRow.IswebsiteNull())
                        {
                            _dataRow.SetwebsiteNull();
                        }
                    }
                    else if (_dataRow.IswebsiteNull() ? true : _dataRow.website != m_strWebsite)
                    {
                        _dataRow.website = m_strWebsite;
                    }

                    if (String.IsNullOrEmpty(m_strBusinessLicence))
                    {
                        if (!_dataRow.Isbusiness_licenseNull())
                        {
                            _dataRow.Setbusiness_licenseNull();
                        }
                    }
                    else if (_dataRow.Isbusiness_licenseNull() ? true : _dataRow.business_license != m_strBusinessLicence)
                    {
                        _dataRow.business_license = m_strBusinessLicence;
                    }

                    if (String.IsNullOrEmpty(m_strEpsLicence))
                    {
                        if (!_dataRow.Isepa_licenseNull())
                        {
                            _dataRow.Setepa_licenseNull();
                        }
                    }
                    else if (_dataRow.Isepa_licenseNull() ? true : _dataRow.epa_license != m_strEpsLicence)
                    {
                        _dataRow.epa_license = m_strEpsLicence;
                    }

                    if (String.IsNullOrEmpty(m_strBarLicence))
                    {
                        if (!_dataRow.Isbar_licenseNull())
                        {
                            _dataRow.Setbar_licenseNull();
                        }
                    }
                    else if (_dataRow.Isbar_licenseNull() ? true : _dataRow.bar_license != m_strBarLicence)
                    {
                        _dataRow.bar_license = m_strBarLicence;
                    }

                    if (String.IsNullOrEmpty(m_strNetWorkName))
                    {
                        if (!_dataRow.Isnetwork_nameNull())
                        {
                            _dataRow.Setnetwork_nameNull();
                        }
                    }
                    else if (_dataRow.Isnetwork_nameNull() ? true : _dataRow.network_name != m_strNetWorkName)
                    {
                        _dataRow.network_name = m_strNetWorkName;
                    }

                    if (String.IsNullOrEmpty(m_strCertificationVehicles))
                    {
                        if (!_dataRow.Iscertification_vehiclesNull())
                        {
                            _dataRow.Setcertification_vehiclesNull();
                        }
                    }
                    else if (_dataRow.Iscertification_vehiclesNull() ? true : _dataRow.certification_vehicles != m_strCertificationVehicles)
                    {
                        _dataRow.certification_vehicles = m_strCertificationVehicles;
                    }

                    if (String.IsNullOrEmpty(m_strThirdPartyProviders))
                    {
                        if (!_dataRow.Isthird_party_providersNull())
                        {
                            _dataRow.Setthird_party_providersNull();
                        }
                    }
                    else if (_dataRow.Isthird_party_providersNull() ? true : _dataRow.third_party_providers != m_strThirdPartyProviders)
                    {
                        _dataRow.third_party_providers = m_strThirdPartyProviders;
                    }

                    if (String.IsNullOrEmpty(m_strManager))
                    {
                        if (!_dataRow.IsmanagerNull())
                        {
                            _dataRow.SetmanagerNull();
                        }
                    }
                    else if (_dataRow.IsmanagerNull() ? true : _dataRow.manager != m_strManager)
                    {
                        _dataRow.manager = m_strManager;
                    }

                    if (String.IsNullOrEmpty(m_strSystemAdmin))
                    {
                        if (!_dataRow.Issystem_adminNull())
                        {
                            _dataRow.Setsystem_adminNull();
                        }
                    }
                    else if (_dataRow.Issystem_adminNull() ? true : _dataRow.system_admin != m_strSystemAdmin)
                    {
                        _dataRow.system_admin = m_strSystemAdmin;
                    }

                    if (String.IsNullOrEmpty(m_strPortalAdminPassword))
                    {
                        if (!_dataRow.Isportal_admin_passwordNull())
                        {
                            _dataRow.Setportal_admin_passwordNull();
                        }
                    }
                    else if (_dataRow.Isportal_admin_passwordNull() ? true : _dataRow.portal_admin_password != m_strPortalAdminPassword)
                    {
                        _dataRow.portal_admin_password = m_strPortalAdminPassword;
                    }

                    if (String.IsNullOrEmpty(m_strTagLine))
                    {
                        if (!_dataRow.Iscompany_tag_lineNull())
                        {
                            _dataRow.Setcompany_tag_lineNull();
                        }
                    }
                    else if (_dataRow.Iscompany_tag_lineNull() ? true : _dataRow.company_tag_line != m_strTagLine)
                    {
                        _dataRow.company_tag_line = m_strTagLine;
                    }

                    if (String.IsNullOrEmpty(m_strOwner))
                    {
                        if (!_dataRow.IsownerNull())
                        {
                            _dataRow.SetownerNull();
                        }
                    }
                    else if (_dataRow.IsownerNull() ? true : _dataRow.owner != m_strOwner)
                    {
                        _dataRow.owner = m_strOwner;
                    }

                    if (iRating.HasValue)
                    {
                        _dataRow.ratings = iRating.Value;
                    }
                    else
                    {
                        _dataRow.SetratingsNull();
                    }

                    if (fLatitude.HasValue)
                    {
                        _dataRow.latitude = fLatitude.Value;
                    }
                    else
                    {
                        _dataRow.SetlatitudeNull();
                    }

                    if (fLongitude.HasValue)
                    {
                        _dataRow.longitude = fLongitude.Value;
                    }
                    else
                    {
                        _dataRow.SetlongitudeNull();
                    }

                    if (iNoHelpSelection.HasValue)
                    {
                        _dataRow.noHelpSelection = iNoHelpSelection.Value;
                    }
                    else
                    {
                        _dataRow.SetnoHelpSelectionNull();
                    }

                    if (iNoPremierShop.HasValue)
                    {
                        _dataRow.noPremierShop = iNoPremierShop.Value;
                    }
                    else
                    {
                        _dataRow.SetnoPremierShopNull();
                    }

                    if (bIsPremierShop.HasValue)
                    {
                        _dataRow.isPremierShop = bIsPremierShop.Value;
                    }
                    else
                    {
                        _dataRow.SetisPremierShopNull();
                    }

                    if (String.IsNullOrEmpty(m_strContent))
                    {
                        if (!_dataRow.IscontentNull())
                        {
                            _dataRow.SetcontentNull();
                        }
                    }
                    else if (_dataRow.IscontentNull() ? true : _dataRow.content != m_strContent)
                    {
                        _dataRow.content = m_strContent;
                    }

                    if (String.IsNullOrEmpty(m_strImagePath))
                    {
                        if (!_dataRow.Isimage_pathNull())
                        {
                            _dataRow.Setimage_pathNull();
                        }
                    }
                    else if (_dataRow.Isimage_pathNull() ? true : _dataRow.image_path != m_strImagePath)
                    {
                        _dataRow.image_path = m_strImagePath;
                    }

                    if (iMessageCount.HasValue)
                    {
                        _dataRow.messageCount = iMessageCount.Value;
                    }
                    else
                    {
                        _dataRow.SetmessageCountNull();
                    }

                    if (iAvailableMessages.HasValue)
                    {
                        _dataRow.availableMessages = iAvailableMessages.Value;
                    }
                    else
                    {
                        _dataRow.SetavailableMessagesNull();
                    }

                    if (dtExpirationDate.HasValue)
                    {
                        _dataRow.expirationDate = dtExpirationDate.Value;
                    }
                    else
                    {
                        _dataRow.SetexpirationDateNull();
                    }
                }
                else
                {
                    if (String.IsNullOrEmpty(m_strShopName))
                    {
                        if (!_dataRow.Isshop_nameNull())
                        {
                            _dataRow.Setshop_nameNull();
                        }
                    }
                    else if (_dataRow.Isshop_nameNull() ? true : _dataRow.shop_name != m_strShopName)
                    {
                        _dataRow.shop_name = m_strShopName;
                    }

                    if (String.IsNullOrEmpty(m_strAddress1))
                    {
                        if (!_dataRow.Isaddress1Null())
                        {
                            _dataRow.Setaddress1Null();
                        }
                    }
                    else if (_dataRow.Isaddress1Null() ? true : _dataRow.address1 != m_strAddress1)
                    {
                        _dataRow.address1 = m_strAddress1;
                    }

                    if (String.IsNullOrEmpty(m_strAddress2))
                    {
                        if (!_dataRow.Isaddress2Null())
                        {
                            _dataRow.Setaddress2Null();
                        }
                    }
                    else if (_dataRow.Isaddress2Null() ? true : _dataRow.address2 != m_strAddress2)
                    {
                        _dataRow.address2 = m_strAddress2;
                    }

                    if (String.IsNullOrEmpty(m_strCity))
                    {
                        if (!_dataRow.IscityNull())
                        {
                            _dataRow.SetcityNull();
                        }
                    }
                    else if (_dataRow.IscityNull() ? true : _dataRow.city != m_strCity)
                    {
                        _dataRow.city = m_strCity;
                    }

                    if (String.IsNullOrEmpty(m_strState))
                    {
                        if (!_dataRow.IsstateNull())
                        {
                            _dataRow.SetstateNull();
                        }
                    }
                    else if (_dataRow.IsstateNull() ? true : _dataRow.state != m_strState)
                    {
                        _dataRow.state = m_strState;
                    }

                    if (String.IsNullOrEmpty(m_strZip))
                    {
                        if (!_dataRow.IszipNull())
                        {
                            _dataRow.SetzipNull();
                        }
                    }
                    else if (_dataRow.IszipNull() ? true : _dataRow.zip != m_strZip)
                    {
                        _dataRow.zip = m_strZip;
                    }

                    if (String.IsNullOrEmpty(m_strPhone))
                    {
                        if (!_dataRow.IsphoneNull())
                        {
                            _dataRow.SetphoneNull();
                        }
                    }
                    else if (_dataRow.IsphoneNull() ? true : _dataRow.phone != m_strPhone)
                    {
                        _dataRow.phone = m_strPhone;
                    }

                    if (String.IsNullOrEmpty(m_strFax))
                    {
                        if (!_dataRow.IsfaxNull())
                        {
                            _dataRow.SetfaxNull();
                        }
                    }
                    else if (_dataRow.IsfaxNull() ? true : _dataRow.fax != m_strFax)
                    {
                        _dataRow.fax = m_strFax;
                    }

                    if (String.IsNullOrEmpty(m_strEmail))
                    {
                        if (!_dataRow.IsemailNull())
                        {
                            _dataRow.SetemailNull();
                        }
                    }
                    else if (_dataRow.IsemailNull() ? true : _dataRow.email != m_strEmail)
                    {
                        _dataRow.email = m_strEmail;
                    }

                    if (String.IsNullOrEmpty(m_strWebsite))
                    {
                        if (!_dataRow.IswebsiteNull())
                        {
                            _dataRow.SetwebsiteNull();
                        }
                    }
                    else if (_dataRow.IswebsiteNull() ? true : _dataRow.website != m_strWebsite)
                    {
                        _dataRow.website = m_strWebsite;
                    }

                    if (String.IsNullOrEmpty(m_strBusinessLicence))
                    {
                        if (!_dataRow.Isbusiness_licenseNull())
                        {
                            _dataRow.Setbusiness_licenseNull();
                        }
                    }
                    else if (_dataRow.Isbusiness_licenseNull() ? true : _dataRow.business_license != m_strBusinessLicence)
                    {
                        _dataRow.business_license = m_strBusinessLicence;
                    }

                    if (String.IsNullOrEmpty(m_strEpsLicence))
                    {
                        if (!_dataRow.Isepa_licenseNull())
                        {
                            _dataRow.Setepa_licenseNull();
                        }
                    }
                    else if (_dataRow.Isepa_licenseNull() ? true : _dataRow.epa_license != m_strEpsLicence)
                    {
                        _dataRow.epa_license = m_strEpsLicence;
                    }

                    if (String.IsNullOrEmpty(m_strBarLicence))
                    {
                        if (!_dataRow.Isbar_licenseNull())
                        {
                            _dataRow.Setbar_licenseNull();
                        }
                    }
                    else if (_dataRow.Isbar_licenseNull() ? true : _dataRow.bar_license != m_strBarLicence)
                    {
                        _dataRow.bar_license = m_strBarLicence;
                    }

                    if (String.IsNullOrEmpty(m_strNetWorkName))
                    {
                        if (!_dataRow.Isnetwork_nameNull())
                        {
                            _dataRow.Setnetwork_nameNull();
                        }
                    }
                    else if (_dataRow.Isnetwork_nameNull() ? true : _dataRow.network_name != m_strNetWorkName)
                    {
                        _dataRow.network_name = m_strNetWorkName;
                    }

                    if (String.IsNullOrEmpty(m_strCertificationVehicles))
                    {
                        if (!_dataRow.Iscertification_vehiclesNull())
                        {
                            _dataRow.Setcertification_vehiclesNull();
                        }
                    }
                    else if (_dataRow.Iscertification_vehiclesNull() ? true : _dataRow.certification_vehicles != m_strCertificationVehicles)
                    {
                        _dataRow.certification_vehicles = m_strCertificationVehicles;
                    }

                    if (String.IsNullOrEmpty(m_strThirdPartyProviders))
                    {
                        if (!_dataRow.Isthird_party_providersNull())
                        {
                            _dataRow.Setthird_party_providersNull();
                        }
                    }
                    else if (_dataRow.Isthird_party_providersNull() ? true : _dataRow.third_party_providers != m_strThirdPartyProviders)
                    {
                        _dataRow.third_party_providers = m_strThirdPartyProviders;
                    }

                    if (String.IsNullOrEmpty(m_strManager))
                    {
                        if (!_dataRow.IsmanagerNull())
                        {
                            _dataRow.SetmanagerNull();
                        }
                    }
                    else if (_dataRow.IsmanagerNull() ? true : _dataRow.manager != m_strManager)
                    {
                        _dataRow.manager = m_strManager;
                    }

                    if (String.IsNullOrEmpty(m_strSystemAdmin))
                    {
                        if (!_dataRow.Issystem_adminNull())
                        {
                            _dataRow.Setsystem_adminNull();
                        }
                    }
                    else if (_dataRow.Issystem_adminNull() ? true : _dataRow.system_admin != m_strSystemAdmin)
                    {
                        _dataRow.system_admin = m_strSystemAdmin;
                    }

                    if (String.IsNullOrEmpty(m_strPortalAdminPassword))
                    {
                        if (!_dataRow.Isportal_admin_passwordNull())
                        {
                            _dataRow.Setportal_admin_passwordNull();
                        }
                    }
                    else if (_dataRow.Isportal_admin_passwordNull() ? true : _dataRow.portal_admin_password != m_strPortalAdminPassword)
                    {
                        _dataRow.portal_admin_password = m_strPortalAdminPassword;
                    }

                    if (String.IsNullOrEmpty(m_strTagLine))
                    {
                        if (!_dataRow.Iscompany_tag_lineNull())
                        {
                            _dataRow.Setcompany_tag_lineNull();
                        }
                    }
                    else if (_dataRow.Iscompany_tag_lineNull() ? true : _dataRow.company_tag_line != m_strTagLine)
                    {
                        _dataRow.company_tag_line = m_strTagLine;
                    }

                    if (String.IsNullOrEmpty(m_strOwner))
                    {
                        if (!_dataRow.IsownerNull())
                        {
                            _dataRow.SetownerNull();
                        }
                    }
                    else if (_dataRow.IsownerNull() ? true : _dataRow.owner != m_strOwner)
                    {
                        _dataRow.owner = m_strOwner;
                    }

                    if (iRating.HasValue)
                    {
                        _dataRow.ratings = iRating.Value;
                    }
                    else
                    {
                        _dataRow.SetratingsNull();
                    }

                    if (fLatitude.HasValue)
                    {
                        _dataRow.latitude = fLatitude.Value;
                    }
                    else
                    {
                        _dataRow.SetlatitudeNull();
                    }

                    if (fLongitude.HasValue)
                    {
                        _dataRow.longitude = fLongitude.Value;
                    }
                    else
                    {
                        _dataRow.SetlongitudeNull();
                    }

                    if (iNoHelpSelection.HasValue)
                    {
                        _dataRow.noHelpSelection = iNoHelpSelection.Value;
                    }
                    else
                    {
                        _dataRow.SetnoHelpSelectionNull();
                    }

                    if (iNoPremierShop.HasValue)
                    {
                        _dataRow.noPremierShop = iNoPremierShop.Value;
                    }
                    else
                    {
                        _dataRow.SetnoPremierShopNull();
                    }

                    if (bIsPremierShop.HasValue)
                    {
                        _dataRow.isPremierShop = bIsPremierShop.Value;
                    }
                    else
                    {
                        _dataRow.SetisPremierShopNull();
                    }

                    if (String.IsNullOrEmpty(m_strContent))
                    {
                        if (!_dataRow.IscontentNull())
                        {
                            _dataRow.SetcontentNull();
                        }
                    }
                    else if (_dataRow.IscontentNull() ? true : _dataRow.content != m_strContent)
                    {
                        _dataRow.content = m_strContent;
                    }

                    if (String.IsNullOrEmpty(m_strImagePath))
                    {
                        if (!_dataRow.Isimage_pathNull())
                        {
                            _dataRow.Setimage_pathNull();
                        }
                    }
                    else if (_dataRow.Isimage_pathNull() ? true : _dataRow.image_path != m_strImagePath)
                    {
                        _dataRow.image_path = m_strImagePath;
                    }

                    if (iMessageCount.HasValue)
                    {
                        _dataRow.messageCount = iMessageCount.Value;
                    }
                    else
                    {
                        _dataRow.SetmessageCountNull();
                    }

                    if (iAvailableMessages.HasValue)
                    {
                        _dataRow.availableMessages = iAvailableMessages.Value;
                    }
                    else
                    {
                        _dataRow.SetavailableMessagesNull();
                    }

                    if (dtExpirationDate.HasValue)
                    {
                        _dataRow.expirationDate = dtExpirationDate.Value;
                    }
                    else
                    {
                        _dataRow.SetexpirationDateNull();
                    }

                    _thisTable.AddBodyShopRow(_dataRow);
                }
            }
        }