Exemplo n.º 1
0
    //查看价格模板
    protected void lkbtnTemp_Click(object sender, EventArgs e)
    {
        int cusid = Convert.ToInt32(ddlName.SelectedValue);
        int cid   = Convert.ToInt32(ddlCompany.SelectedValue);
        int cnt   = cpm.GetCountInfo(cusid, cid);

        if (cnt <= 0)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('没有该客户在该公司的价格信息!')</script>");
        }
        else
        {
            CustomerPriceTB cp  = cpm.GetInfoByCusidAndCid(cusid, cid);
            int             res = pm.GetCount(cp.PNo);
            if (res <= 0)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('没有此价格模板!')</script>");
            }
            Session["cp"] = cp;
            Response.Redirect("~/PriceManager/CustomerPrice/Price.aspx");
        }
    }