protected void Page_Load(object sender, EventArgs e) { DataAccess.T_User user = new lemett_aBugTrack.DataAccess.T_User() { email = "*****@*****.**", firstname = "toto", name = "titi", password = "******", phone = "023565", }; BusinessManagement.User.CreateUser(user); user = BusinessManagement.User.GetUser(1); user.password = "******"; BusinessManagement.User.UpdateUser(user); T_Project project = new T_Project() { name = "APM", startDate = DateTime.Now, version = "0.0.1" }; BusinessManagement.Project.CreateProject(project); project = BusinessManagement.Project.GetProject(1); project.version = "0.0.2"; BusinessManagement.Project.UpdateProject(project); T_BugCritic bugCritic = new T_BugCritic() { CreateDate = DateTime.Now, Description = "bug critic", title = "plantage grave", }; BusinessManagement.Bug.CreateBugCritic(bugCritic, project.id); T_Bug bug = BusinessManagement.Bug.GetBug(1); T_Transaction trans = new T_Transaction() { statut = (int)DBO.EnumStatut.Accepted, }; BusinessManagement.Transaction.CreateTransaction(trans, bug.id, user.id); T_Comment comment = new T_Comment() { details = "voir msdn", }; BusinessManagement.Comment.CreateComment(comment, user.id, bug.id); comment = BusinessManagement.Comment.GetComment(1); comment.details = "ou microsoft"; BusinessManagement.Comment.UpdateComment(comment); BusinessManagement.GenerateDocx.GenerateReportBug(1); BusinessManagement.Comment.DeleteComment(comment.id); BusinessManagement.Transaction.DeleteTransaction(trans.id); BusinessManagement.Bug.DeleteBug(bug.id); BusinessManagement.Project.DeleteProject(project.id); BusinessManagement.User.DeleteUser(user.id); }
/// <summary> /// permet la création d'un bug critic /// </summary> /// <param name="bug">l'objet bug à crer</param> /// <returns>true si tout se passe bien sinon false</returns> public static bool CreateBugCritic(T_BugCritic bug, long idProject) { bug.CreateDate = DateTime.Now; return DataAccess.Bug.CreateBug(bug,idProject); }
/// <summary> /// Create a new T_BugCritic object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="title">Initial value of the title property.</param> /// <param name="createDate">Initial value of the CreateDate property.</param> public static T_BugCritic CreateT_BugCritic(global::System.Int64 id, global::System.String title, global::System.DateTime createDate) { T_BugCritic t_BugCritic = new T_BugCritic(); t_BugCritic.id = id; t_BugCritic.title = title; t_BugCritic.CreateDate = createDate; return t_BugCritic; }