Beispiel #1
0
        public long AddNewRule(Oasis.Models.AddNewRuleModel model)
        {
            if (ModelState.IsValid)
            {
                    var id = demoHelper.rules.OrderBy(r => r.Id).Last().Id + 1;
                    var emailParsingRule = new Model.EmailParsingRulesModels
                    {
                        Id = id,
                        Name = HttpUtility.HtmlEncode(model.RuleName),
                        AuthorId_Id = demoHelper.userId,
                        Status = Model.Enums.RuleStatusEnums.Active.ToString(),
                        IsUpdatingRule = model.ForIsUpdating
                    };
                    demoHelper.rules.Add(emailParsingRule);

                    return emailParsingRule.Id;
            }
            return 0;
        }
Beispiel #2
0
 partial void DeleteEmailParsingRulesModels(EmailParsingRulesModels instance);
Beispiel #3
0
 partial void InsertEmailParsingRulesModels(EmailParsingRulesModels instance);
Beispiel #4
0
 partial void UpdateEmailParsingRulesModels(EmailParsingRulesModels instance);
Beispiel #5
0
		private void detach_EmailParsingRulesModels(EmailParsingRulesModels entity)
		{
			this.SendPropertyChanging();
			entity.AspNetUsers = null;
		}