protected void txtStaffName_TextChanged(object sender, EventArgs e) { UserControls_StaffControl StaffControl = (UserControls_StaffControl)this.fvStuff.FindControl("StaffControl1"); TextBox txtFlowParticipant = (TextBox)this.fvStuff.FindControl("txtFlowParticipant"); if (StaffControl.StaffID != string.Empty) { txtFlowParticipant.Text = this.AuthorizationBLL.GetStuffUserById(int.Parse(StaffControl.StaffID)).UserName; } else { txtFlowParticipant.Text = ""; } }
protected void FlowParticipantDetail_Inserting(object sender, ObjectDataSourceMethodEventArgs e) { UserControls_StaffControl StaffControl = (UserControls_StaffControl)this.fvStuff.FindControl("StaffControl1"); TextBox txtFlowParticipant = (TextBox)this.fvStuff.FindControl("txtFlowParticipant"); if (!string.IsNullOrEmpty(StaffControl.StaffID)) { e.InputParameters["FlowID"] = int.Parse(ViewState["FlowID"].ToString()); e.InputParameters["UserName"] = txtFlowParticipant.Text.Trim(' '); e.InputParameters["StaffName"] = StaffControl.StaffName; e.InputParameters["UserID"] = StaffControl.StaffID; } else { PageUtility.ShowModelDlg(this.Page, "请选择用户!"); e.Cancel = true; } }