protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int salaryType = int.Parse(Request["salaryType"].ToString().Trim()); int salaryId = int.Parse(Request["salaryId"].ToString().Trim()); DalOperationAboutSalaryQA dalsqa = new DalOperationAboutSalaryQA(); List<SalaryQA> salaryQas = dalsqa.GetSalaryQA(salaryId, salaryType); this.TeacherSalaryQAList.DataSource = salaryQas; this.TeacherSalaryQAList.DataBind(); this.hf_SalaryId.Value = salaryId.ToString(); this.hf_SalaryType.Value = salaryType.ToString(); UserCookiesInfo userCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo(); this.teacherName.Text = userCookiesInfo.userName; } }
private bool isSalaryHasQA(int salaryId, int salaryType) { bool isSalaryHasQA = true; DalOperationAboutSalaryQA dalqa = new DalOperationAboutSalaryQA(); List<SalaryQA> salaryQas = dalqa.GetSalaryQA(salaryId, salaryType); if (salaryQas == null || salaryQas.Count == 0) { isSalaryHasQA = false; } return isSalaryHasQA; }