Exemple #1
0
 private void UICloseProject()
 {
     this.OpenedProject = null;
     this.dataGridView_Items.DataSource = new List <object>();
     this.comboBox_Filter.DataSource    = new List <object>();
     this.comboBox_Filter.Text          = "";
     this.item1.Visible      = false;
     this.button_New.Enabled = false;
 }
        public static int SaveProject(Project p)
        {
            ScrumQueue.IOLogic.DBAccess dba = ScrumQueue.IOLogic.DBAccess.CreateConnection();
            System.Data.SqlClient.SqlDataReader reader = dba.execSP("SaveProject",
                                        new string[] { "@ProjectID", "@ProjectName", "@ProjectDescription" },
                                        new System.Data.SqlDbType[]{ System.Data.SqlDbType.Int, System.Data.SqlDbType.VarChar, System.Data.SqlDbType.VarChar},
                                        new object[] { p.ProjectID.ToString(), p.ProjectName, p.ProjectDescription });

            int id = -1;
            if (reader.Read())
            {
                id = int.Parse(reader["projectID"].ToString());
            }
            dba.CloseConn();
            return id;
        }
 public static void OpenProject(Project p)
 {
     throw new NotImplementedException();
 }
 private void UICloseProject()
 {
     this.OpenedProject = null;
     this.dataGridView_Items.DataSource = new List<object>();
     this.comboBox_Filter.DataSource = new List<object>();
     this.comboBox_Filter.Text = "";
     this.item1.Visible = false;
     this.button_New.Enabled = false;
 }