示例#1
0
        void LoadData()
        {
            string clientName = txtMerchantID.Value.Trim();

            // string contactName = txtContact.Value.Trim();

            HYCashierDAL.CahierMgrDAL dal = new HYCashierDAL.CahierMgrDAL();

            int?   count    = 0;
            string clientID = string.Empty;

            if (Session["ClientID"].ToString() == "180000")
            {
                clientID = null;
            }
            else
            {
                clientID       = Session["ClientID"].ToString();
                btnAdd.Visible = false;
            }
            count = dal.GetClientCount(clientID, clientName);
            if (count == null)
            {
                AspNetPager1.RecordCount = 0;
            }
            else
            {
                AspNetPager1.RecordCount = (int)count;
            }

            DataTable dt = dal.GetClientList(clientID, clientName, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize);

            dataGrid.DataSource = dt;
            dataGrid.DataBind();
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HYCashierDAL.CahierMgrDAL dal = new HYCashierDAL.CahierMgrDAL();
                string clientID = string.Empty;
                if (Session["ClientID"].ToString() == "180000")
                {
                    clientID = null;
                }
                else
                {
                    clientID = Session["ClientID"].ToString();
                }
                int oprCount    = dal.GetOprCount(clientID, "", "", "");
                int clientCount = dal.GetClientCount(clientID, "");
                lblClientCount.Text = clientCount.ToString();

                lblOprCount.Text = oprCount.ToString();
            }
        }