private TableVO LoadTable(IDataReader reader) { TableVO t = new TableVO(); t.TableId = ReadInt(reader, FIELD_TABLE_ID); t.Name = ReadString(reader, FIELD_NAME); t.CreatedDate = ReadDate(reader, FIELD_CREATED_DATE); t.ModifiedDate = ReadDate(reader, FIELD_MODIFIED_DATE); return(t); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnT1GenerateAll_Click(object sender, EventArgs e) { string dbServer = txtDbServer.Text.Trim(); string dbName = dbComboBox.SelectedValue.ToString(); string nameSpace = txtNamespace.Text.Trim(); if (string.IsNullOrEmpty(nameSpace)) { MessageBox.Show("Please fill Namespace first."); return; } PutMessageToStatusStrip("Collecting data..."); toolStripProgressBar1.Visible = true; ColumnBO currBO = ColumnBO.GetInstance(dbServer, dbName); List <TemplateModel> tables = new List <TemplateModel>(); foreach (DataGridViewRow currRow in dataGridView1.Rows) { if (!currRow.Selected) { continue; } TableVO currVO = (TableVO)currRow.DataBoundItem; if (currVO != null) { TemplateModel model = new TemplateModel(); model.Namespace = nameSpace; model.DatabaseName = dbName; model.TableId = currVO.TableId; model.Name = currVO.Name; model.NameS = currVO.NameS; model.Columns = currBO.GetColumns(currVO.Name); model.PKs = currBO.GetPKs(currVO.Name); model.FKs = currBO.GetFKs(currVO.Name); model.UKs = currBO.GetUKs(currVO.Name); tables.Add(model); //this.GenerateCodes( model, dbName ); } } //if ( model != null ) GenerateBaseCodes( model, dbName ); DoGenerate(tables, dbName); }
public static List <string> ListPullRequestReviewers(RepositoryVO repository, PullRequestVO pullRequest) { if (!IsConfigurated()) { return(null); } List <string> reviewers = new List <string>(); string command = _vstsPath; string arguments = @"code pr reviewers list --id " + pullRequest.ID; string response = ProcessService.Execute(command, arguments, repository.Path); TableVO table = new TableVO(response); foreach (TableRowVO row in table.Rows) { reviewers.Add(row.GetValue("Email")); } return(reviewers); }
public static List <PullRequestVO> ListPullRequests(string workingDirectory) { if (!IsConfigurated()) { return(null); } List <PullRequestVO> pullRequests = new List <PullRequestVO>(); string command = _vstsPath; string arguments = @"code pr list"; string response = ProcessService.Execute(command, arguments, workingDirectory); TableVO table = new TableVO(response); foreach (TableRowVO row in table.Rows) { PullRequestVO pullRequest = new PullRequestVO(); pullRequest.ID = Int32.Parse(row.GetValue("ID")); pullRequest.Title = row.GetValue("Title"); pullRequest.Repository = row.GetValue("Repository"); pullRequests.Add(pullRequest); } return(pullRequests); }