예제 #1
0
    protected void searchMemberInfo()
    {
        try
        {
            int    memberID    = 0;
            string membername  = "";
            string address     = "";
            string state       = "";
            string city        = "";
            string zip         = "";
            string phonenumber = "";

            if (txtMemberID.Text == "")
            {
                memberID = -1;
            }
            else
            {
                memberID = int.Parse(txtMemberID.Text);
            }

            if (txtName.Text == "")
            {
                membername = "-1";
            }
            else
            {
                membername = txtName.Text;
            }

            if (txtAddress.Text == "")
            {
                address = "-1";
            }
            else
            {
                address = txtAddress.Text;
            }

            if (txtState.Text == "")
            {
                state = "-1";
            }
            else
            {
                state = txtState.Text;
            }

            if (txtCity.Text == "")
            {
                city = "-1";
            }
            else
            {
                city = txtCity.Text;
            }

            if (txtZIP.Text == "")
            {
                zip = "-1";
            }
            else
            {
                zip = txtZIP.Text;
            }

            if (txtPhoneNumber.Text == "")
            {
                phonenumber = "-1";
            }
            else
            {
                phonenumber = txtPhoneNumber.Text;
            }


            List <RECEIVER> receivers = RECEIVERManager.GetAllRECEIVERsFoodForSearch(-1, memberID, membername, address, city, state, zip, phonenumber);//.FindAll(x => (x.AgentID == ((AGENT)Session["aGENT"]).AGENTID));
            gvRECEIVER.DataSource = receivers;
            gvRECEIVER.DataBind();
        }

        catch (Exception ex)
        {
        }
    }
예제 #2
0
 protected void GetAllReceiverByCustID()
 {
     gvRECEIVER.DataSource = RECEIVERManager.GetAllRECEIVERsFoodForSearch(int.Parse(Session["snFoodsenderID"].ToString()), -1, "-1", "-1", "-1", "-1", "-1", "-1").FindAll(x => (x.AgentID == ((AGENT)Session["aGENT"]).AGENTID));
     gvRECEIVER.DataBind();
 }