Example #1
0
        public async void TryUpdateMsisdn(DirectDatabaseBase database, string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return;
            }

            if (!string.IsNullOrEmpty(this.msisdn) && this.msisdn.Equals(input))
            {
                return;
            }

            if (!string.IsNullOrEmpty(this.msisdn))
            {
                var history = new LeadHistoryDM(database)
                {
                    leadid    = this.ID.Value,
                    name      = "msisdn",
                    old_value = this.msisdn,
                    new_value = input
                };
                await history.InsertAsync();
            }
            this.msisdn = input;
        }
Example #2
0
        public async void TryUpdateFirstName(DirectDatabaseBase database, string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return;
            }

            if (!string.IsNullOrEmpty(this.first_name) && this.first_name.Equals(input))
            {
                return;
            }

            if (!string.IsNullOrEmpty(this.first_name))
            {
                var history = new LeadHistoryDM(database)
                {
                    leadid    = this.ID.Value,
                    name      = "first_name",
                    old_value = this.first_name,
                    new_value = input
                };
                await history.InsertAsync();
            }
            this.first_name = input;
        }