private void BindData() { ProgressImplementAction progressImplementAction = new ProgressImplementAction(); this.dglist.DataSource = this.GetPageData(progressImplementAction.GetEvaluateInfos(this.MainId)); this.dglist.DataBind(); }
private void dglist_UpdateCommand(object source, DataGridCommandEventArgs e) { ProgressEvaluateInfo progressEvaluateInfo = new ProgressEvaluateInfo(); progressEvaluateInfo.Appraise = ((TextBox)e.Item.Cells[2].FindControl("Appraise")).Text.Trim(); progressEvaluateInfo.AppraisePeople = e.Item.Cells[0].Text.Trim(); progressEvaluateInfo.AppraiseTime = DateTime.Parse(((TextBox)e.Item.Cells[1].FindControl("AppriaseTime")).Text.Trim()); progressEvaluateInfo.MainID = this.dglist.DataKeys[e.Item.ItemIndex].ToString(); UserInfo currentUserInfo = userManageDb.GetCurrentUserInfo(); if (currentUserInfo == null) { this.js.Text = "alert('用户身份过期,请重新登录!');window.close();"; return; } if (e.Item.Cells[0].Text.Trim() != currentUserInfo.UserName) { this.js.Text = "alert(\"没有操作权限!\");"; return; } if (ProgressImplementAction.EditEvaluation(progressEvaluateInfo)) { this.js.Text = "alert(\"操作成功!\");"; this.dglist.EditItemIndex = -1; this.BindData(); return; } this.js.Text = "alert(\"操作失败!\");"; }
private void BindData() { this.hidMainId.Value = ""; ProgressImplementAction progressImplementAction = new ProgressImplementAction(); this.dgList.DataSource = progressImplementAction.GetImplementInfos(this.planId); this.dgList.DataBind(); }
protected void btnDel_Click(object sender, EventArgs e) { if (ProgressImplementAction.DelImplement(this.hidMainId.Value)) { this.js.Text = "alert(\"操作成功!\");"; } else { this.js.Text = "alert(\"操作失败!\");"; } this.BindData(); }
private void BindData() { ProgressImplementAction progressImplementAction = new ProgressImplementAction(); ProgressImplementInfo implementInfo = progressImplementAction.GetImplementInfo(this.MainId); this.txtActualizeCircs.Text = implementInfo.ActualizeCircs; this.txtExaminePeople.Text = implementInfo.ExaminePeople; this.txtExamineTime.Text = implementInfo.ExamineTime.ToShortDateString(); this.txtFillPeople.Text = implementInfo.FillPeople; this.txtFillTime.Text = implementInfo.FillTime.ToShortDateString(); this.txtRemark.Text = implementInfo.Remark; this.hdnProgressGuid.Value = implementInfo.ProgressGuid; }
private void BindData() { UserInfo currentUserInfo = userManageDb.GetCurrentUserInfo(); ProgressImplementAction progressImplementAction = new ProgressImplementAction(); ProgressEvaluateInfo evaluateInfo = progressImplementAction.GetEvaluateInfo(this.AppraiseId); this.txtAppraise.Text = evaluateInfo.Appraise; this.txtAppraiseTime.Text = evaluateInfo.AppraiseTime.ToShortDateString(); this.txtAppraiseTime.ReadOnly = true; if (currentUserInfo != null) { this.txtAppraisePeople.Text = currentUserInfo.UserName; return; } this.js.Text = "alert(\"登录时间过期,请重新登陆!\");window.close();"; }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { if (base.Request.Params["mainId"] == null) { return; } this.mainId = base.Request.Params["mainId"].ToString(); this.ViewState["MAINID"] = this.mainId; this.AppraiseId = ProgressImplementAction.GetNewAppraiseId(); this.ViewState["APPRAISEID"] = this.AppraiseId; this.hidMainId.Value = this.mainId; this.BindData(); } this.AppraiseId = this.ViewState["APPRAISEID"].ToString(); this.mainId = this.ViewState["MAINID"].ToString(); }
protected void btnSave_Click(object sender, EventArgs e) { ProgressImplementInfo progressImplementInfo = new ProgressImplementInfo(); progressImplementInfo.ActualizeCircs = this.txtActualizeCircs.Text; progressImplementInfo.ExaminePeople = this.txtExaminePeople.Text; if (this.txtExamineTime.Text.Trim() != "") { progressImplementInfo.ExamineTime = DateTime.Parse(this.txtExamineTime.Text); } progressImplementInfo.FillPeople = this.txtFillPeople.Text; if (this.txtFillTime.Text.Trim() != "") { progressImplementInfo.FillTime = DateTime.Parse(this.txtFillTime.Text); } progressImplementInfo.PlanId = this.PlanId; progressImplementInfo.MainID = this.MainId; progressImplementInfo.Remark = this.txtRemark.Text; progressImplementInfo.ProgressGuid = this.hdnProgressGuid.Value.Trim(); if (this.isNew) { if (ProgressImplementAction.SaveImplement(progressImplementInfo)) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_progressimplementitem' });"); } else { base.RegisterScript("top.ui.alert('保存失败');"); } } else { if (ProgressImplementAction.UpdateImplement(progressImplementInfo)) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_progressimplementitem' });"); } else { base.RegisterScript("top.ui.alert('保存失败');"); } } this.BindData(); }
protected void btnSave_Click(object sender, EventArgs e) { ProgressEvaluateInfo progressEvaluateInfo = new ProgressEvaluateInfo(); bool isEdit = this.ViewState["ISNEW"] != null && !Convert.ToBoolean(this.ViewState["ISNEW"].ToString().ToLower()); progressEvaluateInfo.AppraisePeople = this.txtAppraisePeople.Text; progressEvaluateInfo.AppraiseTime = DateTime.Parse(this.txtAppraiseTime.Text); progressEvaluateInfo.ParentMainID = this.mainId; progressEvaluateInfo.MainID = this.AppraiseId; progressEvaluateInfo.Appraise = this.txtAppraise.Text; if (ProgressImplementAction.AddEvaluate(progressEvaluateInfo, isEdit)) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_progressimplementitem' });"); } else { base.RegisterScript("top.ui.alert('保存失败');"); } this.BindData(); }
private void dglist_DeleteCommand(object source, DataGridCommandEventArgs e) { UserInfo currentUserInfo = userManageDb.GetCurrentUserInfo(); if (currentUserInfo == null) { this.js.Text = "alert('用户身份过期,请重新登录!');window.close();"; return; } if (e.Item.Cells[0].Text.Trim() != currentUserInfo.UserName) { this.js.Text = "alert(\"没有操作权限!\");"; return; } if (ProgressImplementAction.DelEvaluation(this.dglist.DataKeys[e.Item.ItemIndex].ToString())) { this.js.Text = "alert(\"操作成功!\");"; this.dglist.EditItemIndex = -1; this.BindData(); return; } this.js.Text = "alert(\"操作失败!\");"; }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { if (base.Request.Params["planId"] == null) { return; } this.PlanId = base.Request.Params["planId"].ToString(); this.ViewState["PLANID"] = this.PlanId; if (base.Request.Params["MainId"] != null) { this.MainId = base.Request.Params["MainId"].ToString(); this.ViewState["MAINID"] = this.MainId; this.BindData(); } else { this.MainId = ProgressImplementAction.GetNewImplementId(); this.ViewState["MAINID"] = this.MainId; this.isNew = true; this.ViewState["ISNEW"] = this.isNew.ToString(); this.hdnProgressGuid.Value = Guid.NewGuid().ToString(); } this.hidMainID.Value = this.MainId; this.FileLink1.MID = 1724; this.FileLink1.Type = 1; this.FileLink1.FID = this.hdnProgressGuid.Value.Trim(); } this.MainId = this.ViewState["MAINID"].ToString(); this.PlanId = this.ViewState["PLANID"].ToString(); if (this.ViewState["ISNEW"] != null) { this.isNew = Convert.ToBoolean(this.ViewState["ISNEW"].ToString().ToLower()); } }