Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            IDatabase database = DataBaseCluster.Get_Transaction_WRITE_SERVER();
            database.InitAndOpenTransaction();

            tuser user = new tuser("aa", "1", 0, "aa");
            tuser user1 = new tuser("b00000000", "2", 0, "bb");

            try
            {
                user.Insert(database);
                int userid = user1.Insert_RETURN_ID(database);

                tuser.E.Where(tuser.userid == 18).Delete();
                tuser.E.Where(tuser.userid == 20).Delete(database);
                database.CommitTranscation();
            }
            catch (Exception ex)
            {
                database.RollBackTransaction();
            }
            database.CloseConnection();

            trole role = new trole("DDDSX", "DDDSXA", "AASDAS");
            role.Insert();
        }
Exemple #2
0
        private void btnAddRole_Click(object sender, EventArgs e)
        {
            trole role = new trole(txroleName.Text, "", "");
            role.Insert();

            dataGridrole.DataSource = trole.E.Select();
        }