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