Example #1
0
        public JsonResult InsertContactPerson(VendorViewModel vViewModel)
        {
            try
            {
                Set_Date_Session(vViewModel.ContactPerson);

                vViewModel.ContactPerson.ContactPersonId = _vRepo.InsertContactPerson(vViewModel.ContactPerson);

                vViewModel.ContactPerson.RefType = (int)ContactType.Vendor;

                vViewModel.FriendlyMessage.Add(MessageStore.Get("CP01"));

                Logger.Debug("Vendor Controller Insert ContactPerson");
            }
            catch (Exception ex)
            {
                vViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vendor Controller - Insert ContactPerson" + ex.Message);
            }

            return(Json(vViewModel));
        }