Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dcCommonDataContext DC = new dcCommonDataContext();

            _ClientName.Text = data.Profile.ClientName;
            _ClientCategory.Text = data.Profile.Category.ToTextOrName();
            _TradingVolume.Text = data.Profile.TradingVolume.ToTextOrName();
            _Email.Text = data.Profile.Email;
            var country = DC.spSelCountryByID(data.Profile.CountryID).FirstOrDefault();
            _Country.Text = country == null ? "" : country.CountryName;
            //var region = DC.spSelRegionByID( data.Profile.RegionID ).FirstOrDefault();
            //_Region.Text = region == null ? "" : region.RegionName;
            _Locality.Text = data.Profile.Locality;
            _ScopeType.Text = data.Profile.ScopeType;
            //_DiscountCardNumber.Text = data.Profile.DiscountCardNumber;
            _HowKnow.Text = data.Profile.HowKnow;

            _ContactPersonPosition.Text = data.Profile.ContactPersonPosition;
            _ContactPersonSurname.Text = data.Profile.ContactPersonSurname;
            _ContactPersonName.Text = data.Profile.ContactPersonName;
            _ContactPersonPhone.Text = data.Profile.ContactPersonPhone;
            _ContactPersonExtPhone.Text = data.Profile.ContactPersonExtPhone;
            _ContactPersonFax.Text = data.Profile.ContactPersonFax;
            _ContactPersonEmail.Text = data.Profile.ContactPersonEmail;
            _DeliveryAddress.Text = data.Profile.DeliveryAddress;

            _CompanyName.Text = data.Profile.CompanyName;
            _CompanyRegistrationID.Text = data.Profile.CompanyRegistrationID;
            _CompanyAddress.Text = data.Profile.CompanyAddress;

            _BankName.Text = data.Profile.BankName;
            _IBAN.Text = data.Profile.IBAN;
            _SWIFT.Text = data.Profile.SWIFT;
            _BankAddress.Text = data.Profile.BankAddress;

            _DirectorName.Text = data.Profile.DirectorName;
            _DirectorSurname.Text = data.Profile.DirectorSurname;

            _CorrespondingBankName.Text = data.Profile.CorrespondentBankName;
            _CorrespondingIBAN.Text = data.Profile.CorrespondentIBAN;
            _CorrespondingSWIFT.Text = data.Profile.CorrespondentSWIFT;
            _CorrespondingBankAddress.Text = data.Profile.CorrespondentBankAddress;

            ////Пункт выдачи заказов
            //var rmsStore = data.Profile.RmsStoreId != null ? AcctgRefCatalog.RmsStores[data.Profile.RmsStoreId] : null;
            //if ( rmsStore != null )
            //{
            //    _RmsStores.Text = Server.HtmlEncode( rmsStore.StoreName );
            //}
            //else
            //{
            //}

            ////Группа персональной скидки
            //_clientGroupName.Text = data.Profile.ClientGroupName;

            //Пока один тип клиентов нет необходимости разбивать все на плейс-холдеры и извращаться с видимостью
            //UpdateVisiblePH(Page.Controls);
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            _managerList.DataSource = ManagerBO.GetManagerList(Resources.Texts.NotSelected);
            _managerList.DataBind();

            chbIsChecked.Checked = data.Profile.IsChecked;
            //	chbIsAutoOrder.Checked = LightBO.GetIsAutoOrder(data.Profile.UserId);

            dcCommonDataContext DC = new dcCommonDataContext();
            //_ClientName.Text = data.Profile.ClientName;
            //_ClientNameIP.Text = data.Profile.ClientName;
            txtClientName.Text = data.Profile.ClientName;
            _ClientCategory.Text = data.Profile.Category.ToTextOrName();
            _TradingVolume.Text = data.Profile.TradingVolume.ToTextOrName();
            _Email.Text = data.Profile.Email;
            var country = DC.spSelCountryByID(data.Profile.CountryID).FirstOrDefault();
            _Country.Text = country == null ? "" : country.CountryName;
            var region = DC.spSelRegionByID(data.Profile.RegionID).FirstOrDefault();
            _Locality.Text = data.Profile.Locality;
            _ContactLastName.Text = data.Profile.ContactPersonSurname;
            _ContactFirstName.Text = data.Profile.ContactPersonName;
               // _ContactMiddleName.Text = data.Profile.ContactMiddleName;
            _ContactPhone.Text = data.Profile.ContactPersonPhone;
            _ContactExtPhone.Text = data.Profile.ContactPersonExtPhone;
            _ContactFax.Text = data.Profile.ContactPersonFax;
            //_ScheduleOfice.Text = data.Profile.ScheduleOfice;
            //_ScheduleStock.Text = data.Profile.ScheduleStock;
            _ShippingAddress.Text = data.Profile.DeliveryAddress;
            _ScopeType.Text = data.Profile.ScopeType;
            _DiscountCardNumber.Text = data.Profile.DiscountCardNumber;
            _HowKnow.Text = data.Profile.HowKnow;
            _ContactPosition.Text = data.Profile.ContactPersonPosition;

            _txtDirectorLastName.Text = data.Profile.DirectorSurname;
            _txtDirectorFirstName.Text = data.Profile.DirectorName;
            _txtBankName.Text = data.Profile.BankName;

            _CompanyName.Text = data.Profile.CompanyName;
            _CompanyRegistrationID.Text = data.Profile.CompanyRegistrationID;
            _CompanyAddress.Text = data.Profile.CompanyAddress;

            _txtBankName.Text = data.Profile.BankName;
            _txtIBAN.Text = data.Profile.IBAN;
            _txtSWIFT.Text = data.Profile.SWIFT;
            _txtBankAddress.Text = data.Profile.BankAddress;

            _txtCorrespondentBankName.Text = data.Profile.CorrespondentBankName;
            _txtCorrespondentIBAN.Text = data.Profile.CorrespondentIBAN;
            _txtCorrespondentSWIFT.Text = data.Profile.CorrespondentSWIFT;
            _txtCorrespondentBankAddrss.Text = data.Profile.CorrespondentBankAddress;

            email2.Text = LightBO.GetAdditionalEmail(data.Profile.UserId);

            //Пункт выдачи заказов
            var rmsStore = data.Profile.RmsStoreId != null ? AcctgRefCatalog.RmsStores[data.Profile.RmsStoreId] : null;
            if (rmsStore != null)
            {
                _RmsStores.Text = Server.HtmlEncode(rmsStore.StoreName);
            }
            else
            {
            }
            //Менеджер
            var manager = !string.IsNullOrEmpty(data.Profile.ManagerId) ? AcctgRefCatalog.RmsEmployees[data.Profile.ManagerId] : null;
            if (manager != null)
            {
                _managerList.SelectedValue = manager.EmployeeId;
            }
            else
            {
                _managerList.SelectedValue = "0";
            }

            //Отдел менеджера
            //var department = !string.IsNullOrEmpty( data.Profile.ManagerDeptId ) ? RefCatalog.RmsDepartments[data.Profile.ManagerDeptId] : null;
            //if ( department != null )
            //{
            //    _managerDepartmentLabel.Text = Server.HtmlEncode( department.TextValue );
            //}

            //Группа персональной скидки
            _clientGroupName.SelectedValue = ((int)data.Profile.ClientGroup).ToString();
            _prepaymentPercentLabel.Text = string.Format("{0:0.00}", data.Profile.PrepaymentPercent);
            _DelayDays.Text = LightBO.GetPaymentDelayDays(data.Profile.UserId).ToString();
            _paymentLimit.Text = LightBO.GetPaymentLimit(data.Profile.UserId).ToString();

            UpdateVisiblePH(Page.Controls);
        }
