Exemplo n.º 1
0
        protected virtual void InitializeEntries()
        {
            if (partner == null)
            {
                partner = new Partner();

                if (defaultGroupId.HasValue)
                {
                    gEditPanel.SelectGroupId((int)defaultGroupId);
                }

                if (BusinessDomain.AppConfiguration.AutoGeneratePartnerCodes)
                {
                    partner.AutoGenerateCode();
                }
            }
            else
            {
                gEditPanel.SelectGroupId(partner.GroupId);
            }

            txtCode.Text                = partner.Code;
            txtName.Text                = partner.Name;
            txtDisplayName.Text         = partner.Name2;
            txtLiablePerson.Text        = partner.LiablePerson;
            txtDisplayLiablePerson.Text = partner.LiablePerson2;
            txtCity.Text                = partner.City;
            txtDisplayCity.Text         = partner.City2;
            txtAddress.Text             = partner.Address;
            txtDisplayAddress.Text      = partner.Address2;
            txtTelephone.Text           = partner.Telephone;
            txtDisplayTelephone.Text    = partner.Telephone2;
            txtFax.Text            = partner.Fax;
            txtBulstat.Text        = partner.Bulstat;
            txtTaxNo.Text          = partner.TaxNumber;
            txtCardNo.Text         = partner.CardNumber;
            txtEmail.Text          = partner.Email;
            txtBankName.Text       = partner.BankName;
            txtBankCode.Text       = partner.BankCode;
            txtBankAccount.Text    = partner.BankAccount;
            txtBankVATName.Text    = partner.BankVATName;
            txtBankVATCode.Text    = partner.BankVATCode;
            txtBankVATAccount.Text = partner.BankVATAccount;

            cboPriceGroup.Load(Currency.GetAllSalePriceGroups(), "Key", "Value", (int)partner.PriceGroup);
            cboType.Load(Partner.GetAllTypes(), "Key", "Value", (int)partner.BusinessType);
            txvNote.Buffer.Text = partner.Note;
        }
Exemplo n.º 2
0
 private void btnGenerateCode_Clicked(object sender, EventArgs e)
 {
     partner.AutoGenerateCode();
     txtCode.Text = partner.Code;
 }