protected void But_Apply_Click(object sender, EventArgs e) { Model.ApplyMessage applyMessage = new Model.ApplyMessage(); applyMessage.applicantID = Convert.ToInt32(txtID.Text); applyMessage.approverID = Convert.ToInt32("20000"); applyMessage.name = txtName.Text.Trim(); applyMessage.department = txtDepartment.Text.Trim(); applyMessage.job = txtJob.Text.Trim(); applyMessage.permission = RadioButtonList_Choose.SelectedValue; applyMessage.remark = "1"; BLL.ApplyMessageManager applyMessageManager = new BLL.ApplyMessageManager(); bool bo = applyMessageManager.Add(applyMessage); if (bo == true) { Response.Write("<script language=javascript>alert('申请成功!请耐心等待管理员同意')</script>"); } else { Response.Write("<script language=javascript>alert('申请失败!请重试')"); } }
protected void ApplyNumber() { Model.ApplyMessage ApplyMessage = new Model.ApplyMessage(); BLL.ApplyMessageManager apply = new BLL.ApplyMessageManager(); string str = "0"; apply.UpdateState(str); LabelApply.Text = "0"; LabelApply.Visible = false; }
protected void ApplyNumber() { Model.ApplyMessage ApplyMessage = new Model.ApplyMessage(); BLL.ApplyMessageManager apply = new BLL.ApplyMessageManager(); string str = "remark='" + "1" + "'"; int number = apply.GetRecordCount(str); if (number > 0) { LabelApply.Visible = true; LabelApply.Text = Convert.ToString(number); } }