public TechniqueDetailsPage(TechniqueModel tech) { BindingContext = this; TechModel = tech; IsRunning = false; InitializeComponent(); }
public bool Create(TechniqueModel model, string userId) { var Technique = new MstTechnique { Code = model.Code.Trim(), Name = model.Name.Trim(), NameKana = model.NameKana.Trim(), InsertUserId = userId, IsDeleted = false, InsertDate = DateTime.Now }; Add(Technique); return(true); }
public bool Update(TechniqueModel model, string userId) { var technique = _context.MstTechniques.Find(model.Cd); if (!string.IsNullOrEmpty(technique.Code)) { technique.Code = model.Code.Trim(); } technique.Name = model.Name.Trim(); technique.NameKana = model.NameKana.Trim(); technique.UpdateDate = DateTime.Now; technique.UpdateUserId = userId; Update(technique); return(true); }
public bool IsDuplicate(TechniqueModel model) { return(_context.MstTechniques.Any(t => t.Code.ToLower().Equals(model.Code.ToLower().Trim()) && (model.Cd == 0 || t.Cd != model.Cd))); }