protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["BalanceTradeClient"] == null || Session["BalanceARIDs"] == null)
            {
                Response.Redirect("ARList.aspx");
            }

            BindDropDown();

            if ((int)Session["BalanceTradeClient"] != 0)
            {
                CM_Client c = new CM_ClientBLL((int)Session["BalanceTradeClient"]).Model;
                if (c != null)
                {
                    lb_TradeClient.Text = c.FullName + "(" + c.LinkManName + ":" + c.Mobile + ")";
                }
            }

            string _ARIDs             = (string)Session["BalanceARIDs"];
            IList <AC_ARAPList> lists = AC_ARAPListBLL.GetModelList("Type = 1 AND OwnerClient=" + Session["OwnerClient"].ToString() +
                                                                    " AND TradeClient=" + Session["BalanceTradeClient"].ToString() + " AND ISNULL(BalanceFlag,1)=1" + " AND ID IN (" + _ARIDs + ")");
            if (lists.Count == 0)
            {
                MessageBox.ShowAndRedirect(this, "无待结算应收款记录!", "ARList.aspx");
                return;
            }

            tbx_Amount.Text = lists.Sum(p => Math.Round(p.Amount, 2)).ToString("0.##");
        }
    }
Ejemplo n.º 2
0
        public ARAPInfo(int id)
        {
            AC_ARAPList m = new AC_ARAPListBLL(id).Model;

            if (m != null)
            {
                FillModel(m);
            }
        }
Ejemplo n.º 3
0
 public ARAPInfo(int id)
 {
     AC_ARAPList m = new AC_ARAPListBLL(id).Model;
     if (m != null) FillModel(m);
 }