Пример #1
0
    protected void Button_Sh2(object sender, EventArgs e)
    {
        string condition = Getcondition();

        BindGridview1(condition);
        UpdatePanel_PayBill.Update();
        Panel_NewPayBill.Visible = false;
        UpdatePanel_NewPayBill.Update();
        Panel_Supply.Visible = false;
        UpdatePanel_Supply.Update();

        Panel_Pay.Visible = false;
        UpdatePanel_Pay.Update();

        Panel_NewPay.Visible = false;
        UpdatePanel_NewPay.Update();
    }
Пример #2
0
    //提交供应商
    protected void Button_ComSP(object sender, EventArgs e)
    {
        string Pname;
        bool   temp = false;

        foreach (GridViewRow item in Gridview_PMSupply.Rows)
        {
            RadioButton rb = item.FindControl("RadioButtonMarkup") as RadioButton;
            if (rb.Checked)
            {
                label_SupplyID.Text = Gridview_PMSupply.DataKeys[item.RowIndex].Value.ToString();
                Pname = Gridview_PMSupply.Rows[item.RowIndex].Cells[3].Text.ToString();
                temp  = true;
                if (label_Supply.Text == "检索")
                {
                    TextBox_Factory.Text = Pname;
                    UpdatePanel_SPayBillSearch.Update();
                }
                if (label_Supply.Text == "新增")
                {
                    TextBox6.Text = Pname;
                    UpdatePanel_NewPayBill.Update();
                    //PMPaymentBillinfo.PMSI_ID = new Guid(this.LabelSupplyID.Text.ToString());
                    //BindGridview7_Pay(PMPaymentBillinfo);
                    //Gridview7_BL();//总额
                }
            }
        }
        if (!temp)
        {
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_NewPayBill, GetType(), "aa", "alert('请选择供应商')", true);
            return;
        }
        else
        {
            Panel_Supply.Visible = false;
            UpdatePanel_Supply.Update();
        }
    }
Пример #3
0
    //提交新增
    protected void Button_Rocky(object sender, EventArgs e)
    {
        string    condition = "and PMPaymentBill.PMSI_ID='" + label_SupplyID.Text.ToString() + "'";
        DataSet   ds        = ppb.SelectPMPaymentBill(condition);
        DataTable dt        = ds.Tables[0];

        if (dt.Rows.Count > 0)
        {
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_NewPayBill, GetType(), "aa", "alert('该供应商已存在!')", true);
            return;
        }
        else
        {
            PMPaymentBillinfo.PMSI_ID          = new Guid(label_SupplyID.Text.ToString());
            PMPaymentBillinfo.PMPB_Due         = 0; //应付款
            PMPaymentBillinfo.PMPB_TotalDebt   = 0; //总欠款
            PMPaymentBillinfo.PMPB_TotalBill   = 0; //开票总额
            PMPaymentBillinfo.PMPB_TotalPaided = 0; //已付款
            ppb.InsertPMPaymentBill(PMPaymentBillinfo);

            BindGridview1("");
            foreach (GridViewRow item in Gridview1.Rows)
            {
                PMPaymentBillinfo.PMPB_ID = new Guid(Gridview1.DataKeys[item.RowIndex]["PMPB_ID"].ToString());
                PMPaymentBillinfo.PMSI_ID = new Guid(Gridview1.DataKeys[item.RowIndex]["PMSI_ID"].ToString());
                ppb.UpdatePMPaymentBill(PMPaymentBillinfo);
            }
            BindGridview1("");
            UpdatePanel_PayBill.Update();
            TextBox6.Text            = "";
            Panel_NewPayBill.Visible = false;
            UpdatePanel_NewPayBill.Update();
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_NewPayBill, GetType(), "aa", "alert('新增成功!')", true);
            return;
        }
    }
Пример #4
0
 //新增
 protected void Button_New(object sender, EventArgs e)
 {
     Panel_NewPayBill.Visible = true;
     UpdatePanel_NewPayBill.Update();
 }
Пример #5
0
 //取消新增
 protected void Button_Tim(object sender, EventArgs e)
 {
     TextBox6.Text            = "";
     Panel_NewPayBill.Visible = false;
     UpdatePanel_NewPayBill.Update();
 }