private void XMLGenerate_SAPInsert(ProductGroupViewModels model)
        {
            try
            {
                ApplicationUser currentUser = ApplicationUserManager.GetApplicationUser(User.Identity.Name, HttpContext.GetOwinContext());

                //unique id generation
                Guid   GuidRandomNo = Guid.NewGuid();
                string UniqueID     = GuidRandomNo.ToString();

                //fill view model
                Viewmodel_AddProductGroup xmlAddProductGroup = new Viewmodel_AddProductGroup();
                xmlAddProductGroup.UniqueID          = UniqueID.ToString();
                xmlAddProductGroup.Productgroup_Name = model.ProductGroup.Product_Group_Name;
                xmlAddProductGroup.CreatedUser       = currentUser.Id.ToString();
                xmlAddProductGroup.CreatedBranch     = currentUser.Created_Branch_Id.ToString();
                xmlAddProductGroup.CreatedDateTime   = DateTime.Now.ToString();

                //generate xml
                productgroupRepository.GenerateXML(xmlAddProductGroup, UniqueID);
            }
            catch (Exception ex)
            {
                ExceptionHandler.LogException(ex);
                ViewBag.AppErrorMessage = ex.Message;
            }
        }