protected void Page_Load(object sender, EventArgs e) { #region 获取Select Pipeline Point Fields // 未分配的和已分配到当前Group中的User BLL.CompanyLoanPointFields CompanyLoanPointFields = new BLL.CompanyLoanPointFields(); DataTable dtCompanyLoanPointFieldsInfo = CompanyLoanPointFields.GetCompanyLoanPointFieldsInfo(); this.gridPipelinePointFieldsList.DataSource = dtCompanyLoanPointFieldsInfo; this.gridPipelinePointFieldsList.DataBind(); #endregion if (!IsPostBack) { userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); if (userHomePref == null) { userHomePref = new Model.UserHomePref(); } Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); BindView(); if (null != userPipelineCols) { SetUserPipelineColumnsInfo(userPipelineCols); } BindList(); } }
/// <summary> /// copy user PipelineColsinfo /// </summary> /// <param name="nSourceUserID"></param> /// <param name="nDistUserID"></param> public void CopyUserPipelineColsInfo(int nSourceUserID, int nDistUserID) { Model.UserPipelineColumns userPipelineCols = dal.GetModel(nSourceUserID); if (null != userPipelineCols) { userPipelineCols.UserId = nDistUserID; dal.Add(userPipelineCols); } }
/// <summary> /// bind UserPipelineColumns Info /// </summary> /// <param name="pipelineCols"></param> private bool SetUserPipelineColumnsInfo(Model.UserPipelineColumns pipelineCols) { this.ckbPointFolder.Checked = pipelineCols.PointFolder; this.ckbStage.Checked = pipelineCols.Stage; this.ckbBranch.Checked = pipelineCols.Branch; this.ckbEstimatedClose.Checked = pipelineCols.EstimatedClose; this.ckbAlerts.Checked = pipelineCols.Alerts; this.ckbLoanOfficer.Checked = pipelineCols.LoanOfficer; this.ckbAmount.Checked = pipelineCols.Amount; this.ckbLien.Checked = pipelineCols.Lien; this.ckbRate.Checked = pipelineCols.Rate; this.ckbLender.Checked = pipelineCols.Lender; this.ckbLockExpirDate.Checked = pipelineCols.LockExp; this.ckbPercentComplete.Checked = pipelineCols.PercentCompl; this.ckbProcessor.Checked = pipelineCols.Processor; this.ckbTaskCount.Checked = pipelineCols.TaskCount; this.ckbFilename.Checked = pipelineCols.PointFileName; this.chkLastComplStage.Checked = pipelineCols.LastCompletedStage; this.chkLastStageComlDate.Checked = pipelineCols.LastStageComplDate; //gdc CR40 this.ckbCloser.Checked = pipelineCols.Closer; this.ckbShipper.Checked = pipelineCols.Shipper; this.ckbDocPrep.Checked = pipelineCols.DocPrep; this.ckbAssistant.Checked = pipelineCols.Assistant; //gdc CR47 this.cbxLoanProgram.Checked = pipelineCols.LoanProgram; //CR49 this.cbxPurpose.Checked = pipelineCols.Purpose; //gdc CR51 this.cbxJrProcessor.Checked = pipelineCols.JrProcessor; this.ckbLastLoanNote.Checked = pipelineCols.LastLoanNote; return(true); }
/// <summary> /// load UserPipelineColumns Personalization Info /// </summary> /// <param name="pipelineCols"></param> private bool GetUserPipelineColumnsInfo(ref Model.UserPipelineColumns pipelineCols) { pipelineCols.PointFolder = this.ckbPointFolder.Checked; pipelineCols.Stage = this.ckbStage.Checked; pipelineCols.Branch = this.ckbBranch.Checked; pipelineCols.EstimatedClose = this.ckbEstimatedClose.Checked; pipelineCols.Alerts = this.ckbAlerts.Checked; pipelineCols.LoanOfficer = this.ckbLoanOfficer.Checked; pipelineCols.Amount = this.ckbAmount.Checked; pipelineCols.Lien = this.ckbLien.Checked; pipelineCols.Rate = this.ckbRate.Checked; pipelineCols.Lender = this.ckbLender.Checked; pipelineCols.LockExp = this.ckbLockExpirDate.Checked; pipelineCols.PercentCompl = this.ckbPercentComplete.Checked; pipelineCols.Processor = this.ckbProcessor.Checked; pipelineCols.TaskCount = this.ckbTaskCount.Checked; pipelineCols.PointFileName = this.ckbFilename.Checked; pipelineCols.LastCompletedStage = this.chkLastComplStage.Checked; pipelineCols.LastStageComplDate = this.chkLastStageComlDate.Checked; // CR49 pipelineCols.Purpose = this.cbxPurpose.Checked; //gdc CR40 pipelineCols.Assistant = this.ckbAssistant.Checked; pipelineCols.DocPrep = this.ckbDocPrep.Checked; pipelineCols.Shipper = this.ckbShipper.Checked; pipelineCols.Closer = this.ckbCloser.Checked; //gdc CR47 pipelineCols.LoanProgram = this.cbxLoanProgram.Checked; //gdc CR48 //pipelineCols.QuickLeadForm = this.ckbQuickleadform.Checked; pipelineCols.JrProcessor = this.cbxJrProcessor.Checked; pipelineCols.LastLoanNote = this.ckbLastLoanNote.Checked; return(true); }
/// <summary> /// bind UserPipelineColumns Info /// </summary> /// <param name="pipelineCols"></param> private bool SetUserPipelineColumnsInfo(Model.UserPipelineColumns pipelineCols) { this.ckbPointFolder.Checked = pipelineCols.PointFolder; this.ckbStage.Checked = pipelineCols.Stage; this.ckbBranch.Checked = pipelineCols.Branch; this.ckbEstimatedClose.Checked = pipelineCols.EstimatedClose; this.ckbAlerts.Checked = pipelineCols.Alerts; this.ckbLoanOfficer.Checked = pipelineCols.LoanOfficer; this.ckbAmount.Checked = pipelineCols.Amount; this.ckbLien.Checked = pipelineCols.Lien; this.ckbRate.Checked = pipelineCols.Rate; this.ckbLender.Checked = pipelineCols.Lender; this.ckbLockExpirDate.Checked = pipelineCols.LockExp; this.ckbPercentComplete.Checked = pipelineCols.PercentCompl; this.ckbProcessor.Checked = pipelineCols.Processor; this.ckbTaskCount.Checked = pipelineCols.TaskCount; this.ckbFilename.Checked = pipelineCols.PointFileName; return(true); }
/// <summary> /// load UserPipelineColumns Personalization Info /// </summary> /// <param name="pipelineCols"></param> private bool GetUserPipelineColumnsInfo(ref Model.UserPipelineColumns pipelineCols) { pipelineCols.PointFolder = this.ckbPointFolder.Checked; pipelineCols.Stage = this.ckbStage.Checked; pipelineCols.Branch = this.ckbBranch.Checked; pipelineCols.EstimatedClose = this.ckbEstimatedClose.Checked; pipelineCols.Alerts = this.ckbAlerts.Checked; pipelineCols.LoanOfficer = this.ckbLoanOfficer.Checked; pipelineCols.Amount = this.ckbAmount.Checked; pipelineCols.Lien = this.ckbLien.Checked; pipelineCols.Rate = this.ckbRate.Checked; pipelineCols.Lender = this.ckbLender.Checked; pipelineCols.LockExp = this.ckbLockExpirDate.Checked; pipelineCols.PercentCompl = this.ckbPercentComplete.Checked; pipelineCols.Processor = this.ckbProcessor.Checked; pipelineCols.TaskCount = this.ckbTaskCount.Checked; pipelineCols.PointFileName = this.ckbFilename.Checked; return(true); }
const int ROLEID_LO = 3; // Loan Officer RoleId protected void Page_Load(object sender, EventArgs e) { Model.Users userInfo = UsersManager.GetModel(CurrUser.iUserID); if (!IsPostBack) { if (!CurrUser.userRole.CustomUserHome) { this.ckbCompanyCalendar.Enabled = false; this.ckbRatesSummary.Enabled = false; this.ckbPipelineChart.Enabled = false; this.ckbGoalsChart.Enabled = false; this.ckbSalesBreakdownChart.Enabled = false; this.ckbOverdueTasks.Enabled = false; this.ckbOrgProductionChart.Enabled = false; this.ckbAnnouncements.Enabled = false; this.ckbOrgProductSaleBreakdownChart.Enabled = false; this.ckbExchangeInbox.Enabled = false; this.ckbExchangeCalendar.Enabled = false; this.ckbQuickleadform.Enabled = false; } if (ROLEID_EXECUTIVE != CurrUser.iRoleID && ROLEID_BRANCHMANAGER != CurrUser.iRoleID) { this.ckbSalesBreakdownChart.Enabled = false; this.ckbOrgProductionChart.Enabled = false; this.ckbOrgProductSaleBreakdownChart.Enabled = false; ClientFun("isneedcheck", "needCheckAllChart = false;"); } Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); Model.UserProspectColumns userProspectCols = UserProspectColsManager.GetModel(CurrUser.iUserID); Model.UserHomePref userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); if (null == userInfo) { LPLog.LogMessage(LogType.Logerror, string.Format("User Personalization: User with id {0} does not exist.", CurrUser.iUserID)); ClientFun("unknowerrormsg", "alert('User does not exists, unknow error.');"); } ListItem item = this.ddlLoanPerPage.Items.FindByValue(userInfo.LoansPerPage.ToString()); if (null != item) { this.ddlLoanPerPage.ClearSelection(); item.Selected = true; } //gdc CR47 this.cbxShowTasksInLSR.Checked = userInfo.ShowTasksInLSR; //gdc CR48 this.cbxRemindTaskDue.Checked = userInfo.RemindTaskDue; //gdc CR48 if (!string.IsNullOrEmpty(userInfo.TaskReminder.ToString()) && userInfo.TaskReminder.ToString() != "0") { this.txtReminderTime.Text = userInfo.TaskReminder.ToString(); if (this.cbxRemindTaskDue.Checked == true) { txtReminderTime.Enabled = true; } } else { this.txtReminderTime.Text = "15"; } if (!string.IsNullOrEmpty(userInfo.SortTaskPickList.ToString())) { ListItem itemSortTaskPickList = this.ddlSortTaskPickList.Items.FindByValue(userInfo.SortTaskPickList.ToString()); if (null != itemSortTaskPickList) { this.ddlSortTaskPickList.ClearSelection(); itemSortTaskPickList.Selected = true; } } if (null != userPipelineCols) { SetUserPipelineColumnsInfo(userPipelineCols); } if (null != userProspectCols) { SetUserProspectColumnsInfo(userProspectCols); } if (null != userHomePref) { SetUserHomePrefInfo(userHomePref); } } }
protected void btnSave_Click(object sender, EventArgs e) { Model.Users userInfo = UsersManager.GetModel(CurrUser.iUserID); Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); Model.UserProspectColumns userProspectCols = UserProspectColsManager.GetModel(CurrUser.iUserID); Model.UserHomePref userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); try { if (null == userInfo) { LPLog.LogMessage(LogType.Logerror, string.Format("User Personalization - Preferences: User with id {0} does not exist.", CurrUser.iUserID)); ClientFun("unknowerrmsg2", "alert('User does not exists, unknow error.');"); } if (!GetUserInfo(ref userInfo)) { ClientFun("invalidinputmsg", "alert('Invalid input!');"); return; } UsersManager.Update(userInfo); if (null == userPipelineCols) { userPipelineCols = new Model.UserPipelineColumns(); userPipelineCols.UserId = CurrUser.iUserID; GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Add(userPipelineCols); } else { GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Update(userPipelineCols); } if (null == userProspectCols) { userProspectCols = new Model.UserProspectColumns(); userProspectCols.UserId = CurrUser.iUserID; GetUserProspectColumnsInfo(ref userProspectCols); UserProspectColsManager.Add(userProspectCols); } else { GetUserProspectColumnsInfo(ref userProspectCols); UserProspectColsManager.Update(userProspectCols); } if (null == userHomePref) { userHomePref = new Model.UserHomePref(); userHomePref.UserId = CurrUser.iUserID; GetUserHomePrefInfo(ref userHomePref); UserHomePrefManager.Add(userHomePref); } else { GetUserHomePrefInfo(ref userHomePref); UserHomePrefManager.Update(userHomePref); } ClientFun("sucsmsg", "alert('Saved!');"); } catch (Exception ex) { PageCommon.AlertMsg(this, "Failed to save user personalization preferences info, reason:" + ex.Message); LPLog.LogMessage(LogType.Logerror, "Failed to save user personalization preferences info: " + ex.Message); return; } }
private List <string> ShowColumns() { BLL.UserPipelineColumns upcBll = new UserPipelineColumns(); Model.UserPipelineColumns model = upcBll.GetModel(this.CurrUser.iUserID); List <string> ShowColumnsList = new List <string>(); #region ShowColumns ShowColumnsList.Add("Borrower"); if (model.Alerts) { ShowColumnsList.Add("Alerts"); //显示什么内容 数据库中仅有图标 } if (model.Amount) { ShowColumnsList.Add("Amount"); } if (model.Assistant) { ShowColumnsList.Add("Assistant"); } if (model.Branch) { ShowColumnsList.Add("Branch"); } if (model.Closer) { ShowColumnsList.Add("Closer"); } if (model.DocPrep) { ShowColumnsList.Add("DocPrep"); } if (model.EstimatedClose) { ShowColumnsList.Add("EstClose"); } if (model.LastCompletedStage) { ShowColumnsList.Add("LastCompletedStage"); } if (model.LastStageComplDate) { ShowColumnsList.Add("LastStageComplDate"); } if (model.Lender) { ShowColumnsList.Add("Lender"); } if (model.Lien) { ShowColumnsList.Add("Lien"); } if (model.LoanOfficer) { ShowColumnsList.Add("Loan Officer"); } if (model.LockExp) { ShowColumnsList.Add("Lock Expiration Date"); } if (model.PercentCompl) { ShowColumnsList.Add("Progress"); } if (model.PointFileName) { ShowColumnsList.Add("Filename"); } if (model.PointFolder) { ShowColumnsList.Add("Point Folder"); } if (model.Processor) { ShowColumnsList.Add("Processor"); } if (model.Rate) { ShowColumnsList.Add("Rate"); } if (model.Shipper) { ShowColumnsList.Add("Shipper"); } if (model.Stage) { ShowColumnsList.Add("Stage"); } if (model.TaskCount) { ShowColumnsList.Add("Task Count"); } #endregion return(ShowColumnsList); }
const int ROLEID_LO = 3; // Loan Officer RoleId protected void Page_Load(object sender, EventArgs e) { Model.Users userInfo = UsersManager.GetModel(CurrUser.iUserID); if (!IsPostBack) { if (!CurrUser.userRole.CustomUserHome) { this.ckbCompanyCalendar.Enabled = false; this.ckbRatesSummary.Enabled = false; this.ckbPipelineChart.Enabled = false; this.ckbGoalsChart.Enabled = false; this.ckbSalesBreakdownChart.Enabled = false; this.ckbOverdueTasks.Enabled = false; this.ckbOrgProductionChart.Enabled = false; this.ckbAnnouncements.Enabled = false; this.ckbOrgProductSaleBreakdownChart.Enabled = false; this.ckbExchangeInbox.Enabled = false; this.ckbExchangeCalendar.Enabled = false; } if (ROLEID_EXECUTIVE != CurrUser.iRoleID && ROLEID_BRANCHMANAGER != CurrUser.iRoleID) { this.ckbSalesBreakdownChart.Enabled = false; this.ckbOrgProductionChart.Enabled = false; this.ckbOrgProductSaleBreakdownChart.Enabled = false; ClientFun("isneedcheck", "needCheckAllChart = false;"); } if (ROLEID_LO == CurrUser.iRoleID && CurrUser.userRole.SetOwnGoals) { this.btnSetGoals.OnClientClick = string.Format("showUserGoalsSetupWin('{0}'); return false;", CurrUser.iUserID); } else { this.btnSetGoals.Enabled = false; } Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); Model.UserProspectColumns userProspectCols = UserProspectColsManager.GetModel(CurrUser.iUserID); Model.UserHomePref userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); if (null == userInfo) { LPLog.LogMessage(LogType.Logerror, string.Format("User Personalization: User with id {0} does not exist.", CurrUser.iUserID)); ClientFun("unknowerrormsg", "ShowMsg('unknowerror');"); } Model.Company_General company = comGeneral.GetModel(); if (null != company) { this.hiPrefix.Value = company.AD_OU_Filter; } this.lbUserName.Text = string.Format("{0} {1}", userInfo.FirstName, userInfo.LastName); this.lbEmail.Text = userInfo.EmailAddress; //this.tbPWD.Text = userInfo.Password; //this.tbPWDCfm.Text = userInfo.Password; this.hiUsername.Value = userInfo.Username; this.hiFirstName.Value = userInfo.FirstName; this.hiLastName.Value = userInfo.LastName; #region show my picture neo if (userInfo.UserPictureFile == null) { this.imgUserPhoto.ImageUrl = string.Format("~/_layouts/LPWeb/Settings/GetUserPicture.aspx?t={0}", DateTime.Now.Ticks); } else { this.imgUserPhoto.ImageUrl = string.Format("~/_layouts/LPWeb/Settings/GetUserPicture.aspx?uid={0}&t={1}", this.CurrUser.iUserID.ToString(), DateTime.Now.Ticks); } #endregion // My Signature this.txtSignature.Text = userInfo.Signature; ListItem item = this.ddlLoanPerPage.Items.FindByValue(userInfo.LoansPerPage.ToString()); if (null != item) { this.ddlLoanPerPage.ClearSelection(); item.Selected = true; } if (null != userPipelineCols) { SetUserPipelineColumnsInfo(userPipelineCols); } if (null != userProspectCols) { SetUserProspectColumnsInfo(userProspectCols); } if (null != userHomePref) { SetUserHomePrefInfo(userHomePref); } } // password area if (string.IsNullOrEmpty(userInfo.Password)) { this.trPwd.Attributes.CssStyle.Add("display", "none"); this.lbtnChangePwd.Attributes.CssStyle.Add("display", ""); this.lbtnChangePwd.Text = "Store your password"; this.lbtnCancelPwd.Attributes.CssStyle.Add("display", "none"); } else { this.trPwd.Attributes.CssStyle.Add("display", "none"); this.lbtnChangePwd.Attributes.CssStyle.Add("display", ""); this.lbtnCancelPwd.Attributes.CssStyle.Add("display", "none"); } }
protected void btnSave_Click(object sender, EventArgs e) { Model.Users userInfo = UsersManager.GetModel(CurrUser.iUserID); Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); Model.UserProspectColumns userProspectCols = UserProspectColsManager.GetModel(CurrUser.iUserID); Model.UserHomePref userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); try { if (null == userInfo) { LPLog.LogMessage(LogType.Logerror, string.Format("User Personalization: User with id {0} does not exist.", CurrUser.iUserID)); ClientFun("unknowerrmsg2", "ShowMsg('unknowerror');"); return; } if (!GetUserInfo(ref userInfo)) { ClientFun("invalidinputmsg", "ShowMsg('invalidInput');"); return; } UsersManager.Update(userInfo); if (null == userPipelineCols) { userPipelineCols = new Model.UserPipelineColumns(); userPipelineCols.UserId = CurrUser.iUserID; GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Add(userPipelineCols); } else { GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Update(userPipelineCols); } if (null == userProspectCols) { userProspectCols = new Model.UserProspectColumns(); userProspectCols.UserId = CurrUser.iUserID; GetUserProspectColumnsInfo(ref userProspectCols); UserProspectColsManager.Add(userProspectCols); } else { GetUserProspectColumnsInfo(ref userProspectCols); UserProspectColsManager.Update(userProspectCols); } if (null == userHomePref) { userHomePref = new Model.UserHomePref(); userHomePref.UserId = CurrUser.iUserID; GetUserHomePrefInfo(ref userHomePref); UserHomePrefManager.Add(userHomePref); } else { GetUserHomePrefInfo(ref userHomePref); UserHomePrefManager.Update(userHomePref); } if (!string.IsNullOrEmpty(this.tbPWD.Text)) { try { ServiceManager sm = new ServiceManager(); using (LP2ServiceClient service = sm.StartServiceClient()) { ReqHdr hdr; UpdateADUserRequest uReq = new UpdateADUserRequest(); hdr = new ReqHdr(); hdr.UserId = CurrUser.iUserID; uReq.hdr = hdr; uReq.Command = UserMgrCommandType.ChangePassword; uReq.AD_OU_Filter = this.hiPrefix.Value; uReq.AD_User = new LP_Service.User(); uReq.AD_User.Password = this.tbPWD.Text; uReq.AD_User.Username = this.hiUsername.Value; uReq.AD_User.Firstname = this.hiFirstName.Value; uReq.AD_User.Lastname = this.hiLastName.Value; uReq.AD_User.Email = this.lbEmail.Text; UpdateADUserResponse uResponse; uResponse = service.UpdateADUser(uReq); if (!uResponse.hdr.Successful) { PageCommon.AlertMsg(this, "Failed to change password in AD, error info: " + uResponse.hdr.StatusInfo); LPLog.LogMessage(LogType.Logerror, "Failed to change password in AD, username="******"Failed to change password in AD, reason: User Manager is not running."); return; } catch (Exception ex) { PageCommon.AlertMsg(this, "Failed to change password in AD, exception info: " + ex.Message); LPLog.LogMessage(LogType.Logerror, "Failed to change password in AD, username="******", Exception:" + ex.Message); return; } } ClientFun("sucsmsg", "ShowMsg('savesuccess');"); } catch (Exception ex) { PageCommon.AlertMsg(this, "Failed to save user personalization info, reason:" + ex.Message); LPLog.LogMessage(LogType.Logerror, "Failed to save user personalization info: " + ex.Message); return; } }
protected void btnSave_Click(object sender, EventArgs e) { Model.UserPipelineColumns userPipelineCols = UserPipelineColsManager.GetModel(CurrUser.iUserID); Model.UserHomePref userHomePref = UserHomePrefManager.GetModel(CurrUser.iUserID); try { if (null == userPipelineCols) { userPipelineCols = new Model.UserPipelineColumns(); userPipelineCols.UserId = CurrUser.iUserID; GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Add(userPipelineCols); } else { GetUserPipelineColumnsInfo(ref userPipelineCols); UserPipelineColsManager.Update(userPipelineCols); } if (null == userHomePref) { userHomePref = new Model.UserHomePref(); userHomePref.UserId = CurrUser.iUserID; //GetUserHomePrefInfo(ref userHomePref); userHomePref.DefaultLoansPipelineViewId = Convert.ToInt32(this.ddlDefaultLoansPV.SelectedValue); UserHomePrefManager.Add(userHomePref); } else { //GetUserHomePrefInfo(ref userHomePref); userHomePref.DefaultLoansPipelineViewId = Convert.ToInt32(this.ddlDefaultLoansPV.SelectedValue); UserHomePrefManager.Update(userHomePref); } ClientFun("sucsmsg", "alert('Saved!');"); } catch { } #region Point Fields var oldData = hidOldPointFieldID.Value.Trim(); // 旧的fieldid var data = hidData.Value.Trim(); //new list may be Contains old fieldID try { userLoansViewPointFieldsBLL.DeleteAllByUser(CurrUser.iUserID); if (string.IsNullOrEmpty(data)) { BindList(); return; } var list = data.Replace("pid=", "").Replace("heading=", "").Split(';').ToList(); //"pid=" + pid + ",heading=" + heading; foreach (string item in list) { var kv = item.Split(',').ToList(); if (kv.Count > 0) { Model.UserLoansViewPointFields model = new Model.UserLoansViewPointFields(); model.PointFieldId = Convert.ToInt32(kv.FirstOrDefault()); model.UserId = CurrUser.iUserID; userLoansViewPointFieldsBLL.Add(model); } } string msg = "Saved successfully."; PageCommon.WriteJsEnd(this, msg, PageCommon.Js_RefreshSelf); } catch (Exception ex) { string msg = "Error:" + ex.Message; PageCommon.WriteJsEnd(this, msg, PageCommon.Js_RefreshSelf); } #endregion }