protected void Page_Load(object sender, EventArgs e) { TrainEmployeeBLL objTrainEmployeeBll = new TrainEmployeeBLL(); string str = Request.QueryString.Get("id"); if (str != null && str != "") { ViewState["TrainTypeID"] = str; } else { if (PrjPub.StudentID == null) { Response.Write("<script>alert('已超时,请注销后重新登录!');window.close();</script>"); return; } ViewState["TrainTypeID"] = objTrainEmployeeBll.GetTrainEmployeeByEmployeeID(PrjPub.CurrentStudent.EmployeeID).TrainTypeID.ToString(); } if (ViewState["TrainTypeID"].ToString() == "0") { Response.Write("<script>alert('请选择培训类别!');window.close();</script>"); return; } TrainTypeBLL objTrainTypeBll = new TrainTypeBLL(); TrainType objTrainType = objTrainTypeBll.GetTrainTypeInfo(Convert.ToInt32(ViewState["TrainTypeID"].ToString())); lblDescription.Text = objTrainType.Description; lblMemo.Text = objTrainType.Memo; BindGrid1(); BindGrid2(); }
protected void Page_Load(object sender, EventArgs e) { TrainEmployeeBLL objTrainEmployeeBll = new TrainEmployeeBLL(); if (PrjPub.StudentID == null) { Response.Write("<script>alert('已超时,请注销后重新登录!');window.close();</script>"); return; } ViewState["TrainTypeID"] = objTrainEmployeeBll.GetTrainEmployeeByEmployeeID(PrjPub.CurrentStudent.EmployeeID).TrainTypeID.ToString(); if (ViewState["TrainTypeID"].ToString() == "0") { Response.Write("<script>alert('请选择培训类别!');window.close();</script>"); return; } BindGrid(); }
protected void btnOk_Click(object sender, EventArgs e) { if (tvType.SelectedNode == null) { SessionSet.PageMessage = "请选择培训类别!"; return; } if (tvType.SelectedNode.Nodes.Count > 0) { SessionSet.PageMessage = "请选择叶子节点!"; return; } int nEmpID; nEmpID = PrjPub.CurrentStudent.EmployeeID; TrainEmployeeBLL objBll = new TrainEmployeeBLL(); TrainEmployee objNow = objBll.GetTrainEmployeeByEmployeeID(nEmpID); TrainEmployee obj = new TrainEmployee(); obj.EmployeeID = nEmpID; obj.TrainTypeID = Convert.ToInt32(tvType.SelectedNode.ID); if (objNow.EmployeeID == 0) { objBll.AddTrainEmployee(obj); } else { obj.TrainEmployeeID = objNow.TrainEmployeeID; objBll.UpdateTrainEmployee(obj); } Response.Write("<script>window.opener.form1.submit();window.close();</script>"); }
protected void Page_Load(object sender, EventArgs e) { if (PrjPub.CurrentStudent != null) { TrainEmployeeBLL objTrainEmployeeBll = new TrainEmployeeBLL(); ViewState["TrainTypeID"] = objTrainEmployeeBll.GetTrainEmployeeByEmployeeID(PrjPub.CurrentStudent.EmployeeID).TrainTypeID.ToString(); if (ViewState["TrainTypeID"].ToString() == "0") { lblType.Text = "请选择培训类别"; } else { BindGrid1(); BindGrid2(); //BindGrid3(); //BindGrid4(); lblType.Text = ""; TrainTypeBLL objTrainTypeBll = new TrainTypeBLL(); TrainType objTrainType = objTrainTypeBll.GetTrainTypeInfo(Convert.ToInt32(ViewState["TrainTypeID"].ToString())); if (objTrainType == null) { lblType.Text = ""; } else { lblType.Text = lblType.Text + GetType(" - " + objTrainType.TypeName, objTrainType.ParentID); } } } else { Response.Redirect("NewStudyInfo.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(PrjPub.StudentID)) { Response.Write("<script>alert('您还没有登录,不能查看在线学习信息!');window.close();</script>"); return; } TrainEmployeeBLL objTrainEmployeeBll = new TrainEmployeeBLL(); ViewState["TrainTypeID"] = objTrainEmployeeBll.GetTrainEmployeeByEmployeeID(PrjPub.CurrentStudent.EmployeeID).TrainTypeID.ToString(); if (ViewState["TrainTypeID"].ToString() == "0") { lblType.Text = "请选择培训类别"; } else { BindGrid1(); BindGrid2(); lblType.Text = ""; TrainTypeBLL objTrainTypeBll = new TrainTypeBLL(); TrainType objTrainType = objTrainTypeBll.GetTrainTypeInfo(Convert.ToInt32(ViewState["TrainTypeID"].ToString())); if (objTrainType == null) { lblType.Text = ""; } else { lblType.Text = lblType.Text + GetType(" - " + objTrainType.TypeName, objTrainType.ParentID); } } }