/// <summary> /// Load User Name /// </summary> private void LoadUserCombo() { UserVo userOutVo = null; try { userOutVo = (UserVo)DefaultCbmInvoker.Invoke(new GetUserMasterMntCbm(), new UserVo()); //userOutVo.UserListVo.ForEach(p => p.UserName = p.UserCode + " " + p.UserName); } catch (Framework.ApplicationException exception) { popUpMessage.ApplicationError(exception.GetMessageData(), Text); logger.Error(exception.GetMessageData()); } ComboBind(User_cmb, userOutVo.UserListVo, "UserName", "UserCode"); }
/// <summary> /// Create object on repository /// </summary> /// <param name="user"></param> /// <returns></returns> public TransactionResult create(UserVo user, int sistema) { TransactionResult user_tr = user_repository.create(UserAdapter.voToObject(user), sistema); if (user_tr == TransactionResult.CREATED) { return(authentication_repository.create(new AuthModel { rol = new Rol { id = user.rol }, user = user_repository.getUserByUserName(user.username, sistema), }, sistema)); } return(user_tr); }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); if (!IsPostBack) { userVo = (UserVo)Session[SessionContents.UserVo]; if (userVo.UserType == "Customer") { customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; } else { rmVo = (RMVo)Session[SessionContents.RmVo]; customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; rmId = rmVo.RMId; } userId = userVo.UserId; BindCustomerEQAlertGrid(); tblOccurrenceEdit.Visible = false; tblEQAlertGrid.Visible = true; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerEQAlerts.ascx:Page_Load()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void lnkReset_Click(object sender, EventArgs e) { Random r = new Random(); encryption = new OneWayEncryption(); bool isSuccess = false; LinkButton lnkOrderNo = (LinkButton)sender; GridDataItem gdi; gdi = (GridDataItem)lnkOrderNo.NamingContainer; int selectedRow = gdi.ItemIndex + 1; int userId = int.Parse((gvUserMgt.MasterTableView.DataKeyValues[selectedRow - 1]["UserId"].ToString())); userVo = userBo.GetUserDetails(userId); if (userVo != null) { string hassedPassword = string.Empty; string saltValue = string.Empty; string password = r.Next(20000, 100000).ToString(); //userVo = userBo.GetUserDetails(userId); string userName = userVo.FirstName + " " + userVo.MiddleName + " " + userVo.LastName; encryption.GetHashAndSaltString(password, out hassedPassword, out saltValue); userVo.Password = hassedPassword; userVo.PasswordSaltValue = saltValue; userVo.OriginalPassword = password; userVo.IsTempPassword = 1; isSuccess = userBo.UpdateUser(userVo); } if (isSuccess) { tblMessage.Visible = true; SuccessMsg.Visible = true; ErrorMessage.Visible = false; SuccessMsg.InnerText = "Password has been reset successfully..."; } else { tblMessage.Visible = true; SuccessMsg.Visible = false; ErrorMessage.Visible = true; ErrorMessage.InnerText = "An error occurred while reseting password."; } }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); userVo = (UserVo)Session["userVo"]; customerVo = (CustomerVo)Session["customerVo"];//SessionContents.CustomerVo; if (Session[SessionContents.PortfolioId] != null) { portfolioId = Int32.Parse(Session[SessionContents.PortfolioId].ToString()); } else { customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId); Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId; portfolioId = customerPortfolioVo.PortfolioId; } if (!IsPostBack) { ErrorMessage.Visible = false; BindPortfolioDropDown(); LoadGridview(portfolioId); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "ViewInsuranceDetails.ascx:Page_Load()"); object[] objects = new object[3]; objects[0] = userVo; objects[1] = customerVo; objects[2] = portfolioId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public bool UpdateUser(UserVo userVo) { bool bResult = false; Database db; DbCommand updateUserCmd; try { db = DatabaseFactory.CreateDatabase("wealtherp"); updateUserCmd = db.GetStoredProcCommand("SP_UpdateUser"); db.AddInParameter(updateUserCmd, "@U_UserId", DbType.Int32, userVo.UserId); db.AddInParameter(updateUserCmd, "@U_FirstName", DbType.String, userVo.FirstName); db.AddInParameter(updateUserCmd, "@U_LastName", DbType.String, userVo.LastName); db.AddInParameter(updateUserCmd, "@U_MiddleName", DbType.String, userVo.MiddleName); db.AddInParameter(updateUserCmd, "@U_Email", DbType.String, userVo.Email); db.AddInParameter(updateUserCmd, "@U_LoginId", DbType.String, userVo.LoginId); db.AddInParameter(updateUserCmd, "@U_Password", DbType.String, userVo.Password); db.AddInParameter(updateUserCmd, "@U_IsTempPassword", DbType.String, userVo.IsTempPassword); db.ExecuteNonQuery(updateUserCmd); bResult = true; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "UserDao.cs:updateUser()"); object[] objects = new object[1]; objects[0] = userVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(bResult); }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); advisorVo = (AdvisorVo)Session["advisorVo"]; userVo = (UserVo)Session["userVo"]; if (!IsPostBack) { trMf.Visible = false; trEquity.Visible = false; trHeader.Visible = false; trNote.Visible = false; trValuation.Visible = false; trSubmitButton.Visible = false; } }
/// <summary> /// Loads Process Work /// </summary> private void LoadMesUser() { UserVo outVo = new UserVo(); try { outVo = (UserVo)base.InvokeCbm(new GetUserMasterMntCbm(), new UserVo(), false); outVo.UserListVo.ForEach(u => u.UserName = u.UserCode + " " + u.UserName); } catch (Framework.ApplicationException exception) { popUpMessage.ApplicationError(exception.GetMessageData(), Text); logger.Error(exception.GetMessageData()); return; } ComboBind(UserName_cmb, outVo.UserListVo.OrderBy(u => u.UserName).ToList(), "UserName", "UserCode"); }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); rmVo = (RMVo)Session[SessionContents.RmVo]; txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); cvTransactionDate.ValueToCompare = DateTime.Now.ToShortDateString(); if (!IsPostBack && Session["EqTransactionHT"] == null) //Session["EqTransactionHT"] -> returning from trade account add. { BindLastTradeDate(); } RestorePreviousState(); }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["userVo"]; adviserVo = (AdvisorVo)Session["advisorVo"]; //if (Cache["IssueExtract" + userVo.UserId] != null) Cache.Remove("IssueExtract" + userVo.UserId); if (!IsPostBack) { if (Cache["IssueExtract" + userVo.UserId] != null) { Cache.Remove("IssueExtract" + userVo.UserId); } SetDownloadDate(); CheckForBusinessDate(); } }
/// <summary> /// Creates User Account for an Adviser /// </summary> /// <param name="advisorVo"></param> /// <param name="userId"></param> /// <param name="password"></param> /// <returns>bool result</returns> public bool CreateAdvisorUser(AdvisorVo advisorVo, int userId, string password) { bool bResult = false; UserVo userVo = new UserVo(); UserDao userDao = new UserDao(); AdvisorDao advisorDao = new AdvisorDao(); Random id = new Random(); try { userVo.Email = advisorVo.Email; userVo.FirstName = advisorVo.ContactPersonFirstName.ToString(); userVo.MiddleName = advisorVo.ContactPersonMiddleName.ToString(); userVo.LastName = advisorVo.ContactPersonMiddleName.ToString(); userVo.Password = id.Next(10000, 99999).ToString(); userVo.UserType = "Advisor"; userVo.UserId = userId; userDao.CreateUser(userVo); bResult = true; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorBo.cs:CreateAdvisorUser()"); object[] objects = new object[1]; objects[0] = advisorVo; objects[1] = userId; objects[2] = password; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(bResult); }
/// <summary> /// /// </summary> /// <param name="rmVo"></param> /// <param name="userId"></param> /// <param name="password"></param> /// <returns></returns> public bool CreateRMUser(RMVo rmVo, int userId, string password) { bool bResult = false; UserVo userVo = new UserVo(); UserDao userDao = new UserDao(); try { userVo.Email = rmVo.Email; userVo.LoginId = rmVo.Email; userVo.FirstName = rmVo.FirstName; userVo.LastName = rmVo.LastName; userVo.MiddleName = rmVo.MiddleName; userVo.Password = password.ToString(); userVo.UserId = userId; userVo.UserType = "RM"; userDao.CreateUser(userVo); bResult = true; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorStaffBo.cs:CreateRMUser()"); object[] objects = new object[3]; objects[0] = rmVo; objects[1] = userId; objects[2] = password; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(bResult); }
protected void btnSubmitReminder_Click(object sender, EventArgs e) { try { int reminderDays = int.Parse(txtReminderDays.Text.ToString()); customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; rmVo = (RMVo)Session[SessionContents.RmVo]; userVo = (UserVo)Session[SessionContents.UserVo]; accountId = int.Parse(Session["AccountId"].ToString()); fiNPId = int.Parse(Session["FINPId"].ToString()); eventType = Session["AlertType"].ToString(); if (eventType == "RDReminder") { alertsBo.SaveAdviserFDRecurringDepositReminderAlert(rmVo.RMId, customerVo.CustomerId, accountId, fiNPId, 0, reminderDays, userVo.UserId); } if (eventType == "FDMaturityReminder") { alertsBo.SaveAdviserFDMaturityReminderAlert(rmVo.RMId, customerVo.CustomerId, accountId, fiNPId, 0, reminderDays, userVo.UserId); } BindCustomerFIAlertGrid(); tblReminderEdit.Visible = false; tblFIAlertGrid.Visible = true; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerFIAlert.ascx:btnSubmitReminder_Click()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); advisorVo = (AdvisorVo)Session[SessionContents.AdvisorVo]; rmVo = (RMVo)Session[SessionContents.RmVo]; //txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); BindPortfolioTypeDropDown(); userId = userVo.UserId; if (!IsPostBack) { if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin" || Session[SessionContents.CurrentUserRole].ToString() == "Ops") { txtCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName"; } if (Request.QueryString["action"] == "EditCustomerPortfolio") { btnSave.Visible = false; portfolioId = int.Parse(Session["PortfolioId"].ToString()); dsPortfolioType = portfolioBo.GetCustomerPortfolioDetails(portfolioId); dtPortfolioType = dsPortfolioType.Tables[0]; txtCustomer.Text = dtPortfolioType.Rows[0]["C_FirstName"].ToString(); txtCustomerId.Value = dtPortfolioType.Rows[0]["C_CustomerId"].ToString(); txtPanCustomer.Text = dtPortfolioType.Rows[0]["C_PANNum"].ToString(); txtAddressCustomer.Text = dtPortfolioType.Rows[0]["C_Adr1Line1"].ToString(); txtPortfolioName.Text = dtPortfolioType.Rows[0]["CP_PortfolioName"].ToString(); txtPMSIdentifier.Text = dtPortfolioType.Rows[0]["CP_PMSIdentifier"].ToString(); ddlPortfolioType.SelectedValue = dtPortfolioType.Rows[0]["XPT_PortfolioTypeCode"].ToString(); btnSubmit.Text = "Update"; } } }
private void LoadItemsLevels(UserVo user, int level) { if (user.Users.Count != 0) { if (!_itemsLevels.ContainsKey(level)) { _itemsLevels.Add(level, new TreeBuilderLevelData { Count = 0 }); } _itemsLevels[level].Count += user.Users.Count; foreach (UserVo childUser in user.Users) { LoadItemsLevels(childUser, level + 1); } } }
protected void gvIFFUsers_RowCommand(object sender, GridViewCommandEventArgs e) { Random r = new Random(); bool isSuccess = false; if (e.CommandName == "resetPassword") { userVo = userBo.GetUserDetails(Convert.ToInt32(gvIFFUsers.DataKeys[int.Parse(e.CommandArgument.ToString())].Value)); if (userVo != null) { string hassedPassword = string.Empty; string saltValue = string.Empty; string password = r.Next(20000, 100000).ToString(); //userVo = userBo.GetUserDetails(userId); string userName = userVo.FirstName + " " + userVo.MiddleName + " " + userVo.LastName; encryption.GetHashAndSaltString(password, out hassedPassword, out saltValue); userVo.Password = hassedPassword; userVo.PasswordSaltValue = saltValue; userVo.OriginalPassword = password; userVo.IsTempPassword = 1; isSuccess = userBo.UpdateUser(userVo); } if (isSuccess) { tblMessage.Visible = true; //SuccessMsg.Visible = true; tblErrorMassage.Visible = false; //ErrorMessage.Visible = false; SuccessMsg.InnerText = "Password has been reset successfully..."; } else { //tblMessage.Visible = true; SuccessMsg.Visible = false; tblErrorMassage.Visible = true; //ErrorMessage.Visible = true; ErrorMessage.InnerText = "An error occurred while reseting password."; } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session[SessionContents.UserVo]; advisorVo = (AdvisorVo)Session["advisorVo"]; customerVo = (CustomerVo)Session["customerVo"]; adviserId = advisorVo.advisorId; customerId = customerVo.CustomerId; if (!IsPostBack) { //Session["CustId"] = "123456"; if (Request.QueryString["BondType"] != null) { ddlType.SelectedValue = "Curent"; BindStructureRuleGrid(GetType(ddlType.SelectedValue), Request.QueryString["BondType"]); ShowAvailableLimits(); } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); customerVo = (CustomerVo)Session["CustomerVo"]; userVo = (UserVo)Session["userVo"]; advisorVo = (AdvisorVo)Session["advisorVo"]; if (!Page.IsPostBack) { advisorId = advisorVo.advisorId; if (customerVo.IsActive == 1) { chkdeactivatecustomer.Checked = false; } else { chkdeactivatecustomer.Checked = true; } if (customerVo.AdviseNote != "") { txtComments.Text = customerVo.AdviseNote; } else { txtComments.Text = ""; } bindClassification(); if (!string.IsNullOrEmpty(customerVo.CustomerClassificationID.ToString())) { if (customerVo.CustomerClassificationID == 0) { ddlClassification.SelectedIndex = 0; } else { ddlClassification.SelectedValue = customerVo.CustomerClassificationID.ToString(); } } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnAddNewTranxEvent_Click(object sender, EventArgs e) { try { userVo = (UserVo)Session[SessionContents.UserVo]; customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; eventCode = Session[SessionContents.EventCode].ToString(); EventID = int.Parse(Session[SessionContents.EventID].ToString()); userId = userVo.UserId; customerId = customerVo.CustomerId; trAddNewTranxAlt.Visible = true; trTranxSave.Visible = true; trAddNewEvent.Visible = true; //string EventCode = string.Empty; // Get EventCode //EventCode = alertsBo.GetEventCode(Int32.Parse(ddlTranxAlertTypes.SelectedValue)); //BindSchemeDropDown(Int32.Parse(ddlTranxAlertTypes.SelectedValue), customerId, EventCode); BindSchemeDropDown(customerId, eventCode, EventID); trAddNewEvent.Visible = true; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerTransactionalAlertManagement.ascx:btnAddNewTranxEvent_Click()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { OnlineUserSessionBo.CheckSession(); advisorVo = (AdvisorVo)Session["advisorVo"]; customerVO = (CustomerVo)Session["customerVo"]; userVo = (UserVo)Session["userVo"]; customerId = customerVO.CustomerId; RadInformation.VisibleOnPageLoad = false; BindOrderStatus(); BindLink(); BindAmc(); BindLink(); // Session["PreviousPage"] = "yes"; // lbBack.Attributes.Add("onClick", "javascript:history.back(); return false;"); if (!Page.IsPostBack) { if (Request.QueryString["systematicId"] != null && Request.QueryString["AccountId"] != null && Request.QueryString["schemeplanCode"] != null && Request.QueryString["IsSourceAA"] != null && Request.QueryString["Amount"] != null && Request.QueryString["SIPStartDate"] != null) { systematicId = int.Parse(Request.QueryString["systematicId"].ToString()); AccountId = int.Parse(Request.QueryString["AccountId"].ToString()); schemeplanCode = int.Parse(Request.QueryString["schemeplanCode"].ToString()); IsSourceAA = int.Parse(Request.QueryString["IsSourceAA"].ToString()); amount = int.Parse(Request.QueryString["Amount"].ToString()); SIPStartDate = Convert.ToDateTime(Request.QueryString["SIPStartDate"].ToString()); BindGrid(); divConditional.Visible = false; } else { fromDate = DateTime.Now.AddMonths(-1); txtFrom.SelectedDate = fromDate.Date; txtTo.SelectedDate = DateTime.Now; // divConditional.Visible = false; } } else { fromDate = DateTime.Now.AddMonths(-1); txtFrom.SelectedDate = fromDate.Date; } }
protected void Page_Load(object sender, EventArgs e) { // Check Querystring to see if its an Edit/View/Entry if (Request.QueryString["action"] != null) { Manage = Request.QueryString["action"].ToString(); } if (!IsPostBack) { userVo = (UserVo)Session[SessionContents.UserVo]; customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; //customerAccountsVo = (CustomerAccountsVo)Session["customerAccountVo"]; if (Session["systematicSetupVo"] != null) { systematicSetupVo = (SystematicSetupVo)Session["systematicSetupVo"]; } path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); if (systematicSetupVo != null) { if (Manage == "edit") { SetControls("edit", systematicSetupVo, path); } else if (Manage == "view") { SetControls("view", systematicSetupVo, path); } else if (Manage == "entry") { SetControls("entry", systematicSetupVo, path); } } else { SetControls("entry", systematicSetupVo, path); } } }
protected void Page_Load(object sender, EventArgs e) { rmVo = (RMVo)Session[SessionContents.RmVo]; SessionBo.CheckSession(); advisorVo = (AdvisorVo)Session["advisorVo"]; userVo = (UserVo)Session["userVo"]; advisorVo = (AdvisorVo)Session[SessionContents.AdvisorVo]; //currentUserRole = Session[SessionContents.CurrentUserRole].ToString().ToLower(); associateuserheirarchyVo = (AssociatesUserHeirarchyVo)Session[SessionContents.AssociatesLogin_AssociatesHierarchy]; imgViewAssoList.Visible = true; if (Session[SessionContents.CurrentUserRole].ToString().ToLower() == "admin" || Session[SessionContents.CurrentUserRole].ToString().ToLower() == "ops") { userType = "advisor"; } else if (Session[SessionContents.CurrentUserRole].ToString().ToLower() == "bm") { userType = "bm"; } else if (Session[SessionContents.CurrentUserRole].ToString().ToLower() == "associates") { userType = "associates"; } else { userType = Session[SessionContents.CurrentUserRole].ToString().ToLower(); } if (!IsPostBack) { //associatesVo = (AssociatesVO)Session["associatesVo"]; if (Session[SessionContents.CurrentUserRole].ToString().ToLower() == "admin" || Session[SessionContents.CurrentUserRole].ToString().ToLower() == "ops" || Session[SessionContents.CurrentUserRole].ToString().ToLower() == "bm") { Agentcode = string.Empty; } else { Agentcode = associateuserheirarchyVo.AgentCode; } GetAdviserAssociateList(); } }
/// <summary> /// Used to create Parent Customer /// </summary> /// <param name="userVo"></param> /// <param name="rmVo"></param> /// <param name="createdById"></param> /// <returns></returns> protected int CreateCustomerForAddProspect(UserVo userVo, RMVo rmVo, int createdById) { customerVo = new CustomerVo(); List <int> customerIds = new List <int>(); customerVo.RmId = rmVo.RMId; customerVo.Type = "IND"; customerVo.FirstName = txtFirstName.Text.ToString(); customerVo.MiddleName = txtMiddleName.Text.ToString(); customerVo.LastName = txtLastName.Text.ToString(); userVo.FirstName = txtFirstName.Text.ToString(); userVo.MiddleName = txtMiddleName.Text.ToString(); userVo.LastName = txtLastName.Text.ToString(); customerVo.BranchId = int.Parse(ddlPickBranch.SelectedValue); if (dpDOB.SelectedDate != null) { customerVo.Dob = dpDOB.SelectedDate.Value; } customerVo.Email = txtEmail.Text; customerVo.IsProspect = 1; customerVo.IsFPClient = 1; Session[SessionContents.FPS_CustomerProspect_CustomerVo] = customerVo; userVo.Email = txtEmail.Text.ToString(); customerPortfolioVo.IsMainPortfolio = 1; customerPortfolioVo.PortfolioTypeCode = "RGL"; customerPortfolioVo.PortfolioName = "MyPortfolioUnmanaged"; customerIds = customerBo.CreateCompleteCustomer(customerVo, userVo, customerPortfolioVo, createdById); Session["Customer"] = "Customer"; Session[SessionContents.CustomerVo] = customerVo; Session["customerVo"] = customerVo; Session["CustomerVo"] = customerVo; if (customerIds != null) { CustomerFamilyVo familyVo = new CustomerFamilyVo(); CustomerFamilyBo familyBo = new CustomerFamilyBo(); familyVo.AssociateCustomerId = customerIds[1]; familyVo.CustomerId = customerIds[1]; familyVo.Relationship = "SELF"; familyBo.CreateCustomerFamily(familyVo, customerIds[1], userVo.UserId); } return(customerIds[1]); }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session[SessionContents.UserVo]; customerVO = (CustomerVo)Session["customerVo"]; if (Session["ExchangeMode"] != null) { exchangeType = Session["ExchangeMode"].ToString(); } else { exchangeType = "Online"; } if (exchangeType == "Demat") { ddlAction.Items.FindByValue("SIP").Enabled = false; ddlAction.Items.FindByValue("BSSIP").Enabled = true; ddlAction.Items.FindByValue("BXSIP").Enabled = true; //ddlAction.Items.FindByValue("ABY").Enabled = false; } else { ddlAction.Items.FindByValue("SIP").Enabled = true; ddlAction.Items.FindByValue("ABY").Enabled = true; ddlAction.Items.FindByValue("BSSIP").Enabled = false; ddlAction.Items.FindByValue("BXSIP").Enabled = false; } if (!IsPostBack) { if (exchangeType == "Online") { lblHeader.Text = "Order Book(Online)"; } else { lblHeader.Text = "Order Book(Exchange)"; } BindAmc(); BindScheme(); } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["userVo"]; rmVo = advisorStaffBo.GetAdvisorStaff(userVo.UserId); Session["rmVo"] = rmVo; branchId = advisorBranchBo.GetBranchId(rmVo.RMId); adviserVo = (AdvisorVo)Session["advisorVo"]; if (branchId != 0 || adviserVo.MultiBranch == 0) { lnkAdd.Visible = false; lbl.Visible = false; Session["advisorBranchVo"] = advisorBranchBo.GetBranch(branchId); } else { lnkAdd.Visible = true; lbl.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session[SessionContents.UserVo]; advisorVo = (AdvisorVo)Session["advisorVo"]; int adviserId = advisorVo.advisorId; if (Session["OnlineSchemeSetupSchemecode"] != null) { ViewState["OnlineSchemeSetupSchemecode"] = Session["OnlineSchemeSetupSchemecode"]; btnGo_Click(sender, e); Session["OnlineSchemeSetupSchemecode"] = null; } if (!IsPostBack) { BindAMC(); BindSchemeCategory(); btnExportFilteredData.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { UserVo userVo = (UserVo)Session[SessionContents.UserVo]; SessionBo.CheckSession(); if (!IsPostBack) { if (Request.QueryString["processId"] != null) { processId = Int32.Parse(Request.QueryString["processId"].ToString()); } else { processId = 0; } bindEQInputGrid(); } //gvEquityInputRejects_Init(sender, e); }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; rmVo = advisorStaffBo.GetAdvisorStaff(userVo.UserId); Session["rmVo"] = rmVo; bmBranchId = advisorBranchBo.GetBranchId(rmVo.RMId); if (bmBranchId == 0) { } else { advisorBranchVo = advisorBranchBo.GetBranch(bmBranchId); Session["advisorBranchVo"] = advisorBranchVo; } if (!IsPostBack) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadtopmenu('AdvisorRMBMLeftpane');", true); } }
/// <summary> /// Add a role to this user /// </summary> /// <param name="user">The user to whom to add roles</param> /// <param name="role">The role to add</param> public void AddRoleToUser(UserVo user, RoleEnum role) { bool result = false; if (!DoesUserHaveRole(user, role)) { for (int i = 0; i < Roles.Count; i++) { if (Roles[i].Username == user.Username) { ObservableCollection <RoleEnum> userRoles = Roles[i].Roles as ObservableCollection <RoleEnum>; userRoles.Add(role); result = true; break; } } } SendNotification(ApplicationFacade.ADD_ROLE_RESULT, result); }
/// <summary> /// For setting selected user record into respective controls(textbox and combobox) for update operation /// passing selected user data as parameter /// </summary> /// <param name="userInVo"></param> private void LoadUserData(UserVo userInVo) { if (userInVo != null) { UserCode_txt.Text = userInVo.UserCode; UserName_txt.Text = userInVo.UserName; if (!string.IsNullOrEmpty(userInVo.PassWord)) { Password_txt.Text = encryptDecrypt.Decrypt(userInVo.PassWord); } Country_cmb.SelectedValue = userInVo.LocaleId; //Language_cmb.SelectedValue = userInVo.Language; FactoryCode_cmb.SelectedValue = userInVo.RegistrationFactoryCode; if (userInVo.MultiLoginFlag.Equals("1")) { MultiLogin_chk.Checked = true; } } }
public static UserVo GetUsersTree() { var rootUser = new UserVo { Name = "George Washington", Description = "Born in 1732 into a Virginia planter family, he learned the morals, manners, and body of knowledge requisite for an 18th century Virginia gentleman.", ImageUrl = "/images/george-washington.jpg" }; var leafUser1 = new UserVo { Name = "John Adams", Description = "His administration focused on France, where the Directory, the ruling group, had refused to receive the American envoy and had suspended commercial relations.", ImageUrl = "/images/john-adams.jpg" }; rootUser.Users.Add(leafUser1); var leafUser2 = new UserVo { Name = "Thomas Jefferson", Description = "In the thick of party conflict in 1800, Thomas Jefferson wrote in a private letter, \"I have sworn upon the altar of God eternal hostility against every form of tyranny over the mind of man.\"", ImageUrl = "/images/thomas-jefferson.jpg" }; rootUser.Users.Add(leafUser2); var subLeafUser1 = new UserVo { Name = "James Madison", Description = "When delegates to the Constitutional Convention assembled at Philadelphia, the 36-year-old Madison took frequent and emphatic part in the debates.", ImageUrl = "/images/james-madison.jpg" }; leafUser1.Users.Add(subLeafUser1); var subLeafUser2 = new UserVo { Name = "James Monroe", Description = "Born in Westmoreland County, Virginia, in 1758, Monroe attended the College of William and Mary, fought with distinction in the Continental Army, and practiced law in Fredericksburg, Virginia.", ImageUrl = "/images/james-monroe.jpg" }; leafUser1.Users.Add(subLeafUser2); var subLeafUser3 = new UserVo { Name = "Andrew Jackson", Description = "More nearly than any of his predecessors, Andrew Jackson was elected by popular vote; as President he sought to act as the direct representative of the common man.", ImageUrl = "/images/andrew-jackson.jpg" }; leafUser2.Users.Add(subLeafUser3); var subLeafUser4 = new UserVo { Name = "Franklin Pierce", Description = "Probably because the Democrats stood more firmly for the Compromise than the Whigs, and because Whig candidate Gen. Winfield Scott was suspect in the South, Pierce won with a narrow margin of popular votes.", ImageUrl = "/images/franklin-pierce.jpg" }; leafUser2.Users.Add(subLeafUser4); return rootUser; }
/** * 登录 * (一): 登陆:LoginAction 参数:1:UserName 用户名 2:PassWaorld 密码(md5加密) 3:MacAddress 用户的mac地址 4:IPAddress 用户的ip地址(若服务器应该可以获取用户的ip地址,如果可以就 不需要传输) 返回:1:Result 结果(0表示成功,其他均是错误码, -1:用户异地登陆,须管理员先注销上次登陆ip,-2:Token不正确 1:没有该用户,2:用户名错误) 2:Token 用户的seeion标示符 3:Money 如果上次用户还有钱没结算,吧剩余钱返回,否则为0即可 * */ public void LoginAction(string userName,string passWorld,Action<object,object> callBack) { PopMaskMaskManager.show (0.5f); Dictionary<string,object> param = new Dictionary<string,object>(); //param.Add("Action","LoginAction"); param.Add("username",userName); param.Add("password",passWorld);//Util.getMD5CodeByString(passWorld)); string ip = Util.getUserIp ()+""; param.Add("macAddress",ip); param.Add("ipAddress",ip); //PopMessageManager.show (); //Echo.Log("mac:" + Util.getUserIp()); //Echo.Log("passworld:" + Util.getMD5CodeByString(passWorld)); /** //测试Func委托 Func<Dictionary<string,string>, bool> fun; fun = (Dictionary<string,string> data) => { int result = System.Convert.ToInt32( data["Result"] ); if(result == Config.successCode){ if(callBack != null ) callBack(); } return false; }; **/ //测试Action委托 Action<object,object> actionFun; actionFun = (object data,object str) => { userVo = (UserVo)data; int result = userVo.result;//System.Convert.ToInt32( data["Result"] ); PopMaskMaskManager.hide(); if(result == Config.CODE_SUCCESS){ userVo.nickName = "张三"; userVo.userName = userName; PlayerPrefs.SetString("userName",userVo.userName); PlayerPrefs.SetString("nickName",userVo.nickName); if(callBack != null ) callBack(result,str); }else if(result == 1){ PopMessageManager.show("username is error"); }else if(result == 2){ PopMessageManager.show("password is error"); } }; HttpLoadManager.getInstance.json<UserVo>("api/v1/login",actionFun,param); }