Esempio n. 1
0
    public int DeleteTransactionRole(TransactionRoleEntity oTransactionRoleEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("DELETE FROM tblrole WHERE roleid=" + oTransactionRoleEntity.RoleId, con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
Esempio n. 2
0
    public int UpdateTransactionRole(TransactionRoleEntity oTransactionRoleEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("UPDATE  tblrole SET roleCode='" + oTransactionRoleEntity.RoleCode + "',RoleDetails='" + oTransactionRoleEntity.RoleDetails + "',RoleRemarks='" + oTransactionRoleEntity.RoleRemarks + "', RoleLastModifiedBy ='" + oTransactionRoleEntity.RoleLastModifiedBy + "' WHERE roleid=" + oTransactionRoleEntity.RoleId, con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
Esempio n. 3
0
    public int InsertTransactionRole(TransactionRoleEntity oTransactionRoleEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblRole (RoleCode,RoleDetails,RoleRemarks,RoleCreateBy,RoleLastModifiedBy) VALUES('" + oTransactionRoleEntity.RoleCode + "','" + oTransactionRoleEntity.RoleDetails + "','" + oTransactionRoleEntity.RoleRemarks + "','" + oTransactionRoleEntity.RoleCreateBy + "','" + oTransactionRoleEntity.RoleLastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }