Example #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;
        }
Example #2
0
 partial void DeleteEmailParsingRulesModels(EmailParsingRulesModels instance);
Example #3
0
 partial void InsertEmailParsingRulesModels(EmailParsingRulesModels instance);
Example #4
0
 partial void UpdateEmailParsingRulesModels(EmailParsingRulesModels instance);
Example #5
0
		private void detach_EmailParsingRulesModels(EmailParsingRulesModels entity)
		{
			this.SendPropertyChanging();
			entity.AspNetUsers = null;
		}