public override void CreateProject(out int id, string name, string domain, string clientName, string contactEmail, string contactName, string contactPhone,string createBy, SEOToolSet.Entities.Account account) { //using (var tran = new TransactionScope(_connName)) //{ var ds = DSMySqlProject.Create(_connName); var ce = new Project(); if (domain != null) ce.Domain = domain; if (name != null) ce.Name = name; if (clientName != null) ce.ClientName = clientName; if (contactEmail != null) ce.ContactEmail = contactEmail; if (contactName != null) ce.ContactName = contactName; if (contactPhone != null) ce.ContactPhone = contactPhone; ce.Enabled = true; //TODO: Check if we require to throw an exception if Account is null if (account != null) ce.Account = account; //TODO:Save createby field if (createBy != null) { ce.CreatedBy = createBy; } ds.Insert(ce); //tran.Commit(); id = ce.Id; //} }
public override void CreateKeywordList(out int id, string name, SEOToolSet.Entities.Project project) { throw new NotImplementedException(); }
public override void AddUserToProject(out int id, string username, string projectRole, SEOToolSet.Entities.Project project) { throw new NotImplementedException(); }
public override void CreateKeyword(out int id, string keyword, SEOToolSet.Entities.KeywordList keywordList) { throw new NotImplementedException(); }
public override void UpdateProject(int id, string name, string domain, string clientName, string contactEmail, string contactName, string contactPhone, bool? enabled,string updateBy, SEOToolSet.Entities.Account account) { var ds = DSMySqlProject.Create(_connName); var ce = new Project(); ce.Id = id; if (domain != null) ce.Domain = domain; if (name != null) ce.Name = name; if (clientName != null) ce.ClientName = clientName; if (contactEmail != null) ce.ContactEmail = contactEmail; if (contactName != null) ce.ContactName = contactName; if (contactPhone != null) ce.ContactPhone = contactPhone; if (enabled.HasValue) { ce.Enabled = enabled; } //TODO: Check if we require to throw an exception if Account is null if (account != null) ce.Account = account; //TODO:Save createby field if (updateBy != null) { ce.UpdatedBy = updateBy; } ds.Update(ce); //tran.Commit(); }
public override void AddCompetitor(out int id, string name, string url, string description, SEOToolSet.Entities.Project project) { throw new NotImplementedException(); }
public override SEOToolSet.Entities.ProjectUser GetProjectUser(string userName, SEOToolSet.Entities.Project project) { throw new NotImplementedException(); }
public override void RemoveUserFromProject(string username, SEOToolSet.Entities.Project project) { throw new NotImplementedException(); }
public override IList<SEOToolSet.Entities.Project> GetProjectsForUserWithinAccount(string userName, SEOToolSet.Entities.Account accountId, bool? includeInactive) { var ds = DSMySqlProject.Create(_connName); return ds.FindByUserAndAccount(userName,accountId,includeInactive); }
public override IList<SEOToolSet.Entities.Project> GetProjectsByAccount(SEOToolSet.Entities.Account account, bool? includeInactive, int PageSize, int CurrentPage, out int Count) { throw new NotImplementedException(); }
public override IList<SEOToolSet.Entities.Project> GetProjectsByAccount(SEOToolSet.Entities.Account account, bool? includeInactive) { return new List<SEOToolSet.Entities.Project>(); }
public override string GetProjectRoleForUser(string userName, SEOToolSet.Entities.Project project) { return "ProjectAdmin"; }
public override IList<SEOToolSet.Entities.Project> FindProjects(SEOToolSet.Entities.Account account, bool? includeInactive, string name, string domain, string clientName, int PageSize, int CurrentPage, out int Count) { throw new NotImplementedException(); }