protected void btnSave_Click(object sender, EventArgs e) { if (rblOver.SelectedIndex == -1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请选择修正或通过!');</script>"); } else { try { int cid = Convert.ToInt32(Request["ProjectCreateId"].ToString()); ProjectCreateInfo pc = new ProjectCreateInfo(cid); pc.TechView = txtTechView.Text.ToString(); pc.MarketView = txtMarketView.Text.ToString(); if (rblOver.Items[0].Selected) { pc.State = 2; pc.Save(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('您让申请人修正!');</script>"); } else if (rblOver.Items[1].Selected) { pc.State = 6; pc.Save(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('审批通过!');</script>"); } } catch (Exception Ex) { ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { int fid = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); ProjectCreateInfo pc = new ProjectCreateInfo(fid); pc.ApplyTime = DateTime.Now.ToString(); pc.State = 1; pc.Save(); gvDataBind(); }
protected void btnSave_Click(object sender, EventArgs e) { if (rblOver.SelectedIndex == -1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请选择修正或通过!');</script>"); } else { try { int cid = Convert.ToInt32(Request["ProjectCreateId"].ToString()); ProjectCreateInfo pc = new ProjectCreateInfo(cid); pc.ManagerView = txtManagerView.Text.ToString(); if (rblOver.Items[0].Selected) { pc.State = 5; pc.Save(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('您让申请人修正!');</script>"); } else if (rblOver.Items[1].Selected) { pc.State = 4; pc.Save(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('审批通过!');</script>"); MainProjectCreateInfo p = new MainProjectCreateInfo(); p.ClientId = Convert.ToInt32(pc.ClientId); p.PreMoney = pc.PreMoney.ToString(); p.PreProfit = pc.PreProfit.ToString(); p.ProjectLevelId = Convert.ToInt32(pc.ProjectLevelId); p.ProjectName = pc.ProjectName.ToString(); p.ProjectTypeId = Convert.ToInt32(pc.ProjectTypeId); p.SheetNum = pc.SheetNum.ToString(); p.YeWuId = Convert.ToInt32(pc.YeWuId); p.Save(); } } catch (Exception Ex) { ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true); } } }
protected void btnSave_Click(object sender, EventArgs e) { if (IsPageValid()) { try { ProjectCreateInfo pc = new ProjectCreateInfo(); pc.ApplyName = Session["EmployeeName"].ToString(); pc.DepartName = Session["DepartName"].ToString(); pc.State = 0; pc.ApplyDate = txtApplyDate.Text.ToString(); pc.ApplyTime = ""; pc.ClientDescribe = txtClientDes.Text.ToString(); pc.CompitDescribe = txtCompitDes.Text.ToString(); pc.BusinessDescribe = txtBusinessDes.Text.ToString(); pc.NeedDescribe = txtNeedDes.Text.ToString(); pc.RiskDescribe = txtRiskDes.Text.ToString(); pc.StrategyDesribe = txtStrategyDes.Text.ToString(); pc.TechDescribe = txtTechDes.Text.ToString(); pc.CallbidPhaseExp = txtCallBidPhaseExp.Text.ToString(); pc.CarryPhaseExp = txtCarryPhaseExp.Text.ToString(); pc.CreatePhaseExp = txtCratePhaseExp.Text.ToString(); pc.ProposePhaseExp = txtProposePhaseExp.Text.ToString(); pc.TalkPhaseExp = txtTalkPhaseExp.Text.ToString(); pc.ClientId = Convert.ToInt32(ddlClient.SelectedValue); pc.MarketView = txtMarketView.Text.ToString(); pc.Memo = txtMemo.Text.ToString(); pc.PreMoney = txtPreMoney.Text.ToString(); pc.PreProfit = txtPreProfit.Text.ToString(); pc.ProjectLevelId = Convert.ToInt32(ddlProjectLevel.SelectedValue); pc.ProjectName = txtProjectName.Text.ToString(); pc.ProjectTypeId = Convert.ToInt32(ddlProjectType.SelectedValue); pc.SheetNum = lblProjectNum.Text.ToString(); pc.TechView = txtTechView.Text.ToString(); pc.Today = DateTime.Now.ToString("yyyyMMdd").Substring(2); pc.YeWuId = Convert.ToInt32(ddlYewu.SelectedValue); pc.Save(); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('添加成功!');</script>"); } catch (Exception Ex) { ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('添加失败:" + Ex.Message + "');", true); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { string strDepart = Session["DepartName"].ToString(); int fid = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); ProjectCreateInfo pc = new ProjectCreateInfo(fid); pc.ApplyTime = DateTime.Now.ToString(); if (strDepart == "技术部") { pc.State = 3; } else { pc.State = 6; } pc.Save(); gvDataBind(); }