Пример #1
0
        //private AppDbContext db;// = new AppDbContext();
        #endregion
        #region EmailPhone
        /// <summary>
        /// Inserts a new row in the MdmDQQue table.
        /// </summary>
        /// <param name="mdmque">A MdmDQQue object.</param>
        /// <returns>An updated MdmDQQue object.</returns>
        public EmailPhone InsertEmailPhone(EmailPhone mdmdque)
        {
            using (var db = new AppDbContext())
            {
                db.Set <EmailPhone>().Add(mdmdque);
                db.SaveChanges();

                return(mdmdque);
            }
        }
Пример #2
0
        /// <summary>
        /// Updates the queitem
        /// </summary>
        /// <param name="queitem">queitem</param>
        public virtual void UpdateEmailPhone(EmailPhone queitem)
        {
            if (queitem == null)
            {
                throw new ArgumentNullException("queitem");
            }

            _emailPhoneDAC.UpdateEmailPhone(queitem);

            //event notification
            //_eventPublisher.EntityUpdated(vendor);
        }
Пример #3
0
        /// <summary>
        /// Updates an existing row in the mdmdque table.
        /// </summary>
        /// <param name="mdmdque">A mdmdque entity object.</param>
        public void UpdateEmailPhone(EmailPhone mdmdque)
        {
            using (var db = new AppDbContext())
            {
                var entry = db.Entry <EmailPhone>(mdmdque);

                // Re-attach the entity.
                entry.State = EntityState.Modified;

                db.SaveChanges();
            }
        }
Пример #4
0
        public virtual ActionResult ExportExcelAll(EmailPhone model)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(AccessDeniedView());
            }
            var items = _dqQueService.GetAllEmailPhones(model.ORGKEY, model.ACCOUNT_NO, model.PREFERREDPHONE, model.EMAIL, model.CUST_FIRST_NAME, model.CUST_MIDDLE_NAME, model.CUST_LAST_NAME);

            try
            {
                byte[] bytes = _exportManager.ExportDocumentsToXlsx(items);
                identity = ((CustomPrincipal)User).CustomIdentity;
                _messagingService.SaveUserActivity(identity.ProfileId, "Downloaded Multiple Customers with Same Email Phone Report", DateTime.Now);
                return(File(bytes, MimeTypes.TextXlsx, "emailPhone.xlsx"));
            }
            catch (Exception exc)
            {
                ErrorNotification(exc);
                return(RedirectToAction("List"));
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (DealerBtn != null)
            {
                DealerBtn.Dispose();
                DealerBtn = null;
            }

            if (DealerCodeTxt != null)
            {
                DealerCodeTxt.Dispose();
                DealerCodeTxt = null;
            }

            if (DealerContainer != null)
            {
                DealerContainer.Dispose();
                DealerContainer = null;
            }

            if (DealerGetStartBtn != null)
            {
                DealerGetStartBtn.Dispose();
                DealerGetStartBtn = null;
            }

            if (EmailPhone != null)
            {
                EmailPhone.Dispose();
                EmailPhone = null;
            }

            if (EmailRadioBtn != null)
            {
                EmailRadioBtn.Dispose();
                EmailRadioBtn = null;
            }

            if (GetStartBtn != null)
            {
                GetStartBtn.Dispose();
                GetStartBtn = null;
            }

            if (GuestBtn != null)
            {
                GuestBtn.Dispose();
                GuestBtn = null;
            }

            if (GuestContainer != null)
            {
                GuestContainer.Dispose();
                GuestContainer = null;
            }

            if (InitialContainer != null)
            {
                InitialContainer.Dispose();
                InitialContainer = null;
            }

            if (LastNameTxt != null)
            {
                LastNameTxt.Dispose();
                LastNameTxt = null;
            }

            if (LoginGirlImg != null)
            {
                LoginGirlImg.Dispose();
                LoginGirlImg = null;
            }

            if (OverLayView != null)
            {
                OverLayView.Dispose();
                OverLayView = null;
            }

            if (PhoneRadioBtn != null)
            {
                PhoneRadioBtn.Dispose();
                PhoneRadioBtn = null;
            }

            if (scrollview != null)
            {
                scrollview.Dispose();
                scrollview = null;
            }

            if (txtZip != null)
            {
                txtZip.Dispose();
                txtZip = null;
            }
        }
