Ejemplo n.º 1
0
        private void LoadCustomerDetails(int?Customerid)
        {
            //if (customerService.SessionInfo == null)
            //{
            int id = 0;

            if (Customerid == null)
            {
                id = customerService.SessionInfo.CustomerId;
            }
            else
            {
                id = Customerid.Value;
            }
            var model = new Customer_InfoModel {
                CustomerId = id
            };

            CustomerModel = customerService.GetCustomerInfo(id);

            // CustomerService.SessionInfo.CustomerDetails.InjectFrom(CustomerModel);
            customerService.SessionInfo.InjectFrom(CustomerModel);

            customerService.SessionInfo.CustomerId = id;
            //}
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update customer info
 /// </summary>
 /// <param name="model"></param>
 public void UpdateCustomerInfo(Customer_InfoModel model)
 {
     // write data into the database
     Log.File.Info(Msg.GenerateLogMsg("Update customer info...", model));
     model.Postcode = model.Country == DefaultValues.IrelandCountryCode ? DefaultValues.IrelandCountryCode : model.Postcode;
     Repository.UpdateCustomerInfo(model);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Updates customer information
        /// </summary>
        /// <param name="updateCommand">Represent update command parameters</param>
        public void UpdateCustomerInfo(Customer_InfoModel customerinfo)
        {
            Execute("UpdateCustomerInfo",
                    new
            {
                CustomerId = customerinfo.CustomerId,
                FirstName  = customerinfo.Forename,
                Surname    = customerinfo.Surname,
                Address1   = customerinfo.Addr1,
                Address2   = customerinfo.Addr2,
                Address3   = customerinfo.Addr3,
                County     = customerinfo.County,
                Country    = customerinfo.Country,
                PostCode   = customerinfo.Postcode,
                Town       = customerinfo.Town
                             // Customer_nosurvey = customerinfo.Customer_NoSurvey
            }

                    , CommandType.StoredProcedure);
        }