Ejemplo n.º 3
0
        protected void Page_PreRender( object sender, EventArgs e )
        {
            _checkedTrueLabel.Visible = data.Profile.IsChecked;
            _checkedFalseLabel.Visible = !data.Profile.IsChecked;

            _restrictedTrueLabel.Visible = data.Profile.IsRestricted;
            _restrictedFalseLabel.Visible = !data.Profile.IsRestricted;

            dcCommonDataContext DC = new dcCommonDataContext();
            _ClientName.Text = data.Profile.ClientName;
            _ClientCategory.Text = data.Profile.Category.ToTextOrName();
            _TradingVolume.Text = data.Profile.TradingVolume.ToTextOrName();
            _Email.Text = data.Profile.Email;
            var country = DC.spSelCountryByID( data.Profile.CountryID ).FirstOrDefault();
            _Country.Text = country == null ? "" : country.CountryName;
            var region = DC.spSelRegionByID( data.Profile.RegionID ).FirstOrDefault();
            _Region.Text = region == null ? "" : region.RegionName;
            _Locality.Text = data.Profile.Locality;
            _ContactLastName.Text = data.Profile.ContactLastName;
            _ContactFirstName.Text = data.Profile.ContactFirstName;
            _ContactMiddleName.Text = data.Profile.ContactMiddleName;
            _ContactPhone.Text = data.Profile.ContactPhone;
            _ContactExtPhone.Text = data.Profile.ContactExtPhone;
            _ContactFax.Text = data.Profile.ContactFax;
            _ScheduleOfice.Text = data.Profile.ScheduleOfice;
            _ScheduleStock.Text = data.Profile.ScheduleStock;
            _ShippingAddress.Text = data.Profile.ShippingAddress;
            _ScopeType.Text = data.Profile.ScopeType;
            _DiscountCardNumber.Text = data.Profile.DiscountCardNumber;
            _HowKnow.Text = data.Profile.HowKnow;
            _ContactPosition.Text = data.Profile.ContactPosition;
            _INN_Legal.Text = data.Profile.INN;
            _INN_IP.Text = data.Profile.INN;
            _OGRNIP.Text = data.Profile.OGRNIP;
            _OficialAddress.Text = data.Profile.OficialAddress;
            _RealAddress.Text = data.Profile.RealAddress;
            _NDSAggent.Text = data.Profile.NDSAggent ? "Является плательщиком НДС" : "Не является плательщиком НДС";
            _DirectorLastName.Text = data.Profile.DirectorLastName;
            _DirectorFirstName.Text = data.Profile.DirectorFirstName;
            _DirectorMiddleName.Text = data.Profile.DirectorMiddleName;
            _Account.Text = data.Profile.Account;
            _BankBIC.Text = data.Profile.BankBIC;
            var bank = DC.spSelBankInfoByBIC( data.Profile.BankBIC ).FirstOrDefault();
            if ( bank != null )
            {
                _BankKS.Text = bank.BankInfo_Acc;
                _BankName.Text = bank.BankInfo_Name;
            }
            _BalanceManLastName.Text = data.Profile.BalanceManLastName;
            _BalanceManFirstName.Text = data.Profile.BalanceManFirstName;
            _BalanceManMiddleName.Text = data.Profile.BalanceManMiddleName;
            _BalanceManPhone.Text = data.Profile.BalanceManPhone;
            _BalanceManPosition.Text = data.Profile.BalanceManPosition;
            _BalanceManEmail.Text = data.Profile.BalanceManEmail;
            _LegalName.Text = data.Profile.LegalName;
            _KPP.Text = data.Profile.KPP;
            _OGRN.Text = data.Profile.OGRN;
            _DirectorPosition.Text = data.Profile.DirectorPosition;

            //Пункт выдачи заказов
            var rmsStore = data.Profile.RmsStoreId != null ? AcctgRefCatalog.RmsStores[data.Profile.RmsStoreId] : null;
            if ( rmsStore != null )
            {
                _RmsStores.Text = Server.HtmlEncode( rmsStore.StoreName );
            }
            else
            {
            }
            //Менеджер
            var manager = !string.IsNullOrEmpty( data.Profile.ManagerId ) ? AcctgRefCatalog.RmsEmployees[data.Profile.ManagerId] : null;
            if ( manager != null )
            {
                _managerLabel.Text = manager.FullName;
            }

            //Отдел менеджера
            //var department = !string.IsNullOrEmpty( data.Profile.ManagerDeptId ) ? RefCatalog.RmsDepartments[data.Profile.ManagerDeptId] : null;
            //if ( department != null )
            //{
            //    _managerDepartmentLabel.Text = Server.HtmlEncode( department.TextValue );
            //}

            //Группа персональной скидки
            //_clientGroupName. = data.Profile.ClientGroupName;
            _prepaymentPercentLabel.Text = string.Format( "{0:0.00}%", data.Profile.PrepaymentPercent );
             UpdateVisiblePH( Page.Controls );
        }