Пример #6
0
        public override void ViewDidLoad()
        {
            updateInternetStatus();
            Reachability.ReachabilityChanged += (object sender, EventArgs e) => {
                updateInternetStatus();
            };

            // hide keyboard on touch outside area
            var g = new UITapGestureRecognizer(() => View.EndEditing(true));

            g.CancelsTouchesInView = false; //for iOS5
            View.AddGestureRecognizer(g);



            InitialContainer.Hidden = false;
            GuestContainer.Hidden   = true;
            DealerContainer.Hidden  = true;

            EmailRadioBtn.SetBackgroundImage(UIImage.FromBundle("circular_filled.png"), UIControlState.Normal);
            PhoneRadioBtn.SetBackgroundImage(UIImage.FromBundle("circular_empty.png"), UIControlState.Normal);

            EmailPhone.Placeholder = "Email";
            IsEmail = true;

            LastNameTxt.Text = Regex.Replace(LastNameTxt.Text, @"[^a-zA-Z]+", "");
            LastNameTxt.ShouldChangeCharacters = (UITextField txt, NSRange range, string oopsTxt) =>
            {
                var newLength = txt.Text.Length + oopsTxt.Length - range.Length;
                return(newLength <= 50);
            };


            txtZip.ShouldChangeCharacters = (textField, range, replacementString) => {
                txtZip.Text = Regex.Replace(textField.Text, @"[^0-9]+", "");
                var newLength = textField.Text.Length + replacementString.Length - range.Length;
                return(newLength <= 5);
            };



            DealerCodeTxt.ShouldChangeCharacters = (textField, range, replacementString) => {
                DealerCodeTxt.Text = Regex.Replace(textField.Text, @"[^0-9]+", "");
                var newLength = textField.Text.Length + replacementString.Length - range.Length;
                return(newLength <= 6);
            };


            if (UserInterfaceIdiomIsPhone)
            {
                Console.WriteLine("width :: " + this.View.Bounds.Width + " Height :: " + this.View.Bounds.Height);
                // iphone 8 plus :: width :: 414 Height :: 736
                // iphone 7 width :: 375 Height :: 667

                //if (this.View.Bounds.Width == 375)
                //{
                //    boxImg.Frame = new CGRect(0, 0, 500, 500);
                //}
                //else
                //{
                //    boxImg.Frame = new CGRect(0, 0, 550, 550);
                //}

                //if (this.View.Bounds.Height == 667)
                //{
                //    boxImg.Center = new CGPoint(this.View.Bounds.Width / 2, this.View.Bounds.Height / 1.5);
                //    ComponentView.Center = new CGPoint(this.View.Bounds.Width / 2, this.View.Bounds.Height / 1.5);
                //}
                //else
                //{
                //    boxImg.Center = new CGPoint(this.View.Bounds.Width / 2, this.View.Bounds.Height / 2);
                //    ComponentView.Center = new CGPoint(this.View.Bounds.Width / 2, this.View.Bounds.Height / 2.2);
                //}

                if (this.View.Bounds.Width == 375)
                {
                    NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, keyboardWillHide);
                    NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, keyboardWillShow);
                }
            }
            else
            {
                if (InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight)
                {
                    NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, keyboardWillHide);
                    NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, keyboardWillShow);
                }
            }

            AppDelegate.appDelegate.IsZipCodeValid = false;

            storeLocatorModel = new StoreLocatorModel();

            AppDelegate.appDelegate.IsInfoSaved         = false;
            AppDelegate.appDelegate.IsFactorySaved      = false;
            AppDelegate.appDelegate.IsAftermarketSaved  = false;
            AppDelegate.appDelegate.IsHistorySaved      = false;
            AppDelegate.appDelegate.IsReconditionsSaved = false;
            AppDelegate.appDelegate.IsPhotosSaved       = false;
            AppDelegate.appDelegate.IsAllDataSaved      = false;

            LastNameTxt.ShouldReturn = (tf) =>
            {
                LastNameTxt.ReturnKeyType = UIReturnKeyType.Next;
                EmailPhone.BecomeFirstResponder();
                return(true);
            };
            EmailPhone.ShouldReturn = (tf) =>
            {
                EmailPhone.ReturnKeyType = UIReturnKeyType.Next;
                txtZip.BecomeFirstResponder();
                return(true);
            };

            txtZip.ShouldReturn = (tf) =>
            {
                txtZip.EndEditing(true);
                txtZip.ReturnKeyType = UIReturnKeyType.Go;
                GoClick();
                return(true);
            };

            DealerCodeTxt.ShouldReturn = (tf) =>
            {
                DealerCodeTxt.EndEditing(true);
                DealerCodeTxt.ReturnKeyType = UIReturnKeyType.Go;
                DealerClicked();
                return(true);
            };
        }