Beispiel #1
0
        protected void lstAddressName_SelectedIndexChanged(object sender, EventArgs e)
        {
            const string METHOD_NAME = "lstAddressName_SelectedIndexChanged";

            try {
                Common.AppHelper.HideWarning(addrWarning);

                int      cropYear = Convert.ToInt32(Common.UILib.GetDropDownText(ddlCropYear));
                ListItem selItem  = lstAddressName.SelectedItem;
                List <ListAddressItem> addrList = BeetDataAddress.AddressGetInfo(Convert.ToInt32(selItem.Value), 0, cropYear);

                if (addrList.Count > 0)
                {
                    ListAddressItem item = addrList[0];
                    txtAddrSHID.Text          = item.SHID;
                    chkAddrSubscriber.Checked = item.IsSubscriber;
                    txtAddrFName.Text         = item.FirstName;
                    txtAddrLName.Text         = item.LastName;
                    txtAddrBName.Text         = item.BusName;
                    txtAddrAddress.Text       = item.AdrLine1;
                    txtAddrAddressLine2.Text  = item.AdrLine2;
                    txtAddrCity.Text          = item.CityName;
                    txtAddrState.Text         = item.StateName;
                    txtAddrZip.Text           = item.PostalCode;
                    txtAddrPhoneNo.Text       = item.PhoneNo;
                }
            }
            catch (System.Exception ex) {
                Common.CException wex = new Common.CException(MOD_NAME + METHOD_NAME, ex);
                ((PrimaryTemplate)Page.Master).ShowWarning(ex, "Unable to load page correctly at this time.", addrWarning);
            }
        }
        private void ShowSHIDDetail(int shid, int addressID)
        {
            try {
                ClearSHID();

                List <ListAddressItem> addressList = BeetDataAddress.AddressGetInfo(shid, addressID, _cropYear);
                if (addressList.Count > 0)
                {
                    ListAddressItem item = addressList[0];
                    txtSHID.Text      = item.SHID;
                    txtAddressID.Text = item.AddressID.ToString();
                    txtMemberID.Text  = item.MemberID.ToString();
                    txtFirstName.Text = item.FirstName;
                    txtLastName.Text  = item.LastName;
                    txtBusName.Text   = item.BusName;
                    txtAddrLine1.Text = item.AdrLine1;
                    txtAddrLine2.Text = item.AdrLine2;
                    txtCity.Text      = item.CityName;
                    txtState.Text     = item.StateName;
                    txtZip.Text       = item.PostalCode;
                    txtTaxID.Text     = item.TaxID;
                    txtPhone.Text     = item.PhoneNo;
                    txtEmail.Text     = item.Email;
                }
            }
            catch (Exception ex) {
                Common.CException wex = new Common.CException("BankPayeeMaintenance.ShowSHIDDetail", ex);
                throw (wex);
            }
        }