예제 #1
0
 //--------------------------------------------------------------------------------------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------------------------------------------------------------------------------------
 private void btnSetting_Click(object sender, EventArgs e)
 {
     if (lblBt.Text == "")
     {
         frmCheck fcheck = new frmCheck();
         fcheck.ShowDialog();
         this.Hide();
     }
     else
     {
         frmSetting set = new frmSetting();
         set.Show();
         this.Hide();
     }
 }
예제 #2
0
        private void btnAllow_Click(object sender, EventArgs e)
        {
            //--------------------------------------------------------------------------------------------------------------------------------------------------------------
            //  This Form is Creating Table
            //  Fill in the Datatype to student Table (Column)
            //--------------------------------------------------------------------------------------------------------------------------------------------------------------

            DataSet ds = new DataSet();

            dt = new DataTable();

            dt.Columns.Add(new DataColumn("Person1"));
            dt.Columns.Add(new DataColumn("Person2"));
            dt.Columns.Add(new DataColumn("ChangeTitle"));
            dt.Columns.Add(new DataColumn("ChangeBottomText"));
            dt.Columns.Add(new DataColumn("StartDate"));
            dt.Columns.Add(new DataColumn("Photo1"));
            dt.Columns.Add(new DataColumn("Photo2"));
            dt.Columns.Add(new DataColumn("Photo3"));

            //--------------------------------------------------------------------------------------------------------------------------------------------------------------
            //  Data of fillRows function()
            //--------------------------------------------------------------------------------------------------------------------------------------------------------------
            fillRows("Person1", "Person2", "ChangeTitle", "ChangeBottomText", "StartDate", "Photo1", "Photo2", "Photo3");

            //--------------------------------------------------------------------------------------------------------------------------------------------------------------
            // Create DataSet, Setting Table.
            //--------------------------------------------------------------------------------------------------------------------------------------------------------------
            ds.Tables.Add(dt);
            ds.Tables[0].TableName = "Setting";
            ds.WriteXml("Setting.Xml");
            ds.WriteXmlSchema("Setting.xsd");

            frmSetting set = new frmSetting();

            set.Show();
            this.Close();
        }