protected void btnSubmit_Click(object sender, EventArgs e) { String RoleIds = GetDepartmentRoleIds(); RoleIds = RoleIds.Remove(RoleIds.Length - 1); string theme = userVo.theme; if (txtStaffcode.Text != string.Empty) { int staffCodeDuplicatechec = customerbo.CheckStaffCode(txtStaffcode.Text); if (staffCodeDuplicatechec > 0) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyScript", "alert('Please Enter Unique Staffcode Code. You Can Use Combination of 0-9 and a-z');", true); return; } } if (ValidateStaffReportingManager()) { rmStaffVo = CollectAdviserStaffData(); rmUserVo = CollectAdviserStaffUserData(); if (Validation(txtAgentCode.Text) && EmailValidation(txtEmail.Text)) { //rmIds = advisorStaffBo.CreateCompleteRM(rmUserVo, rmStaffVo, userVo.UserId, ddlTitleList.SelectedItem.Text.Trim().ToUpper() == "OPS" ? true : false, false); hidRMid.Value = Convert.ToString(advisorStaffBo.CreateAdviserStaff(rmUserVo, rmStaffVo, userVo.UserId, ddlTitleList.SelectedItem.Text.Trim().ToUpper() == "OPS" ? true : false, false, RoleIds, theme)); ControlViewEditMode(true); divMsgSuccess.InnerText = " Staff Added Sucessfully"; trSuccessMsg.Visible = true; } } }
public int CheckStaffCodes(string prefixText) { int result = 0; CustomerBo customerBo = new CustomerBo(); result = customerBo.CheckStaffCode(prefixText); return(result); }