예제 #1
0
        private void CustomerGroupAssociation()
        {
            foreach (GridViewRow gvr in this.gvCustomers.Rows)
            {
                if (((CheckBox)gvr.FindControl("chkId")).Checked == true)
                {
                    customerFamilyVo.CustomerId = customerVo.CustomerId;
                    //   customerFamilyVo.AssociateCustomerId = int.Parse(gvCustomers.DataKeys[gvr.RowIndex].Value.ToString());
                    customerFamilyVo.AssociateCustomerId = int.Parse(gvCustomers.DataKeys[gvr.RowIndex].Values["CustomerId"].ToString());
                    customerFamilyVo.Relationship        = ddlRelationship.SelectedItem.Value.ToString();
                    customerFamilyVo.AssociationId       = int.Parse(gvCustomers.DataKeys[gvr.RowIndex].Values["AssociationId"].ToString());

                    customerFamilyBo.UpdateCustomerAssociate(customerFamilyVo, customerVo.CustomerId, userVo.UserId);
                    //customerFamilyBo.CreateCustomerFamily(customerFamilyVo, customerFamilyVo.CustomerId, userVo.UserId);
                }
            }
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewCustomerFamily','none');", true);
        }
예제 #2
0
 /// <summary>
 /// Used to update Child Customers
 /// </summary>
 /// <param name="customerId"></param>
 /// <param name="drChildCustomer"></param>
 protected void UpdateCustomerForAddProspect(int customerId, DataRow drChildCustomer)
 {
     customerVo            = new CustomerVo();
     customerVo.CustomerId = int.Parse(drChildCustomer["C_CustomerId"].ToString());
     customerVo.RmId       = rmVo.RMId;
     customerVo.Type       = "IND";
     customerVo.FirstName  = drChildCustomer["FirstName"].ToString();
     customerVo.MiddleName = drChildCustomer["MiddleName"].ToString();
     customerVo.LastName   = drChildCustomer["LastName"].ToString();
     customerVo.BranchId   = int.Parse(ddlPickBranch.SelectedValue);
     if (dpDOB.SelectedDate != null && drChildCustomer["DOB"].ToString() != null && drChildCustomer["DOB"].ToString() != string.Empty)
     {
         customerVo.Dob = DateTime.Parse(drChildCustomer["DOB"].ToString());
     }
     customerVo.IsProspect = 1;
     customerVo.IsFPClient = 1;
     customerVo.Email      = drChildCustomer["EmailId"].ToString();
     customerPortfolioVo.IsMainPortfolio   = 1;
     customerPortfolioVo.PortfolioTypeCode = "RGL";
     customerPortfolioVo.PortfolioName     = "MyPortfolioUnmanaged";
     customerBo.UpdateCustomer(customerVo);
     Session["Customer"] = "Customer";
     if (drChildCustomer["C_CustomerId"] != null)
     {
         if (int.Parse(drChildCustomer["C_CustomerId"].ToString()) != 0)
         {
             CustomerFamilyVo familyVo = new CustomerFamilyVo();
             CustomerFamilyBo familyBo = new CustomerFamilyBo();
             familyVo.AssociationId       = int.Parse(drChildCustomer["CA_AssociationId"].ToString());
             familyVo.AssociateCustomerId = int.Parse(drChildCustomer["C_CustomerId"].ToString());
             familyVo.CustomerId          = customerId;
             familyVo.Relationship        = drChildCustomer["CustomerRelationship"].ToString();
             familyBo.UpdateCustomerAssociate(familyVo, customerId, 0);
         }
     }
     //Session[SessionContents.CustomerVo] = customerVo;
     //Session["customerVo"] = customerVo;
     //Session["CustomerVo"] = customerVo;
 }