public void CreateIssue(CreateIssueEntity createIssueEntity) { SqlCommand command = new SqlCommand(); DataTable dtUserMaster = new DataTable(); using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); command.CommandText = "Sp_CreateIssue"; command.Connection = connection; command.CommandType = CommandType.StoredProcedure; SqlParameter sqlProjectName = new SqlParameter("@ProjectName", SqlDbType.VarChar); sqlProjectName.Value = createIssueEntity.ProjectName; command.Parameters.Add(sqlProjectName); SqlParameter sqlIssueType = new SqlParameter("@IssueType", SqlDbType.VarChar); sqlIssueType.Value = createIssueEntity.IssueType; command.Parameters.Add(sqlIssueType); SqlParameter sqlEpicName = new SqlParameter("@EpicName", SqlDbType.VarChar); sqlEpicName.Value = createIssueEntity.EpicName; command.Parameters.Add(sqlEpicName); SqlParameter sqlSummary = new SqlParameter("@Summary", SqlDbType.VarChar); sqlSummary.Value = createIssueEntity.Summary; command.Parameters.Add(sqlSummary); SqlParameter sqlDescription = new SqlParameter("@Description", SqlDbType.VarChar); sqlDescription.Value = createIssueEntity.Description; command.Parameters.Add(sqlDescription); SqlParameter sqlPriority = new SqlParameter("@Priority", SqlDbType.VarChar); sqlPriority.Value = createIssueEntity.Priority; command.Parameters.Add(sqlPriority); SqlParameter sqlAssign = new SqlParameter("@Assign", SqlDbType.VarChar); sqlAssign.Value = createIssueEntity.Assign; command.Parameters.Add(sqlAssign); command.ExecuteNonQuery(); } }
protected void BtnCreate_Click(object sender, EventArgs e) { CreateIssueEntity createIssueEntity = GetCreateIssueEntity(); Project project = new Project(); project.CreateIssue(createIssueEntity); { lblMessage.Text = "Issue Created Succesfully"; ClearControl(); } }
public CreateIssueEntity GetCreateIssueEntity() { CreateIssueEntity createIssueEntity = new CreateIssueEntity(); createIssueEntity.ProjectName = DdlProject.Text; createIssueEntity.IssueType = DdlIssue.Text; createIssueEntity.EpicName = txtEpicName.Text; createIssueEntity.Summary = txtSummary.Text; createIssueEntity.Description = txtDescription.Value; createIssueEntity.Priority = DdlPriority.Text; createIssueEntity.Assign = DdlPriority.Text; return(createIssueEntity); }