Exemplo n.º 1
0
        private bool GetCustomerByCode(string custCode)
        {
            bool result = false;

            try
            {
                using (PartyBLL partyBll = new PartyBLL())
                {
                    Party party = partyBll.GetParty(custCode);
                    if (party != null)
                    {
                        this.txtPARTY_NAME.Text = party.PARTY_NAME;
                        this.txtSTD_QTY.Focus();
                        result = true;
                    }
                }
            }
            catch (Exception ex)
            {
                //XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                result = false;
            }
            finally
            {
            }

            return(result);
        }
Exemplo n.º 2
0
        public void GetBindingParty(string partyID)
        {
            Party party = null;

            try
            {
                using (PartyBLL partyBll = new PartyBLL())
                {
                    party = partyBll.GetParty(partyID);
                }

                if (party != null)
                {
                    this.txtPARTY_ID.Text        = party.PARTY_ID;
                    this.txtPARTY_NAME.Text      = party.PARTY_NAME;
                    this.icbPARTY_TYPE.EditValue = party.PARTY_TYPE;
                    this.txtADD1.Text            = party.ADD1;
                    this.txtADD2.Text            = party.ADD2;
                    this.txtADD3.Text            = party.ADD3;
                    this.txtADD4.Text            = party.ADD4;
                    this.txtTEL.Text             = party.TEL;
                    this.txtFAX.Text             = party.FAX;
                    this.txtEMAIL.Text           = party.EMAIL;
                    this.txtPIC.Text             = party.PIC;
                    this.txtREMARK.Text          = party.REMARK;
                    this.icbREC_STAT.EditValue   = party.REC_STAT;


                    this.GetPartyProductList(party.PARTY_ID);
                }
                else
                {
                    this.ClearDataOnScreen();
                    XtraMessageBox.Show(this, "No Data found.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }