コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         int recv = PageTools.ParseInt(Request.QueryString["recv"]);
         if (recv > 0)
         {
             AgentOrderBiz aobiz = new AgentOrderBiz();
             DataSet ds = aobiz.GetAgentRecvInvoice(recv);
             if (ds != null)
             {
                 int agentID = (int)(ds.Tables[0].Rows[0]["agentID"]);
                 if (agentID > 0)
                 {
                     AdminCompanyBiz biz = new AdminCompanyBiz();
                     DS_Companys.CompanyDetailDataTable dt = biz.GetCompanyDetail(agentID);
                     if (dt != null && dt.Rows.Count > 0)
                     {
                         DS_Companys.CompanyDetailRow crow = dt.Rows[0] as DS_Companys.CompanyDetailRow;
                         lbAgentName.Text = crow.companyName + " / " + crow.companyName_cn;
                         lbAgentAddress.Text = crow.address + " <br /> " + crow.city + ", " + crow.state + " " + crow.zip + "<br />" + crow.country;
                         lbAgentTel.Text = crow.telephone;
                         lbAgentFax.Text = crow.fax;
                     }
                 }
                 lbCreateDate.Text = ((DateTime)ds.Tables[0].Rows[0]["createDate"]).ToShortDateString();
                 lbInvoiceNumber.Text = recv.ToString();
             }
         }
     }
 }
コード例 #2
0
ファイル: AgentRecvInvoice.aspx.cs プロジェクト: solo123/AGMV
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            AgentOrderBiz biz = new AgentOrderBiz();
            DataSet ds = biz.GetAgentRecvInvoice(PageTools.ParseInt(Request.QueryString["recv"]));
            if (ds != null)
            {
                AgentInfoCtl1.AgentID = PageTools.GetSavedId("agentID", ds.Tables[0].Rows[0]["agentID"].ToString());
                lnkPrint.NavigateUrl = "AgentRecvInvoice_prn.aspx?recv=" + Request.QueryString["recv"];
                lnkAgentOrders.NavigateUrl = "AgentOrders.aspx";
            }
        }

        // add summary
        GridViewHelper helper = new GridViewHelper(this.lstPayment);
        //helper.RegisterGroup("orderID", true, true);
        //helper.GroupHeader += new GroupEvent(helper_GroupHeader);
        //helper.ApplyGroupSort();
        helper.RegisterSummary("payAmount", SummaryOperation.Sum);
        helper.GeneralSummary += new FooterEvent(helper_SummaryFooter);
    }