public void RepFixBind(int budid) { DataTable dt = BGFixAssetPurchaseManager.GetFix(budid); repFix.DataSource = dt; repFix.DataBind(); }
protected void repFix_ItemCommand(object source, RepeaterCommandEventArgs e) { int faid = common.IntSafeConvert(e.CommandArgument); if (e.CommandName == "DelFix") { if (BGFixAssetPurchaseManager.DelFix(faid)) { RepFixBind(budid); } } if (e.CommandName == "UpdFix") { string postUrl = "FixAssetPurchaseUpd.aspx?faid=" + faid + "&depid=" + depid; Response.Redirect(postUrl, true); } }
public void FixBind(int faid) { BG_FixAssetPurchase fap = BGFixAssetPurchaseManager.GetFAPByFaid(faid); if (fap != null) { txtSort.Text = fap.FAName; txtModel.Text = fap.FAModel; txtBrand.Text = fap.FABrand; txtNum.Text = fap.FANum.ToString(); txtTime.Text = fap.FATime.ToString("yyyy-MM-dd"); txtPrice.Text = fap.FAPrice.ToString(); txtConfig.Text = fap.FAConfig; txtRemark.Text = fap.FARemark; ddlIsGovper.SelectedValue = fap.FAIsGovPur.ToString(); txtMon.Text = fap.FAMon.ToString(); HidBudid.Value = fap.BudID.ToString(); } }
protected void btnUpd_Click(object sender, EventArgs e) { BG_FixAssetPurchase bap = BGFixAssetPurchaseManager.GetFAPByFaid(faid); bap.FAName = txtSort.Text.Trim(); bap.FAModel = txtModel.Text.Trim(); bap.FABrand = txtBrand.Text.Trim(); bap.FAPrice = decimal.Parse(txtPrice.Text.Trim()); bap.FANum = int.Parse(txtNum.Text.Trim()); bap.FAMon = ParseUtil.ToDecimal(HidTotal.Value, 0); bap.FAIsGovPur = ddlIsGovper.SelectedValue; bap.FAConfig = txtConfig.Text.Trim(); bap.FARemark = txtRemark.Text.Trim(); if (BGFixAssetPurchaseManager.UpdFix(bap)) { lblShowResult.Text = "* 修改员工信息成功"; } else { lblShowResult.Text = "* 操作失败、请重试"; } }
protected void btnAdd_Click(object sender, EventArgs e) { BG_FixAssetPurchase bp = new BG_FixAssetPurchase(); bp.FAName = txtSort.Text.Trim(); bp.FAModel = txtModel.Text.Trim(); bp.FABrand = txtBrand.Text.Trim(); bp.FAPrice = decimal.Parse(txtPrice.Text.Trim()); bp.FANum = int.Parse(txtNum.Text.Trim()); bp.FAMon = ParseUtil.ToDecimal(HidTotal.Value, 0); bp.FAIsGovPur = ddlIsGovper.SelectedValue; bp.FAConfig = txtConfig.Text.Trim(); bp.FARemark = txtRemark.Text.Trim(); bp.FATime = DateTime.Parse(txtTime.Text.Trim()); bp.BudID = common.IntSafeConvert(HidBudid.Value); if (BGFixAssetPurchaseManager.AddFix(bp)) { lbResult.Text = "申请添加成功"; } else { lbResult.Text = "添加失败,请重新添加"; } }