protected override void OnInit(EventArgs e) { base.OnInit(e); ((Label)Page.Master.FindControl("lblTopic")).Text = "จัดการข้อมูล Team Telesales"; Page.Form.DefaultButton = btnSearch.UniqueID; ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_038"); if (priData == null || priData.IsView != 1) { AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx"); } AppUtil.BuildCombo(cmbTeamHeader, SlmScr038Biz.GetStaffsListHeader(), "ทั้งหมด"); //AppUtil.BuildCombo(cmbDHeader, SlmScr038Biz.GetStaffsList(), "ระบุ"); _log = LogManager.GetLogger(this.GetType()); }
protected void btnSave_Click(object sender, EventArgs e) { if (!ValidateData()) { zPopDetail.Show(); return; } var ts = GetData(); SlmScr038Biz bz = new SlmScr038Biz(); if (!bz.SaveTeamData(ts, Page.User.Identity.Name)) { zPopDetail.Show(); AppUtil.ClientAlert(this, bz.ErrorMessage); } else { zPopDetail.Hide(); LoadDataList(gvResult.PageIndex); string tmp = cmbTeamHeader.SelectedValue; AppUtil.BuildCombo(cmbTeamHeader, SlmScr038Biz.GetStaffsListHeader(), "ทั้งหมด"); AppUtil.SetComboValue(cmbTeamHeader, tmp); } }