示例#1
0
        private void DBSStore_RenderText(string rsId, string ctrlId)
        {
            var sb = new StringBuilder();

            if (string.IsNullOrEmpty(rsId))
            {
                sb.Append("");
            }
            else
            {
                var s = new Lib.Entities.Stores.Store(rsId);
                if (s != null && !s.Unavailable)
                {
                    var bankName    = "";
                    var bankAddress = "";
                    var bankKpp     = "";

                    var bank = GetPerson(s.KeeperId, radioLang.Value, ref bankName, ref bankAddress, ref bankKpp);

                    sb.AppendFormat("{0}: ",
                                    radioLang.Value == "en" ? "Bank" : Resx.GetString("STORE_SP_Lbl_Data_Bank"));

                    sb.Append(bankName);
                    sb.Append(" ");
                    sb.Append(bankAddress);

                    sb.Append(radioLang.Value == "en"
                        ? " SWIFT: " + bank.SWIFT
                        : $"{(bank.BIK.Length > 0 ? $" БИК: {bank.BIK}" : "")}{(bank.CorrAccount.Length > 0 ? $" К/С: {bank.CorrAccount}" : "")}");
                }
            }

            SetTextValue(sb.ToString(), ctrlId);
        }
示例#2
0
        private void DBSStoreValS_SetValue()
        {
            DBSStore_RenderText(dbsStoreValS.Value, "textValS");
            if (dbsStoreValS.Value.Length <= 0 || dbsCurrency.Value.Length != 0)
            {
                return;
            }

            var sVal = new Lib.Entities.Stores.Store(dbsStoreValS.Value);

            if (sVal != null && !sVal.Unavailable)
            {
                dbsCurrency.Value           = sVal.ResourceId.ToString();
                dbsCurrency.RefreshRequired = true;
            }
        }