Ejemplo n.º 1
0
        private void cstmrNmLOVSearch(string srchWrd)
        {
            this.txtChngd = false;

            if (!this.cstmrNmTextBox.Text.Contains("%"))
            {
                this.cstmrIDTextBox.Text = "-1";
            }

            string[] selVals = new string[1];
            selVals[0] = this.cstmrIDTextBox.Text;
            string       extrWhr = " and tbl1.e <=0";
            DialogResult dgRes   = cmnCde.showPssblValDiag(
                cmnCde.getLovID("All Customers and Suppliers"), ref selVals, true, false,
                cmnCde.Org_id, "", "",
                this.srchWrd, "Both", true, extrWhr);

            if (dgRes == DialogResult.OK)
            {
                for (int i = 0; i < selVals.Length; i++)
                {
                    this.cstmrIDTextBox.Text = selVals[i];
                    this.cstmrNmTextBox.Text = cmnCde.getGnrlRecNm(
                        "scm.scm_cstmr_suplr",
                        "cust_sup_id", "cust_sup_name", long.Parse(selVals[i]));
                    this.cstmrSiteIDTextBox.Text = "-1";
                    this.cstmrSiteTextBox.Text   = "";
                }
            }
            this.txtChngd = false;
        }
Ejemplo n.º 2
0
        private void dscntLOVSrch()
        {
            string[] selVals = new string[1];
            selVals[0] = this.itmIDTextBox.Text;
            DialogResult dgRes = cmnCde.showPssblValDiag(
                cmnCde.getLovID("Discount Codes"), ref selVals,
                true, false, cmnCde.Org_id,
                this.srchWrd, "Both", this.autoLoad);

            if (dgRes == DialogResult.OK)
            {
                for (int i = 0; i < selVals.Length; i++)
                {
                    this.itmIDTextBox.Text     = selVals[i];
                    this.dscntNameTextbox.Text = cmnCde.getGnrlRecNm("scm.scm_tax_codes", "code_id", "code_name",
                                                                     int.Parse(selVals[i]));
                    if (selVals[i] != "-1")
                    {
                        this.prcntNumericUpDown.Enabled = false;
                        this.flatNumericUpDown.Enabled  = false;
                        this.flatValRadioButton.Enabled = false;
                        this.prcntRadioButton.Enabled   = false;
                    }
                    else
                    {
                        this.prcntRadioButton.Checked = !this.prcntRadioButton.Checked;
                    }
                }
            }
        }