コード例 #1
0
 public void Delete_Handler(int budId)
 {
     if (BG_BudItemsLibrariesManager.DeleteBG_BudItemsLibrariesByID(budId))
     {
         Bind();
     }
 }
コード例 #2
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        int bid = common.IntSafeConvert(Hidbuid.Value);
        BG_BudItemsLibraries bi = new BG_BudItemsLibraries();

        if (HidFlag.Value == "1")
        {
            bi = BG_BudItemsLibrariesManager.GetBG_BudItemsLibrariesByBudItID(bid);
        }
        bi.BILAppReaCon   = txtBIAppReaCon.Text.Trim();
        bi.BILAttr        = ddlProProper.SelectedValue;
        bi.BILExpGistExp  = txtBIExpGistExp.Text.Trim();
        bi.BILFunSub      = ddlFunSub.SelectedValue;
        bi.BILMon         = Convert.ToDecimal(txtBILMon.Text);
        bi.BILLongGoal    = txtBILongGoal.Text.Trim();
        bi.BILOthExpProb  = txtBIOthExpProb.Text.Trim();
        bi.BILProType     = ddlPayProType.SelectedItem.Text;
        bi.BILYearGoal    = txtBIYearGoal.Text.Trim();
        bi.DepID          = common.IntSafeConvert(ddlDeptName.SelectedValue);
        bi.PPID           = common.IntSafeConvert(ddlPayProType.SelectedValue);
        bi.BILProName     = txtProName.Text.Trim();
        bi.BILProDescrip  = txtProDesc.Text.Trim();
        bi.BILProCategory = ddlProType.SelectedValue;
        bi.PIID           = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID;

        if (HidFlag.Value == "0")
        {
            BG_BudItemsLibrariesManager.AddBG_BudItemsLibraries(bi);
            txtBIAppReaCon.Text  = "";
            txtBIExpGistExp.Text = "";
            txtBILongGoal.Text   = "";
            txtBILMon.Text       = "";
            txtBIOthExpProb.Text = "";
            txtBIYearGoal.Text   = "";
            txtProDesc.Text      = "";
            txtProName.Text      = "";
            lblShowResult.Text   = "添加成功";
        }
        else
        {
            BG_BudItemsLibrariesManager.ModifyBG_BudItemsLibraries(bi);
            txtBIAppReaCon.Text  = "";
            txtBIExpGistExp.Text = "";
            txtBILongGoal.Text   = "";
            txtBILMon.Text       = "";
            txtBIOthExpProb.Text = "";
            txtBIYearGoal.Text   = "";
            txtProDesc.Text      = "";
            txtProName.Text      = "";
            lblShowResult.Text   = "修改成功";
            Response.Redirect("LibrariesEditList.aspx", true);
        }
    }
コード例 #3
0
    private void txtBind(int buid)
    {
        BG_BudItemsLibraries bi = BG_BudItemsLibrariesManager.GetBG_BudItemsLibrariesByBudItID(buid);//

        if (bi != null)
        {
            txtBIAppReaCon.Text         = bi.BILAppReaCon;
            ddlProProper.SelectedValue  = bi.BILAttr;
            txtBIExpGistExp.Text        = bi.BILExpGistExp;
            ddlFunSub.SelectedValue     = bi.BILFunSub;
            txtBILMon.Text              = bi.BILMon.ToString();
            ddlDeptName.SelectedValue   = bi.DepID.ToString();
            txtBILongGoal.Text          = bi.BILLongGoal;
            txtBIOthExpProb.Text        = bi.BILOthExpProb;
            txtBIYearGoal.Text          = bi.BILYearGoal;
            ddlPayProType.SelectedValue = bi.PPID.ToString();
            txtProName.Text             = bi.BILProName.ToString();
            txtProDesc.Text             = bi.BILProDescrip.ToString();
            ddlProType.SelectedValue    = bi.BILProCategory;
        }
    }